Opt-out of FLoC on your WordPress website

If you read my blog, you’ll know I’m concerned about online privacy and user tracking. Recently, Google has announced (and implemented) a new tracking mechanism that no longer requires cookies to work. It’s called “Federated Learning of Cohorts”, or “FLoC”.

This explains why Google didn’t fiercely oppose third party cookies being phased out. They’ve developed something better. For them. Certainly not for us.

What can you do?

This blog post by DuckDuckGo lists a number of steps you can take to avoid being profiled by FLoC. The most important thing is probably to stop using Google Chrome. Or use it only with the DuckDuckGo extension (or something similar) installed.

Opting out as a website owner

It is possible to opt-out of FLoC on a website level. This requires the website to add an HTTP header that tells Google to not gather FLoC information on that website. The blog post I linked to above also has info on this header.

WordPress plugin

To make this easy for WordPress website administrators, I’ve created a small plugin that adds the header for you. You can download it here:

Roy Tanck
I'm a freelance WordPress developer, designer, consultant, meetup organizer and speaker. In my spare time I love to go out and take pictures of things.

6 thoughts on “Opt-out of FLoC on your WordPress website”

  1. Roy,

    small PHP remarks:

    ” // Loop through the values to see if there already is a cohort setting. ” -> neat, but why not add_filter with 999 as prio ? Which would suffice for other codes to add it as well?

    “$headers[ $header_key] = $header_val;” -> “$headers[ $header_key ] = $header_val;” [no spaces thereafter]

    1. Hi Ramon. The priority idea is worth considering, but the main purpose of looping through the values is that the header can have multiple comma-separated values. My plugin attempts to keep any existing values instead of overwriting the header completely.

    1. You’re welcome! Thank you for making the interwebs a little more private.

Comments are closed.