How to set Google Tag Manager after Consent (and is it needed?)

Get compliant today in the European Union, United States, Canada, United Kingdom, Australia, Brazil & South Africa with the only Privacy Suite for WordPress that offers a fully-featured plugin for Worldwide Compliance.

Complianz is investigating, just like we did with Google Fonts and reCAPTCHA, what happens when an empty container of Google Tag Manager is loaded prior to consent and how Google processes this data. Our starting point is the below statement from Google regarding Tag Manager specifically. When our investigation ends, you will find a notification in our plugin.

In order to monitor system stability and performance, Google Tag Manager may collect some aggregated data about tag firing. This data does not include user IP addresses or any user-specific identifiers that could be associated with a particular individual. Other than data in standard HTTP request logs, all of which is deleted within 14 days of being received, Google Tag Manager does not collect, retain, or share any information about visitors to our customers’ properties, including page URLs visited. Source Tag Manager Help

A much referenced article by: Klaus Meffert, Dr. GDPR blog, link: is also considered during this process. The main question derived here is; does a cookie-free domain constitute the necessity to stay cookie-free, or is it possible to enable a hybrid option whereby cookies are set when consented services in the container are fired, not by Tag Manager itself, but the services it delivers. If so, this opens an interesting discussion about data processing and Google’s own underlying structure with Consent Mode.

You will find a full write-up soon. If you want to fire Tag Manager only on consent, please see below quick guide.

Loading Google Tag Manager after Consent

This will only take 2 minutes. You will need to change an answer in the wizard and add the Tag Manager snippet below:

1. Do not allow Complianz to set Tag Manager

In the wizard, under Consent – Statistics, please acknowledge the use of Google Tag Manager. Proceed to Statistics – Configuration and answer the following question as shown below:

2. Add the Google Tag Manager snippet

Add the Google Tag Manager snippet with these attributes:

  • type=”text/plain” -> This will block Tag Manager prior to consent
  • data-category=”statistics” -> This will release Tag Manager

We recommend, contrary to Google, to set it in the footer.php of your child’s theme or with a plugin like Header Footer Code Manager. And that’s it.

					<!-- Google Tag Manager with Consent -->
<script type="text/plain" data-category="statistics">
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager with Consent-->

Recent articles


You can also directly download the demo container with triggers and variables/ Please make sure you know how to import a container.


Google Consent Mode

You can now enable Google Consent Mode for Tag Manager. How it works, and what you need to configure can be found here.

Client Demo

We have a client demo where we have prepared custom events and the most common tags. If you want access for inspiration, please contact support. You will need a Google Account to get access.

Other articles

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!