DavidMadacsi
Crownpeak Employee
Crownpeak Employee

Evidon Template Integration with Google Consent Mode V2

 

Overview  

Google Tag Manager (GTM) is a popular tag management platform which allows you to centrally manage advertising vendors and how they are deployed to your web sites and mobile devices.  Evidon Universal Consent Platform (UCP) supports GTM.  This document describes how to deploy the UCP scripts through GTM as well as how to implement consent mechanisms to comply with various regulations such as the GDPR.  

The Evidon UCP supports consent at various levels:  broad, or complete, category-level, or vendor-level.  If you offer just the consent choice of yes or no from your customers, you can hook our general consent event to be notified when advertising tags are permitted.  If you support users consent at the level of category groupings (e.g., "Advertisers"), you can retrieve that information from our consent event and enable the appropriate tags.  Additionally, you can offer specific vendor support, allowing customers to consent to specific vendors.  That is supported as well.  

This document assumes you already have a working knowledge of both the UCP and GTM, so it does not cover the configuration of your UCP implementation (for more details, refer to UCP Documentation) Or the basics of GTM. Instead, the focus here is on how to deploy UCP through GTM and support various consent levels. 

This section of the guide explains how to configure GTM to leverage these new features. 

Note: This article is not a comprehensive guide to Google Tag Manager. For more detailed information on setting up and using GTM, please refer to the official Google Tag Manager documentation. 

 

Key Terms  

The following are some definitions for terms used in this document.  

Prior Consent:  The act of gaining consent from users before allowing advertising or tracking technologies to execute.  

Tags:  The mechanisms used by advertising and tracking companies. Typically, these are JavaScript files but can also be things like image drops.  

Vendors:  Another name for companies who perform advertising and tracking functionality.  

Consent Wall:  A way to describe the “barrier” put in place to hold tags which require consent from executing until consent is gained.  

EvidonConsentGiven:  Evidon first party cookie that fires when implementing a Consent script. 

Basic Consent Mode: Adjusts how Google tags work based on user consent for cookies. It offers a simple way to handle consent for essential functionalities like Analytics and Ads without detailed customization.   

Advanced Consent Mode: Provides more granular control over how consent is managed and applied. It allows for detailed configuration and integration with various consent management platforms (CMPs), offering advanced options for handling different types of user consent and adjusting tag behaviour accordingly. 

For more information, see Google Consent Modes 

Enabling Evidon Category/Vendor Consent Support  

While this document doesn't cover the complete setup of the UCP platform, we will take a moment to guide you on how to enable support for Category and Vendor consent.  

Support for more granular consent is enabled at the Theme level within your consent platform. The following instructions will guide you through the process of enabling this support within a theme. 

  1. Log into the Evidon Privacy Application  
  2. Open your favourite browser and go to https://privacy.evidon.com  
  3. Open your “Manage” section to show the list of notices  
  4. This is a little shortcut to find the theme you want to modify (assuming you have multiple themes).  Filter the list of notices by typing in the domain name where you want the granular consent to occur.  Next to the notice domain you will see the theme assigned to the notice.  Click on that name to open the theme in a new tab/window.  
     
  5. Enable Options Dialog v2  
  6. Once you get into the target theme, switch to the Options Dialog section.  In that section you will see an option to enable v2 of the options dialog.  To enable the granular consent, check this option and save the theme.   
  7. A few things to note:  
     
  8. Enabling this will enable this for all notices using this theme.  If you don't want that to happen you should copy the theme, modify it, and assign the new theme to the web properties where you are going to do granular consent.  
  9. This will change the layout of your options dialog.  The most obvious change will be several toggle controls that allow the granular consent selections to users.  You will need to test this and make sure the default styles on the page are behaving correctly.  
  10. If you are not sure which theme to change you can go into the list of notices, filter the list down to the desired property, and then click the name of the theme next to the property.  This will open the theme designer in a new window.  

  

Once you have enabled the new version of the dialog, you will want to verify the styles look the way you want.  

This is a picture showing the correct option to enable  

DavidMadacsi_0-1723653169855.png

 

How to integrate Evidon with Google Tag Manager

(Prerequisites) 

The first step of this integration is added a “Evidon - Universal Consent Platform” from the pre-defined gallery of the Google Tag Manger.   

