A California law will change the way tech companies treat data.

A new California law opposed by Silicon Valley tech giants could have a major impact on how companies treat consumer data.

According to the Wall Street Journal:

The law, which was rushed through the legislature this week and signed by Gov. Jerry Brown on Thursday, broadens the definition of what constitutes personal information and gives California consumers the right to prohibit the sale of personal data to third parties and opt out of sharing it altogether. The bill applies to internet giants such as Facebook Inc. and Alphabet Inc.’s Google but also will affect businesses of any size that collect data on their customers.

Ashkan Soltani, a digital researcher and former chief technologist for the Federal Trade Commission, said the regulations are the first of their kind in the U.S.

Though California’s law only applies to residents of that state, the Journal reports that it’s likely to prompt tech companies to revise their overall policies rather than try to carve out an exception.

“This is a huge step forward for California,” State Senator Bob Hertzberg, a Democrat, said during a livestreamed press conference last week, according to CNBC. “This is a huge step forward for people across the country.”

The California law follows tough new rules on data protection in the European Union, coming after months of revelations and complaints about big tech‘s treatment of user data.

According to the Associated Press:

The move by California came after large breaches in recent years at companies including Target and Equifax. Facebook also has faced intense scrutiny amid revelations that Republican-linked consulting firm Cambridge Analytica collected data from millions of Facebook users without their knowledge.

The bill gives companies the ability to offer discounts to customers who allow their data to be sold and charge those who opt out a reasonable amount based on how much the company makes selling the information.