Using Screaming Frog for Google Tag Manager Implementation
Spencer Mayes • May 10, 2017 • 2 minutes to readAs an agency MKG has audited a number of client’s Google Analytics accounts. With so many different ways to set up tracking in Google Tag Manager this can seem like a daunting task, but with the right tools it can be easy! Today I will walk through using Screaming Frog to check for GTM tags and ensure that any Google Tag Manager triggers are set up with “unique” variables so you are not inadvertently firing tags for buttons or links you don’t want to track.
For example, one of our clients had a trigger and tag that fired on the rule “click_url” contains “mailto:” I could tell that many of the forms went to a support email address, but wasn’t 100% sure if there were any forms that would actually generate leads. In order to check I used Screaming Frog’s Seo Spider tool.
- Open Screaming Frog
- In the top menu go to Configuration” > Custom > Extraction
- In the “Extractor 1” field I used XPath and put in the simple command“//a[starts-with(@href, 'mailto')]”
- Click “ok” and start the crawl, Screaming Frog will now crawl the site and provide all the email address links on the site in the “extractor 1 column"
A similar XPath string can also be used to identify which pages have Google Tag Manager or Google Analytics tracking on them and if there are multiple account_ids on the site.
UA- for analytics or GTM- for Google Tag Manager
You can also extract using regex to answer simple questions like “is this click_id on multiple pages”?
To do so go to the same configuration field, but choose regex and enter your command. If you’re looking for an exact click_id like “submit_button_2” then no fancy code is needed. Just enter “submit button_2” and Screaming Frog will show you what pages have that click_id so you can check to make sure you’re tracking the correct click or form submission.
Screaming Frog’s support page also has more commands and tips on using their tool for Google Tag Manager and Analytics applications.