Cookie Consent v2: how to implement working user consent for analytics and remarketing for free

27.02.2024 | Author: Jakub Woźnica

Cookies are a very popular term that bombards us on every website we visit. We have become immune to them and, out of habit, accept all cookies.

Cookies are used very widely, and they affect our privacy and security online. Through cookies and other identifiers, such as our IP address and other markers of our computer, we can be detected, tracked and processed by algorithms that adapt to our preferences and show us ads and content that may interest us.

Cookie consent banners on various top Polish websites

On a mass scale, this is a powerful tool in the hands of the internet giants, who can process huge amounts of data about our behaviour and preferences. It is good that the law requires a framework within which data may be processed, giving users the possibility to choose.

Important: the legal background

1. On 25 May 2018, a new EU regulation called the GDPR (General Data Protection Regulation) came into force. Under the GDPR, websites are required to obtain the user’s consent to process data using cookies or other similar technologies.

The President of the Polish Personal Data Protection Office (based on a judgment of the Court of Justice of the European Union) ruled that internet users must consent to cookies actively. It cannot be passive consent given merely through browser settings. In the same judgment, the CJEU also ruled that clear and comprehensive information should allow the user to easily determine the consequences of giving consent.

2. If your website or app is used by a user from the European Economic Area and you measure their actions with tags from Google, Facebook and other providers, you must pass on your user’s consent choices regarding data processing. If you do not, your advertising campaigns and analytics services may stop working.

You can find out more in this article:
https://support.google.com/tagmanager/answer/13695607?hl=en

 

While implementing “cookie consent” is not a technological challenge for large websites, it can be one for small companies with their own websites. Many cookie consent services have appeared on the market, providing the necessary tools as a subscription. The cost is significant, though, sometimes as much as a year of hosting and an SSL certificate, and it is definitely not worth that much.

So we have prepared instructions on how to implement cookie consent completely free of charge, using currently available online tools.

Step 1. Set up your domain in Cloudflare.com

With Cloudflare you also gain extra security, a proxy and a caching system. How do you do it? Sign up at https://cloudflare.com, add your domain and choose the free plan. You will get individual name servers, which you then set for your domain at your domain registrar. Be careful to do this correctly, so that you do not lose your email, for example, through an incorrect domain configuration.

Moving domain DNS to Cloudflare

Step 2. Set up Cloudflare Zaraz

With Cloudflare Zaraz you can load tools such as analytics, advertising pixels and scripts, chatbots, marketing automation tools and much more in the most optimal way.

Cloudflare Zaraz is built with speed, privacy and security in mind, and you can use it to load as many tools as you need with almost zero impact on performance.
Configuring Consent Mode in Cloudflare Zaraz

Step 3. Choose the scripts you want to integrate with your website from those available, for example Google Analytics, Google Ads or Facebook Pixel.

The full list of integrations available in Cloudflare Zaraz:
Apps and services available in Cloudflare Zaraz

Configure consent

Set the text of the message, enable the apps that Cloudflare should handle, and translate the buttons.

Consent configuration

 

It is also worth slightly changing the order and look of the buttons in line with UX principles. The reject button should be on the left and the accept button on the right. You can do this with CSS, which can also be edited:

Modifying the CSS

 

A free cookie consent pop-up, ready to go

Free Cookie Consent alternative

 

If you have any questions about the configuration or need help, write to us.

Related technologies

Jakub Woźnica Jakub Woźnica

project manager

Co-founder of Okinet since 2006. Day to day I stay close to our projects and take an active part in them, but I also try to keep up with technology and the changes that keep accelerating in the world of the internet.

All articles by this author

Share

Rate this article

Let’s talk
about your project

+48 506 160 480
biuro@okinet.pl

or write to us