Option1: Using Evidon Universal Consent CMP Template:  

 
  1. In the Google Tag Manager menu, select Templates. The Templates screen will appear. 
  2. In the Tag Templates section, click the Search Gallery button to open the Community Template Gallery. 
  3. In the Search field, enter “Evidon Universal Consent CMP". 
  4. From the search results, select the Evidon Universal Consent CMP template. image (13).png

  5. Click the Add to Workspace button. A confirmation modal will appear. 
  6. Click the Add button. 
  7. In the Google Tag Manager menu, select Tags. The Tags screen will appear. 
  8. Name the tag "Evidon - Universal Consent Platform" 
  9. In the Tags section, click the New button. A popover pane will appear. 
  10. Click the Tag Configuration section. The Choose Tag Type pane will appear. 
  11. Select Evidon Universal Consent CMP from the Custom Tag Types. The Tag Configuration screen will appear. 
  12. Under Configuration, add you Company Id. 
     
DavidMadacsi_1-1723653169858.png

 

Option 2:  Adding the "Evidon Universal Consent Template" from the Community Template Gallery 

To add the "Evidon Universal Consent Template" using a different method, follow these steps: 

  1. Select the Tags tab from the main menu. 
  2. Click New. The Tag modal appears. 
  3. Name the tag "Evidon - Universal Consent Platform." 
  4. Under Tag Configuration, click the Edit button. 
  5. In the following screen, you'll have access to all the templates in the Community Template Gallery. 
  6. Search for and load the "Evidon - Universal Consent Platform" templateDavidMadacsi_2-1723653169860.png 
  7. Once the template is loaded, you'll have access to its user interface with a few options. 

Configuring the Template:  

Once the template is loaded, you'll have access to its user interface with a few configuration options: 

  1. Under Configuration, enter your Company ID. 
  2. You'll see a checkbox labelled "Enable Advanced Google Consent Mode." Check this box to activate advanced features for managing user consent and configuring tag behaviour.  DavidMadacsi_3-1723653169862.png 
  3. Additionally, you'll find a few checkboxes that allow you to set the default status for Google Consent Mode (GCM) according to your preferences. 
     DavidMadacsi_4-1723653169864.png 
     
  4. Specifying Tags to Fire Before or After a Given Tag in Web Containers 
  5. You can specify tags to fire immediately before or after a given tag in your web containers. For more detailed information, see the [Documentation]. 
  6. Fire a setup tag before <this tag> fires. 
  7. Don't fire <this tag> if <setup tag> fails.  
  8. Associating a Trigger to the Tag 
  9. To ensure that the tag triggers on all pages, follow these steps: 
  10. Click on the "Triggering" card to choose a trigger for the tag. 
  11. Select the "Initialization - All Pages" trigger. 
     DavidMadacsi_5-1723653169865.png 
  12. Click Save. 

 

DavidMadacsi_6-1723653169866.png

      

After adding the “Evidon - Universal Consent Platform” from pre-defined gallery the next step will be adding the Evidon Scripts.  

 

Two ways to adding Evidon Scripts and configure GTM for Consent  

There are two ways to set up GTM for consent  

  1. For ease of implementation, use the Google Recipes, which can be downloaded from UCP and imported to GTM to configure variables, triggers rules and tags.  Once they are imported, you must only assign the correct load rules to the tags.  
  1. For the most control over your configuration, use the events and script properties from the Evidon UCP tag to set up full consent support through GTM.  But it will take some work to set it up correctly.  Below is a walkthrough of one possible way to configure this support.  

 

Option 1: Using Google Recipes  

 

When logged in to UCP 

  1. Click on the Manage link in the menu  
  2. Click on Get Notice Tag  
  3. On the modal click the drop down to GTM Recipes  
  4. Click the drop down to choose the level of consent: Vendor or Categories  
  5. Download the file, which will be in Json format.  

  

DavidMadacsi_7-1723653169868.png

 

 

  

One the file is downloaded, log into your GTM instance. Follow these steps to import the Json file  

Please ensure you place the GTM header script as the first script in your source code to ensure any other scripts on your source code that fire cookies on the website are loaded after Evidon. 

 

  1. Select Admin from the top menu links  
  2. Select Import Container. Here you will import the Json file as the container file  
  3. You can overwrite the workspace or merge contents of the new file. Overwriting will replace anything existing with the new data from our file. Merge will bring in any new data and combine them with what’s already been done.  
  4. Confirm  
DavidMadacsi_8-1723653169870.png

 

Once complete, your triggers are set up. The final step is to assign the correct load rules to the tags.  

To support category consent on your tags you need to set up the tags to have the correct type of category consent assigned to them.  

  

  1. Open or Create the Tag you are adding to the consent wall.  
  2. In the Triggers section assign the All Categories trigger you imported and the appropriate Category Consent trigger for that tag.  
  3. Save the Tag settings  
  4.  

