The state Assembly has unanimously passed a bill restricting how school districts monitor and track students on social media.
Author Assemblyman Mike Gatto says limits should be set as more districts monitor cyberbullying.
In his district, Glendale Unified School District hired a firm last fall to monitor Facebook and Twitter posts after two students committed suicide.
The bill mandates school districts to hold public hearings before starting such programs.
It requires schools to only collect publicly visible social media posts and requires them to delete data after students graduate or leave the district.
It now heads to the Senate.