Step-by-Step: QA Your GTM Container with Preview and Debug Mode

Previously, I’ve showed you how to implement a basic Google Analytics page view tag, event tags, and outbound link tracking using Google Tag Manager. An important step prior to publishing any tag in GTM is to QA the tag prior to publishing. You can do this with the ‘Preview and Debug’ mode in GTM. This functionality can help ensure that your tags are firing correctly, as well as highlight any potential discrepancies in the tag setup prior to publishing to your production environment.

This is a quick process that you can accomplish in just a few steps:

Step 1:
Setup your tag. In this case, I’m testing a new pageview tag called ‘gaPageview Test’ on this blog, kristaseiden.com. You can see the tag and trigger setup here:

0ab46233-ff10-42b3-84e5-e234aba6a3fb
Step 2:
Once you’ve completed the tag you’re working on, you’ll want to go into the ‘Preview and Debug’ mode via the button in the upper left hand corner of the GTM interface

ab560a64-961a-442f-8fd7-588c95610c63

You’ll see the below notification across the top of your GTM interface when in Preview & Debug mode:

8acab051-b3bf-48ef-923e-4712ed12da97
Step 3:
Navigate to your live website. You should see the GTM debug pane at the bottom of your screen. In the Summary pane, it will show each of the tags that fired on page load (or other action you’ve taken), and those that did not. In this case, we see that my gaPageview Test tag did not fire as we expected it would.

086708cd-138c-4bd5-95d2-7d827fe3386d

 

Step 4: 
If tags are firing as expected, you’re good to go and can close out the preview mode, create a version and publish. If the tags are not firing as expected, as in this case, you’ll need to figure out what’s wrong.

When I created the trigger for this tag, I set it to ‘equal’ kristaseiden.com, however, I now realize that will mean if www.kristaseiden.com is loaded, this tag will not fire. To fix this, I’m going to change the trigger to ‘contains’ instead of equals, like this:

656085ba-de1c-4880-a54d-24875156bb03

Once I’ve made this update, I can re-test if the tag is firing using the Debug pane again:

e67a1b21-29fd-4cab-9503-f0cf14b8a098

Now this time I can see it’s firing as intended, which means it’s now time to publish!

There you have it, 4 easy steps to Preview & Debug a tag in GTM to ensure it’s firing as intended before you publish.

 

Posted by Krista Seiden in her own words, not on behalf of her employer

Leave a Reply

Next ArticleChina