To support vendor consent on your tags you need to set up the tags to have the correct vendor consent trigger assigned to them.    

  

  1. Open or Create the Tag you are adding to the consent wall.  
  2. In the Triggers section assign the All Vendors trigger   
  3. Assign the specific Vendor trigger for the tag  
  4. Save the Tag settings  

Remember, triggers on a tag act as an “OR” condition, so if either of them execute the tag will fire.  

Once you have set up the tag and saved it, it should look something like the following:  

  

DavidMadacsi_9-1723653169871.png

 

Option 2: Adding the Evidon UCP Tag to Google Tag Manager 

  

If you also want to deploy the Evidon UCP tag through GTM that is easy to set up.  Just create a new Tag in your GTM platform and add in our script.  Here are some detailed steps:  

  

  1. Select the Tags tab from the main menu. 
  2. Click New. The Tag modal appears. 
  3. Name the tag "Evidon CMP Banner Script." 
  4. Under the Tag Configuration, press the Edit button. The Choose Tag Type modal appears. 
  5. Select Custom HTML. 
  6. Paste the published script into the HTML editor with your data domain script ID. Note: In the HTML input paste in the tag, you retrieve from the privacy application.  Make sure you include the open and closing <script> tags. 
  7. Check the Support document. Write box. - [Important: This must be checked for Evidon to load on your website.] 
  8. Click the Triggering icon. The Choose a trigger modal appears. 
  9. Select All Pages. 
  10. Click Save.  

Here is an example of how this should look: 

 

DavidMadacsi_10-1723653169874.png

 

This will add the Evidon tag to your implementation and instruct it to drop on every page load. 

Using Events and Scripts Properties  

Prerequisites  

For more control over the creation of triggers rules, you can follow these steps instead of the recipe. Before you begin setting up consent support you need to have the following:  

  

  • A list of vendors that need to be behind the consent wall vs the essential vendors that do not need consent.  
  • A decision on the level of granularity you are going to support (category, vendor, or just blanket yes/no consent)  
  • A working knowledge of how to configure GTM  
  • Your list of Vendor Categories as configured in the Evidon Privacy application  

You also need to be prepared for this to take some time and effort.  The odds are you have not been configuring your GTM implementation with consent in mind and this may require a substantial amount of rework.  It is entirely possible you will need to re-work your entire GTM setup.  This is unfortunate, but it is a sign of the times we are living in now.  Trust us, you are not alone with this pain.  

  

Technical Overview  

  

This section describes how we communicate consent through the GTM data layer.  If you are a GTM guru this is likely all the information you would need to set up your tags and triggers.  Even if you aren’t, it is important to know how we communicate consent to the tag manager.  

  

Data Layer Call Details  

  

dataLayer.push('evidonConsentGiven', consentCategories:'', consentVendors:'');   

  • eventName: evidonConsentGiven  
  • consentCategories:  comma-separated list of category names  
  • consentVendors:  comma-separated list of vendor names   

The category names in the consentCategories are the names you have assigned to your Category Buckets in the privacy application where you configured those.  If all categories are enabled the only value in the string will be 'all'.  

The vendor names in the consentVendors are the permanent string identifiers we use for our vendors.  If all vendors are enabled the string will be 'all'.   

GTM Nuances   

If you haven’t set up sophisticated tag rules before there are a couple of things to be aware of.    

On Triggers you can set up multiple “fire” rules that behave together, so they all need to be true for the trigger to fire.  We refer to this as “AND” logic, because each condition needs to be met.  

On tags you can set up multiple triggers, but these behave as “OR” conditions.  In other words, if any trigger is met the tag will execute.  

What does this mean to you?  You need to be careful about the triggers assigned to the tags that need to be behind a consent wall.  For example, you cannot put on the Page Load trigger for any of them because that will always be true, and the tag will drop before consent is received.   

Our recommendation is for you to create Tag-specific triggers for all tags that need consent.  This may seem like a lot of work, but if you are doing vendor-level support it is unavoidable and even if you aren’t it is probably good practice.  But tag-specific triggers will allow you to put on multiple trigger conditions such as consent, and a button click or form submission.  It will also allow you to more easily transition into vendorlevel consent support if you need to in the future.  

  

Consent Configurations  

This section provides a sample setup for each type of consent you can support:  blanket, category, or vendor level consent.   

  

Blanket (all or nothing) Consent  

