How to Disable Google FLoC on your Child Sites

Google is in the process of rolling out Learning of Cohorts (FLoC) in the Chrome browser. FLoC is intended as a replacement for cookies as interest-based marketing solution that can be used in the same way cookies are currently used. Google FLoC raises a number of privacy issues and due to GDPR rules in place in Europe currently, the FLoC trial is not being rolled out there.

WordPress may or may not end up having a filter or a setting in WordPress core that can be used to disable Google FLoC on your site.  But for the moment you can use the following code snippet on your connect child sites.

You can use the MainWP code snippets extension to run the code snippet on all of the connected child sites that you need to.

A plugin solution to disable FLoC on your site then you can install and activate the Disable FLoC plugin on your site. The plugin offers two blocking methods a simple PHP one as well as an Apache .htaccess based method. The Disable FLoC plugin should work with a number of caching plugins when using the simple method and you can use it with the WP Super Cache plugin.

If using the Apache method in the plugin settings it will add these entries into the sites .htacess file.

# Added by Disable FLoC by WP Munich
<IfModule mod_headers.c>
Header always set Permissions-Policy "interest-cohort=()"
</IfModule>

Manage all your WordPress sites with the MainWP Dashboard

WordPress Management for Professionals

Are you ready to go Pro?

All MainWP Pro Extensions are available through one of our convenient bundled packages.

Depending on if WordPress core goes with a filter or a settings option to enable users to be able to disable Google FLoC on your site. Then the Disable FLoC plugin and the relevant code snippet will be updated in the post.

Looking for something?

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.