By Aaron Leibowitz

Hours after the deadly school shooting in Parkland, Fla., companies that market their services to schools began to speak up. “Governor, take pride that a Vermont-based company is helping schools identify the violence before it happens,” one company wrote on Twitter to Gov. Phil Scott of Vermont.

The chief executive of another company appeared on the news to boast of a “home run”: Its algorithms, he said, had helped prevent two student suicides.

To an anguished question that often follows school shootings — Why didn’t anyone spot the warning signs? — these companies have answered with a business model: 24/7 monitoring of student activity on social media.

Often without advance warning to students and parents, the companies flag posts like those of Auseel Yousefi, who was expelled in 2013 from his high school in Huntsville, Ala., for Twitter posts made on the last day of his junior year. “A kid has a right to be who they want outside of school,” he said later.