Use Screaming Frog to Verify Google Analytics Code
The paid version of Screaming Frog is a lifesaver! I use Screaming Frog regularly to make sure the correct Google Analytics code is in place on every page of a website. Just because the code is in place on the homepage doesn’t mean the same code is on every page. Some pages could be totally missing the code while others could have different versions. Posting my quick process here since I get asked about this frequently… and since I’m talking about this today at the SEOmoz Meetup at the Search Church!
Start by selecting Custom Filters under Configuration.
Determine what you want to search for in the filters. I usually have one filter showing pages that do contain information I’m looking for then pages that don’t contain it.For example, filters 1 and 2 will usually be pages that do or don’t contain the UA number.
For the example below, I used SEER’s UA: UA-11852503-1.
If a site uses cross domain tracking because it spans multiple domains or subdomains, grab the line of code for cross domain tracking and drop it into filters 3 and 4. Make one filter Contains and the other filter Does Not Contain.
For the example below, I used setDomainName’, ‘seerinteractive.com.
For filter 5, try adding a snippet from the second portion of the GA code. I’ve been surprised by the number of sites that drop off the second portion and keep only the top part of the code.
For the example below, I used google-analytics.com/ga.js.
Once the settings are all in place, enter the URL in Screaming Frog and hit Start.
From there, go to the Custom tab. The data that shows up will be for any of your filters. You can quickly scan the filter data for issues, or can export data from each of the filters to a CSV for further analysis or to send to the client.
If you’re running Screaming Frog on a client’s site, give them a heads up first. Without that warning, someone may see the tool hitting their site quickly and think there is an issue.
Let me know if you use Screaming Frog to check for GA code too, or if you have other methods you currently use.
Quick update: Adding a well deserved shout out to Will Critchlow. Even though I wasn’t at Will’s Search Love presentation last October, I checked out the slides. They were so full of win. Slide 32 had the image of how Will’s team uses Distilled to confirm the presence of GA code, which got me to start looking at Screaming Frog and how to take that concept further. Will, Distilled team, etc, thank you!!