YouTube has agreed to pay $170 million over allegations that it violated children's privacy laws by collecting the data of young users without obtaining parental consent.

The Federal Trade Commission announced the settlement Wednesday morning, following the federal agency's investigation into whether YouTube and its parent company, Google, have been violating the Children's Online Privacy Protection Act, known as COPPA.

The settlement is subject to review by the Department of Justice, and YouTube has 30 days to make its payments to the FTC and New York Attorney General.

As part of the settlement, YouTube will be required to implement a system for better identifying videos that are "child-directed content." That means that creators will have to notify YouTube if their content is made for kids, in addition to YouTube itself flagging content that targets younger audiences, including videos featuring toys and games.

Read more: YouTube reportedly agrees to pay up to $200 million in FTC settlement

In a blog post Wednesday morning, YouTube said it will implement a new policy of treating any data of users viewing children's content on the platform "as coming from a child," no matter who the user is. YouTube will also stop allowing personalized and targeted ads on these videos, a move that could cut the platform's ad revenues by as much as $50 million a year.

These changes will be implemented "starting in about four months," YouTube said.

The FTC settlement also requires YouTube to provide annual training about COPPA and COPPA compliance to its employees who deal with child-directed content and videos made for kids.

YouTube has taken some moves to better protect children and families on its platform, including disabling comments on videos featuring children after predatory comments were found across the platform.

YouTube has considered shifting all its children's content to a separate platform, YouTube Kids. The platform — which both an app and a standalone website — is meant for kids under age 13, and is equipped with increased levels of moderation on content.

In its blog post, YouTube said it would increase its investments in promoting YouTube Kids in a campaign across the YouTube platform.

YouTube is not the first social platform to be fined by the FTC for violations of privacy laws. Facebook was fined $5 billion in July for mishandling user data of over 50 million users amid the Cambridge Analytica scandal. TikTok, the short-video-sharing app, paid a $5.7 million fine in February for violating COPPA.