WASHINGTON (Reuters) - Google, which is owned by Alphabet Inc, and its YouTube video service will pay $170 million to settle allegations that it broke federal law by collecting personal information about children, the Federal Trade Commission said on Wednesday.

YouTube had been accused of tracking viewers of children’s channels using cookies without parental consent and using those cookies to target million of dollars in advertisements to those viewers.

The settlement with the FTC and the New York attorney general’s office, which will receive $34 million, is the largest since a law banning collecting information about children under age 13 came into effect in 1998. The law was revised in 2013 to include “cookies,” used to track a person’s internet viewing habits.

It is also small compared with the company’s revenues. Alphabet, which generates about 85% of its revenue from sales of ad space and ad technology, in July reported total second-quarter revenue of $38.9 billion.

YouTube said in a statement on Wednesday that in four months it would begin treating all data collected from people watching children’s content as if it came from a child. “This means that we will limit data collection and use on videos made for kids only to what is needed to support the operation of the service,” YouTube said on its blog.

In addition to the monetary fine, the proposed settlement requires the company to create a system for identifying content aimed at children and to notify channel owners about their obligations to get consent from parents before collecting information on children.

FTC Chairman Joe Simons noted at a news conference on Wednesday what he said were important changes to YouTube business practices. “No other company in America is subject to these types of requirements and they will impose significant costs on YouTube,” he told reporters.

FILE PHOTO: Silhouettes of mobile device users are seen next to a screen projection of Youtube logo in this picture illustration taken March 28, 2018. REUTERS/Dado Ruvic/Illustration

FTC’s Bureau of Consumer Protection director Andrew Smith told reporters that the $170 million settlement was based on revenues from data collected, times a multiplier. “It happens that $170 million is roughly the budget of the Bureau of Consumer Protection for one year,” he added.

Once the settlement takes effect, the FTC plans to “conduct a sweep of the YouTube platform to determine whether there remains child-directed content” in which personal information is being collected, Smith said.

The FTC could take actions against individual content creators or channel owners as a result.

In late August, YouTube announced it would launch YouTube Kids with separate niches for children depending on their ages and designed to exclude disturbing videos. It has no behavioral advertising.

YouTube allows companies to create channels, which include advertisements that create revenue for both the company and YouTube.

In its complaint, the government said that YouTube touted its popularity with children in marketing itself to companies like Mattel and Hasbro. It told Mattel that “YouTube is today’s leader in reaching children age 6-11 against top TV channels,” according to the complaint.

New York Attorney General Letitia James said the companies “abused their power.”

“Google and YouTube knowingly and illegally monitored, tracked, and served targeted ads to young children just to keep advertising dollars rolling in,” said James.

The two Democrats on the FTC, Rebecca Slaughter and Rohit Chopra, dissented from the settlement. Slaughter, who called the violations “widespread and brazen,” said the settlement fails to require YouTube to police channels that provide children’s content but do not designate it as such, thus allowing more lucrative behavioral advertising, which relies on tracking viewers through cookies.

Senators Ed Markey and Richard Blumenthal, both Democrats active in online privacy matters, criticized the settlement in separate statements.

“A financial settlement is no substitute for strict reforms that will stop Google and other tech companies from invading our privacy,” Blumenthal said. “I continue to be alarmed by Big Tech’s policies and practices that invade children’s lives.”