Setup UniConsent GDPR CMP with Google Tag Manager

19 June 2019

GDPR remarketing

If you are using Google Tag manager on your website already, it is possible to setup UniConsent CMP with Google Tag manager.

Some publishers simply put the tag into GTM and load it when page loading, this works for avoiding passing personal cookies via Google DFP for GDPR compliance.

A website is able to load some javascript tags based on user’s consent: only load some javascript tags if a user has given the consent.

Step 1:

Add a custom event “unic_allow_cookie” at Google Tag Manager.

google analytics debugger

Step 2:

Load third party javascript tags such as Facebook pixel based on this event:

google analytics debugger

Step 3:

You are able to preview the changes made with GTM. Remember to publish the changes once you have finished the test.

Now the marketing cookies and third-party javascript tags only load when the user has given consent.

There are other ways to setup consent based tags:

  1. Use the UniConsent build-in consent based tag loader
  2. Setup with Javascript API

Please contact us if you need help for the integration.

Let's get you started

Make your website GDPR compliant