This is the most basic type of consent.  Effectively you just look to see if the user provided consent or not, and then execute the tags behind the consent wall on the consent event received.  This type of consent ignores the incoming categories and vendors.  

  

Create the Trigger  

To support consent, you need to set up a trigger that receives the consent and can be assigned to the tags that need to be behind the consent wall.  Here are the steps we recommend creating the trigger:  

  1. Enter the Trigger section in you GTM   
  2. Create a new Custom Event Trigger  
  3. In the Event Name enter:  evidonConsentGiven  
  4. Leave the “All Custom Events” selection on 5. Give the trigger a meaningful name  
  5. Save the trigger.  

  

The configured trigger will look something like the following:  

DavidMadacsi_11-1723653169876.png

 

Configure the Tags  

For all your tag vendors who need consent you will need to add this trigger.  

  

Category Level Consent  

  

If you are providing your users the ability to consent to specific categories, you can support that within GTM using the Evidon UCP consent support.  When our tag triggers the consent event we include the list of categories the user has consented to.  This is a comma-separated list of the category names you provided within the Evidon Privacy Application when you configured your Category Buckets.  

  

This list will look something like the following:  advertisers, social media, analytics, other  

However, there is also a scenario where the site user just blanket consents to all vendor categories.  When this happens the consent string will just contain the word:  all  

You will need to handle both scenarios in your consent configuration.  This section will walk you through that configuration.  

Create the Category List Variable  

  

The list of categories will be passed in through the data layer as a variable.  To work with this information in GTM, it needs to be assigned to a variable.  This section will walk you through creating the variable to hold the consented categories values.  

  

  1. Open the GTM Variables section  
  2. Click on the New button to create a new variable  
  3. Select “Data Layer Variable” as the type  
  4. In the data layer name input enter:  consentCategories  
  5. You can leave the rest of the values as the defaults  
  6. Save the variable and give it a meaningful name.  For rest of our instructions this name will be “Consented Categories”  

 

It should look like the following:  

DavidMadacsi_12-1723653169877.png

 

Create the Triggers  

For category level consent you will need to create a Trigger for each category you have defined as well as one for the “All” category.     

Here are the steps to create the all categories trigger:   

  

  1. Enter the Trigger section in you GTM   
  2. Create a new Custom Event Trigger  
  3. In the Event Name enter:  evidonConsentGiven  
  4. Change the trigger so it fires on Some Custom Events  
  5. Select the variable you created to hold the consent categories.  Consented Categories in our example. 6. Set the condition to “equals”  
  6. In the final value input enter:  all  
  7. Give the trigger a meaningful name such as “All Categories Consent Received”  
  8. Save the trigger.   

Once you have set this up it should look like the following.  

DavidMadacsi_13-1723653169878.png

 

Now create the category-specific triggers.  We are going to give you an example of how one of them would look, just repeat the process for all the categories you will support.  

Here are the steps to create the category-specific trigger:   

  

  1. Enter the Trigger section in you GTM   
  2. Create a new Custom Event Trigger  
  3. In the Event Name enter:  evidonConsentGiven  
  4. Change the trigger so it fires on Some Custom Events  
  5. Select the variable you created to hold the consent categories.  Consented Categories in our example.  
  6. Set the condition to “contains”  
  7. In the final value input enter the category name (lowercase).  Ex:  advertiser  
  8. Give the trigger a meaningful name such as “Advertiser Consent Received”  
  9. Save the trigger.  

  

When you are finished it will look something like this:  

DavidMadacsi_14-1723653169879.png

 

Configure your Tags  

  

To support category consent on your tags you need to set up the tags to have the correct type of category consent assigned to them.  This section will walk you through setting that up.  

  

  1. Open or Create the Tag you are adding to the consent wall.  
  2. In the Triggers section assign the All Categories trigger you created and the appropriate Category Consent trigger for that tag.  

  

Remember, triggers on a tag act as an “OR” condition, so if either of them execute the tag will fire.  

Once you have set up the tag and saved it, it should look something like the following:  

  

DavidMadacsi_15-1723653169880.png

 

Vendor Level Consent  

  

If you are providing your users the ability to consent to specific vendors, you can support that within GTM using the Evidon UCP consent support.  When our tag triggers the consent event we include the list of vendors the user has consented to.  This is a comma-separated list of the vendor level names you provided within the Evidon Privacy Application.  

  

This list will look something like the following:  adroll, google, mediamath  

  

