Cookies, GDPR, Google Analytics

Does anyone have a good source or suggestion how to connect a cookie consent button to Google Analytics?

I understand that Google Analytics is by default not GDPR compliant, so I figured I need to offer my users to turn it off.

How can this be implemented from a technical point of view? Anyone has experience with this?

Hi @ant,

Have you used Tag Manager before? There are quite a lot of consent managers that you can use together with Google Tag Manager. See this link:

I think that offers the greatest flexibility in giving users the choice to optin or optout of different cookies.

Never used it, thanks for the suggestion, I will look into that.

Do I understand correctly that when you use Google Analytics it automatically generates a tag and with a tag manager you create your own and have more control?

Almost. With Tag Manager you can have different tags in your ‘container’. So Google Analytics would be one of those tags, you still need to create a Google Analytics account. With Tag Manager you can choose which tags you want to use on different pages or for different consent levels.

This is especially handy if you want to use other scripts in the future, for instance Meta pixel, hotjar, adtracking etc.

Thanks so much for explaining and pointing in the right direction; will read up on that.

1 Like

An out-of-the-box-component thta handles cookie consent.