Three big Silicon Valley social media companies Facebook, Google's YouTube and Twitter have agreed to allow third-party institutions to conduct audits on how they handle harmful content on their sites.

The companies decided to put an end to a prolonged boycott by large advertisers.

On Wednesday, the World Federation of Advertisers said it had reached a deal with the three companies. The deal will give the companies standardized definitions and processes to handle harmful content such as hate speech and fake news.

The new agreement took a year to hammer out. The social media companies will allow third-party institutions to audit their different filtering processes. This will include the way they categorize, report and eliminate harmful content.

The federation hopes that once these reviews are completed all involved will come up with a plan to effectively implement a standardized process of mitigating the spread of harmful content. Apart from the audits, Facebook, Google and Twitter agreed to create new systems to give advertisers more control over how their brands are marketed and which types of content they will be advertised alongside.

"As funders of the online ecosystem, advertisers have a critical role to play in driving positive change and we are pleased to have reached an agreement with the platforms on an action plan and timeline," federation chief executive Stephan Loerke said in a statement.

Apart from general complaints about the proliferation of unwanted and harmful content, advertisers have long criticized the social media companies for allowing ads to appear alongside violent or racist content. As the advertisers banded together along with activist organizations, the three companies saw massive walkouts that hurt their revenues. Last year, Google's YouTube faced a worldwide boycott from advertisers. Facebook and Twitter saw similar walkouts as advertisers and users publicly demanded a change in the way they handled harmful content.