Improve your tag loads with Trigger Groups in Google Tag Manager

Tracking users and using cookies has changed since the introduction of GDPR. To be compliant with GDPR, websites must ask users for consent. Some tags fire at the first page of a visit. This may have impact on your tag loads, since the user decides to give consent after the page has loaded. This article explains how to configure your tag in order to fire immediately after the user has given consent.

Occurrence of this problem

As an example I am using a Google Ads tag. The trigger of the tag is set to fire on a pageview on all pages. The tag is blocked when there is no consent. We assume that the user who visits the website and has not made a choice about consent yet.

When the users visits the landing page of a website, the pageview trigger will fire. When the consumer accepts the cookie banner, the Google Ads tag should fire, as there is consent. But in the current setup, it won’t.

I will briefly explain the cause of this matter. The tag failed when trying to fire on the first pageview. The next time it fires will be when a new pageview is initiated. Since no new pageview is initiated by accepting cookies, the tag will not fire.

How do we tackle this?

We can create a ‘delay’ in triggering the pageview so that it waits until a choice about consent is made. The following steps show how this is done.

  1. Create a Trigger Group.
  2. Add the trigger of the tag that you want to fire to the Trigger Group.
  3. Add a trigger that checks for consent to the Trigger Group. We generally use a trigger that checks consent for any event (RegEx .*). In order for this to work, you do need a data layer event that occurs at the moment of consent.

4. Configure your tag with the Trigger Group as Firing Trigger. You can still include a blocking rule for any event without consent as Exception.

Improved tag loads

In this post the visit tag is used as an example. But can you hear the fantastic news coming? This type of configuration can be used for all types of conversions. The earlier in the funnel it is applied, the bigger the impact of a tag (not) loading on a landing page might be. The issue belittles once you are deeper in the funnel. Hopefully you enjoyed reading this article.

Happy accurate tracking!

Leave a Reply