Brian Norman
Brian Norman

Reputation: 564

GTM Blocking Trigger Not Working

I have a blocking trigger set up on a GTM tag that should prevent the tag from firing in a non-production environment. The trigger is set up to fire only when the page hostname contains a string unique to the dev/staging environment URLs.

As you can see in step 2 of the GTM summary, I set up a test tag (green box) to confirm that the trigger is firing prior to the tag containing the trigger exception (red boxes). enter image description here

Step 3 is a custom event firing from the dataLayer. The green box tag is the tag that I want to fire in a non-production environment and the red box tag is the tag containing the blocking trigger which I would expect to prevent the tag from firing. enter image description here

Here is a look inside of the red box tag that should not fire. You can see that the blocking trigger recognizes the dev/stage URL but for some reason the _event is showing a red X.
enter image description here

Any insight is greatly appreciated!

Upvotes: 8

Views: 5231

Answers (1)

Brian Norman
Brian Norman

Reputation: 564

It turns out that the blocking trigger wasn't working because the tag had two different trigger types. The blocking trigger was a page view type and once while the normal trigger was a custom event. To fix the issue, I changed my blocking trigger to fire on the same custom event as the firing trigger.

Upvotes: 10

Related Questions