How to add cookie consent to your website

After creating my personal website, I looked for a lot of tools to add the cookie consent in order to comply with the GDPR.

I ended up finding 2gdpr, a free tool to create a cookie consent banner and comply with GDPR.

The banner can be personalized and integrated on the website in a few minutes. Accordingly, cookies will be blocked until the user’s consent is obtained.

Who needs to do this?

  • Websites having consumers in the European Union.
  • Any person, company or association located in the European Union owning a website.

How to do it?

1- Customize the banner directly on the website.

2- Add the generated code just before the </body> tag.

3- Change ‘UA-00000000–1’ to your google analytics ID.

4- Deploy your website.

5- Scan your site with the 2GDPR checker again.

That’s it ! I hope this tutorial will help you 😃.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store