However, there is also a scenario where the site user just blanket consents to all vendors.  When this happens the consent string will just contain the word:  all  

  

You will need to handle both scenarios in your consent configuration.  This section will walk you through that configuration.  

  

Create the Vendor List Variable  

  

The list of vendors will be passed in through the data layer as a variable.  To work with this information in GTM it needs to be assigned to a variable.  This section will walk you through creating the variable to hold the consented categories values.  

  

  1. Open the GTM Variables section  
  2. Click on the New button to create a new variable  
  3. Select “Data Layer Variable” as the type  
  4. In the data layer name input enter:  consentVendors  
  5. You can leave the rest of the values as the defaults  
  6. Save the variable and give it a meaningful name.  For rest of  our instructions this name will be “Consented Vendors”  

  

Create the Triggers  

  

For category level consent you will need to create a Trigger for each vendor you have defined as well as one for the “All” to capture the all-vendor scenario.    

  

Here are the steps to create the all vendors trigger:   

  

  1. Enter the Trigger section in you GTM   
  2. Create a new Custom Event Trigger  
  3. In the Event Name enter:  evidonConsentGiven  
  4. Change the trigger so it fires on Some Custom Events  
  5. Select the variable you created to hold the consent categories.  Consented Vendors in our example.  
  6. Set the condition to “equals”  
  7. In the final value input enter:  all  
  8. Give the trigger a meaningful name such as “All Vendors Consent Received”  
  9. Save the trigger.  

  

This is an example of what this trigger would look like:  

  

DavidMadacsi_16-1723653169881.png

 

  

Now create the vendor-specific triggers.  We are going to give you an example of how one of them would look, just repeat the process for all the vendors you support.  

  

Here are the steps to create the vendor-specific trigger:   

  

  1. Enter the Trigger section in you GTM   
  2. Create a new Custom Event Trigger  
  3. In the Event Name enter:  evidonConsentGiven  
  4. Change the trigger so it fires on Some Custom Events  
  5. Select the variable you created to hold the consent categories.  Consented Vendors in our example.  
  6. Set the condition to “contains”  
  7. In the final value input enter the vendor name (lowercase).  Ex:  adroll 8. Give the trigger a meaningful name such as “AdRoll Consent Received”  
  8. Save the trigger.  

  

When you are finished it will look something like this:  

  

DavidMadacsi_17-1723653169882.png

 

  

Configure your Tags  

  

To support vendor consent on your tags you need to set up the tags to have the correct vendor consent trigger assigned to them.  This section will walk you through setting that up.  

  

  1. Open or Create the Tag you are adding to the consent wall.  
  2. In the Triggers section assign the All Vendors trigger   
  3. Assign the specific Vendor trigger for the tag  
  4. Save the Tag settings  

  

Remember, triggers on a tag act as an “OR” condition, so if either of them execute the tag will fire.  

  

Once you have set up the tag and saved it, it should look something like the following:  

  

DavidMadacsi_18-1723653169883.png

 

   

Things to consider about deploying the UCP tag through GTM  

  

You need to remember that everything is a trade-off for these scenarios.  Using GTM makes managing your tags easier and makes deployment very simple.  

  

But, for things like deploying the UCP tag through GTM it will add a bit more latency to the overall tag loading.  This is unavoidable.  If you deploy UCP directly onto your site pages, it will execute immediately as the page loads.  If you deploy through GTM it will need to wait for GTM to load first and then pull down the initial set of tags to execute on page load.  Since any tag behind the consent wall needs to wait for UCP to load, pull the settings, and look for consent (or show the consent interface) this will add latency to that whole process.  

  

Testing  

  

It is critically important you thoroughly test your configuration.  This should go without saying, but we frequently encounter customer issues where one or more of their defined triggers doesn't work.  We don't want some of your tags not executing correctly because of some minor misconfiguration somewhere.  Because most of the triggers work off text inputs the odds of something like a typo happening are high, so definitely make sure all the paths are working.  

  

To test:  

  1. Set up a sample page (or use a dev/test environment you already have).  
  2. Switch the GTM tag so it is in "preview" mode  
  3. Open another tab in the same browser (highly recommend Chrome for this by the way)  
  4. Open the sample page in that window  
  5. Walk through all the different consent flows.  This will take some time and attention to detail.  

 

Labels (1)

Can't find what you are looking for?

Find Answers

Search our DG Forum to find answers to questions asked by other DG users.

Ask a Question

No luck? Ask a question. Our Product and Support teams are monitoring the Forum and typically respond within 48 hours.

Ask a Question