Opt-out FLoC in your website
TL;DR: As a responsible website and as a privacy advocate, I have taken steps to prevent Google’s FLoC from being able to track you here.
If you read the privacy policy of this site, you will see that I explain that I do not use cookies or anything that can track you and know who you are.
Google doesn’t care if I care about privacy or not and if someone using Chrome visits this page, even if I don’t use cookies or anything, they will be tracked. FLoC is given by Google, not by my website.
But there’s an option for all of us who have a website and care about privacy. The option is to tell Chrome that we don’t want anybody visiting the web using Chrome to be tracked by FLoC.
Here I link an interesting article about FLoC and why it is a terrible idea:
Steps to opt-out FLoC.
This configuration is given at the server level, so depending on the server you have, you will have to add the following configuration to the corresponding file.
- Note: If your server is a hosting service, please note that you will have to access the server and look in the
public
directory for the folder with the name of your webpage or whatever you have named it.
Wordpress
If you have created your website with Wordpress you must find the functions.php
file and add the following code.
function disable_floc($headers) {
$headers['Permissions-Policy'] = 'interest-cohort=()';
return $headers;
}
add_filter('wp_headers', 'disable_floc');
}
Netlify
If you have hosted your website on Netlify, you will know that there is an option to add a netlify.toml
file that will make Netlify take into account all the parameters you include in it. To do this, simply write the following code:
# netlify.toml
[[headers]]
for = "/*"
[headers.values]
Permissions-Policy = "interest-cohort=()"
Apache
If you do not use a hosting service and you have your website hosted on your own server, if it is Apache you have to modify your .htaccess
file, which will be located inside your domain directory. The code to add is the following:
# /www/htdocs/example.com/.htaccess
<IfModule mod_headers.c>
Header always set Permissions-Policy: interest-cohort=()
</IfModule>