Real-time testing Google Tag Manager rules with Google Analytics reports

Subscribe to our monthly newsletter to get the latest updates in your inbox

I was inspired by a discussion over on the Google Tag Manager forum to write up a method I've been using for testing Google Tag Manager rules in real-time. The method uses Google Analytics' real-time reporting feature paired with a specially formatted tracking hit fired into Google Analytics.

Video: Real-Time Testing Google Tag Manager

Here's a screencast of the method in practice that I put together.  Read below for the details to give it a try yourself. Unable to display content. Adobe Flash is required.

Example Code for Real-Time Testing GTM in Google Analytics

Here is the GA tracking hit format to use in your custom image tag. http://www.google-analytics.com/__utm.gif?utmwv=5.3.6&utms=2&utmhn=TESTING.GTM&utmcs=UTF-8&utmul=en-us&utmdt=TESTING%20GTM&utmr=-&utmac= UA-XXXXX-Y&utmcc=__utma%3D123456789.105662858.1349049600.1349049600.1349049600.1%3B%2B__utmz%3D123456789.1349049600.1.1.utmcsr%3Dgtm%7Cutmccn%3Dtesting%7Cutmcmd%3Dimg%3B&utmp=/GTM-TEST/&utmhid=12345 Also be sure to update the UA number highlighted above to a dedicated Web Property under your Ga account that you'll use ONLY for this testing, and enable the "cachebusting" feature and use "utmhid" as the parameter for it. Let me know your feedback in comments!  If you need help with testing or onboarding Google Tag Manager let us know - our team is here to help!