Federated Learning of Cohorts or FLoC, in short, is Google’s next-generation web tracking feature. FLoC will profile users in the browser itself instead of relying on third-party tracking cookies. FLoC, as part of Google Chrome, records the websites you visit and groups users with similar interests under a “cohort ID”. This identifier can then be used by advertisers to decide what ads to show.
Steve Gibson, on the other hand, explains why he thinks FLoC might be an improvement over today’s tracking cookies.
Like all Google Chrome users, websites will automatically opt-in if Chrome detects the website is serving ads or using the Permissions API. This means your website visitors will be tracked if they use Google Chrome. It looks like websites can opt-out by sending a custom HTTP response header:
Paramdeo Singh has a great post full of snippets to easily configure the most common web servers.
If we are using Ruby on Rails we can set a custom HTTP header in the ApplicationController that will be sent with each response by adding the following to the app/controllers/application_controller.rb:
Check the headers via the developer tools of your non-Chrome browser and you should see a ‘Permission-Policy’ response header. This should hopefully do the trick for now.
This post is open source. Did you spot a mistake? Ideas for improvements? Contribute to this post via Github. Thank you!