Skip to main content

Google Tag Manager Overview

DataGrail Consent features a foundational integration to Google Tag Manager (GTM), making it easy for most businesses to have turnkey compliance with CPRA, GDPR, and other privacy policy frameworks. With DataGrail Consent, we integrate with GTM using our no-code solution, controlling how scripts are loaded onto your page and serving the banner notice functionality directly to any site connected to that container.

This document is written for developers, expanding more on our integration with GTM, explaining how we work with Google Consent Mode (v2), and walking through how we create workspace versions within your GTM containers. Customers getting started with Consent and GTM can follow the step by step instructions here to deploy DataGrail Consent to their websites and apps using GTM. This document expands on how our integration works, as well as helps you with troubleshooting any issues that may come up during setup.

DataGrail Consent manages the consent settings for each tag within your Google Tag Manager containers, based on the categories assigned to each of the tags within the DataGrail app.

Upon connecting your container(s) to DataGrail Consent, DataGrail will retrieve tags created within the latest version of the container, which will allow you to categorize the tag within DataGrail and send this information as a consent check to Google.

DataGrail will also create a tag (specifically created as "Consent Banner Tag Template") within your container that includes the javascript code that powers DataGrail Consent, including the configurations necessary to set the appropriate Consent behavior based on the user's location and where that maps to the policies defined in the settings page.

Lastly, DataGrail will create additional variables in your GTM container for various pieces of functionality required for consent compliance.

When you have finished categorizing tags within DataGrail, along with configuring your banner text and policies, you can send this information to your GTM containers connected to websites/apps that you want to deploy our CMP.

After you select the action to review and update GTM, DataGrail Consent creates a new version of your GTM container(s) that include(s):

  1. The updates to Consent Settings for each tag as categorized within DataGrail
  2. The Consent Banner Tag Template that contains the javascript code that serves the banner notice and handles a data subject's consent choices.
  3. Additional variables required for DataGrail Consent functionality to support Universal Opt-Out Mechanisms (UooMs; the Global Privacy Control (GPC) and Do Not Track (DNT) signals).

In your DataGrail environment, you can choose if we create and publish the version (thus making it "live" on sites connected to the container), or simply create the version.

You'll see the version created by DataGrail within the versions of your container:

info

You'll see DataGrail Updates as latest, but not live, if you choose to only create a new version but not publish it. Note that "published by" is determined by the user that created the integration within DataGrail.

Creation without publishing is useful for customers who want to make additional changes to the container version in addition to the DataGrail changes before publishing it, either manually or as part of an external managed deployment process.

After creating the container version, you may also want to use the Tag Assistant tool (aka "preview mode") to test DataGrail consent on your website:

The Tag Assistant tool allows you to simulate the updated container version running on your site in a sandboxed environment, before publishing for live traffic visiting your sites connected to that container. For more information on the tag assistant, see here.

By default, DataGrail Consent adds checks to each tag based on the category specified within DataGrail, which inhibits the tag from firing based on the choice provided by your data subject (end user) from your site via the banner notice (or using a universal opt-out signal).

You can also enable Consent Mode support within DataGrail, which will adjust how we handle Google-owned services. Google Consent Mode describes functionality built into GTM that alters the behavior of Google owned services based on receiving a consent preference. The list of services that have built-in Consent checks are listed below:

  • Display & Video 360
  • Search Ads 360
  • Google Campaign Manager 360
  • Google Ads
  • Google Ads Remarketing
  • Google Ads Conversion Tracking
  • Google Analytics 4
  • Google Analytics
  • Conversion Linker
  • Doubleclick Ad (Note: this product is deprecated)
  • DoubleClick Floodlight (Note: this product is deprecated)
  • Google Campaign Manager (Note: this product is deprecated)

If you believe there is an additional tag that has built-in consent checks and is not on this list, please submit a support ticket for our team to review. Thank you!

If you enable Consent Mode support, DataGrail Consent will map the categories within your environment to these built-in consent types such that you can utilize these Consent Mode v2 features should a data subject reject tracking for categories that map to them.

DataGrail Consent will provide some default mappings, but you can update these mappings to consent types within the settings page.

Troubleshooting

Sometimes there can be issues with permissions or container configurations that interfere with DataGrail's ability to create managed container versions within your Google Tag Manager account. Here are some steps to troubleshoot the most common issues we've seen with customers:

Unexpectedly missing containers

After setting up your Google Tag Manager integration by logging in to your account, we retrieve all of the tags for all of the containers for which you have read access. You'll see the full list of containers that we retrieved tags from by clicking the manage containers button within the settings page:

Containers enabled via the list are those that are eligible for version creation and consent management by DataGrail. If a container is not within the list, you do not have read access to this container.

Container version creation or publish failed

After selecting to create or create & publish a container version to the containers selected, you will see the status of the process within DataGrail Consent:

DataGrail Consent creates updates for each container individually, which means you may only have an error at the end of the process on one of the containers. We usually provide the resulting error which can be for the following reasons:

  1. The account does not have publish rights for the container. While DataGrail Consent only requires read access to retrieve the tag information from GTM, you must have publish access for DataGrail to create our version updates within the respective containers. You can verify your permissions by container within GTM.
  2. The account has reached the limit of workspaces. Workspaces are staging areas to create versions within the container. DataGrail creates a temporary workspace to stage the updates before writing these as a new version. Free/Starter GTM accounts can have up to three workspaces, so be sure to delete extra workspaces that are not required before executing the creation process within DataGrail.
  3. API rate limiting. Rarely, DataGrail may not be able to complete the version creation process due to hitting a rate limit with Google. You can try the process again in a few minutes.

Region specific behavior issues in Server-Based GTM Implementations

If tags within GTM are not reflecting the correct consent type behavior as a result of the preferences sent by the data subject, it may be that the region-specific settings capability is not enabled in your server-side container implementation. You can enable the region specific settings feature in your Server-Side GTM setup using the "clients" tab, selecting the option to enable region-specific settings. By default, the variable {{Visitor Region}} will be populated, which is what DataGrail Consent needs to apply the correct behavior by region.

 

Need help?
If you have any questions, please reach out to your dedicated CSM or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.