Setup UniConsent GDPR CMP with Google Tag Manager

UniConsent

2 min read
Table of contents

GDPR remarketingGDPR remarketing

Notice: this article is for UniConsent V1 only, please check the updated documents for UniConsent V2 after logging in.

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.

Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc

Sign up

Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc

Sign up