BOISE, Idaho – Their anger is all over social media for the whole world to see, with rants about minorities, relationships gone bad or paranoid delusions about perceived slights.

The perpetrators of mass shootings often provide a treasure trove of insight into their violent tendencies, but the information is not always seen by law enforcement until after the violence is carried out. In addition, rants and hate speech rarely factor into whether someone passes a background check to buy guns.

The massacre at a Pittsburgh synagogue, the pipe bombing attempts from last week and the Florida high school shooting this year have underscored the dilemma of law enforcement around the country in assessing the risk of people making online rants at a time when social media has become so ubiquitous.

“We can go out on Twitter and there are loads of people saying insane stuff, but how do you know which is the one person? It’s always easy after the fact, to go: ‘That was clear.’ But clearly everyone spouting their mouth doesn’t go and shoot up a synagogue,” said David Chipman, a retired agent of the federal Bureau of Alcohol, Tobacco, Firearms and Explosives and now senior policy adviser for the Giffords Center.

Robert Bowers, the man accused of opening fire at a synagogue in Pittsburgh, expressed virulently anti-Semitic views on a social media site called Gab, according to an Associated Press review of an archived version of the posts made under his name. The cover photo for his account featured a neo-Nazi symbol, and his recent posts included a photo of a fiery oven like those used in Nazi concentration camps during World War II. Other posts referenced false conspiracy theories suggesting the Holocaust was a hoax.

It was only just before the shooting that the poster believed to be Bowers seemed to cross the line, posting: “I can’t sit by and watch my people get slaughtered. Screw your optics, I’m going in.” Authorities say Bower killed 11 people and injured six others, including four officers who responded.

Keeping tabs on social media posts has been used for years by law enforcement to try to identify potential threats. The task is enormous and it’s an inexact science. The volume of posts is significant and the question arises: Is something a true threat or free speech?

They are mindful of the fact that the First Amendment protects Americans’ right to express even speech that many in society find abhorrent – and have to make often-subjective decisions about what crosses the line.

Among more than 550 police departments across the country surveyed several years ago by the International Association of Chiefs of Police, about three-quarters said they regularly searched social media for potential threats.

Lt. Chris Cook, spokesman for the Arlington, Texas, Police Department, said the searches are often done manually, using keywords to try to identify troubling posts.

“It’s very time consuming, it’s very staff and resource intensive and you have humans involved in the process so there is the potential that law enforcement can miss something,” Cook said, adding that departments can’t rely on social media alone. The community needs to be involved to report any suspicious behavior.

“Everyone has to be our extra eyes and ears out there,” he said.

In one case where vigilance paid off, authorities say a black woman received troubling racist, harassing messages on Facebook from a man she didn’t know, prompting her to call police. The tip from the New Jersey woman led Kentucky police to a home where they found Dylan Jarrell with a firearm, more than 200 rounds of ammunition, a bulletproof vest, a 100-round high-capacity magazine and a “detailed plan of attack.” He was arrested just as he was leaving his driveway.

Bowers is not alone among alleged mass shooters in making racist or bigoted comments online.

Dylann Roof, convicted of the 2015 slaying of nine black churchgoers in South Carolina, had posted a 2,000-word racist rant and posed in photos with firearms and the Confederate flag. Nikolas Cruz, the teenager charged in the slaying of 17 students and adults at a high school in Parkland, Florida, hurled online slurs against blacks and Muslims, and went so far as to state he wanted to be a “professional school shooter.”

The rants did not affect their ability to buy guns. When purchasing a firearm, criminal background checks only look for any records showing a criminal past or mental health problems that led to an involuntary commitment.

“I always felt as an ATF agent, the way our laws were structured, ATF stood for ‘After the Fact’,” Chipman said.

There have been some changes, however, to make it easier to alert authorities to warning signs. “Red flag” laws have been enacted in 13 states in the past couple of years, allowing relatives or law enforcement with concerns about a person’s mental health to go to court and seek to have firearms removed at least temporarily.

But Erich Pratt, executive director of Gun Owners of America, cautioned against using social media content to deny someone the constitutional right to own a firearm.

“I abhor hateful comments by the left or the right but I don’t think you lose your rights for simply uttering,” Pratt said.

He likened it to the Tom Cruise movie “Minority Report,” about law enforcement in the future using psychic technology to nab murderers before they commit a crime.

“It’s dangerous to go down this road of Minority Report with pre-crime,” he said. “Nobody should lose their rights without due process.”