[Performance] Testing Your Shiny New Tag

The proof is in the preview

That’s it dear reader! You’re all done! But before you submit your changes and send them out into the wild, it’s probably a good idea to test what you’ve created and make sure that everything is behaving as expected.

Enter Preview Mode. Google Tag Manager provides you the ability to test your tags, triggers and variables by loading your unpublished container, locally, within your browser. This feature allows you to test your setup and ensure that everything is working as expected and you haven’t inadvertently broken anything on your site, or made a mistake anywhere.

Let's hit the preview button in the top right corner.


Once we do, Tag Manager will ask us to provide a URL when our container is installed and load an instance of that page with our current Tag Manager setup injected into the page. You will also notice that a new Tag Assistant Tab will open.

Think of the Tag Assistant as an itemized recipient for each interaction we have while testing our sight. You will see a summary on the left hand side that tracks all the interactions as they take place, and in the main window you will see a list of all your tags. On top, those that have fired, and below those that have yet to be triggered.


If we navigate to our page that GTM opened up for us and begin to scroll down the page, we should start to see Scroll Depth Events appearing in the Summary as we hit the thresholds we defined (10%, 25%, 50%, 75%, 90%).


If you then click on one of those Scroll Depth Events you will be able to examine that particular interaction more closely. By default, the “Tags” tab will display all the tags that fired when that interaction occurred


I encourage you to take a look at the other tabs available, especially the “Variables” tabs as variables play a critical role in defining our triggers as well as sending data to Funnelytics, but alas this is a topic for another time.

So! As we can see from the above image it has not been a pack of lies that I’ve been feeding you. We can see that as we scroll through our page, our newly created Scroll Tag is firing as we reach the predetermined scroll depth thresholds!


However, what we don’t know is whether or not that tag is sending data to Funnelytics. 


Follow me, friend! Back to our site! Let's open up the developer tools and take a peek under the hood.

Head back to the instance of your site that Tag Manager opened for you and open up the dev tools (right click and select inspect OR press CTRL + Shift + I on a PC OR CMD + Shift + I on a piece of MAC).

Once the dev tools are open, select the Network tabs and in the filters text box, enter the work “trigger”

 


Now as you scroll through the page, you should see a list of trigger event appearing in the network activity pane, each with a status of 200


200 is Good! Pretty much anything else is bad! If you do see something other than 200, or you want to investigate what data is being sent to Funnelytics, click on one of the triggers and select the “payload” tab.


To the untrained eye the data looks like a string of nonsense, but if you look more closely, towards the end of the payload, you will see the Action Name that you defined, as well as the attributes you chose to associate with your Action.


If you do see that your trigger has failed, this is the first place your going to want to look to check for any unusual characters in the name or attributes.


And that’s it! That’s how the sausage is made! Now of course this is only the tip of the iceberg and in truth, our expectation is not to have you walk away a GTM expert, but rather to provide you with enough information to be dangerous. To be able to communicate with whomever may be administering your Analytics Tags and to be able to begin to investigate your setup should you so desire!