If you see self referrals appearing in your Acquisition reports in Google Analytics, or if you are performing a Google Analytics implementation audit, one of the first steps is to make sure that the Google Analytics Tracking Code (GATC) is present on all pages – Screaming Frog will help you do that fast and easy.
In this post, I’ll show you a step-by-step guide for checking your website for pages that don’t have the GATC installed or don’t have the Google Tag Manager snippet present.
I thought Screaming Frog was for SEO?
Well, yes. The Screaming Frog SEO Spider is a desktop app built for crawling and analysing websites from a SEO perspective. But some of it’s functionalities – like crawling sites for user-defined text strings – are actually great for auditing Google Analytics as well.
The basic principle simply involves telling Screaming Frog to crawl all pages of a website and in the process look for the presence of the Google Analytics Tracking Code. The output of such a crawl will be a list of pages on your website that are missing the code – effectively telling you where you should add it in order to avoid self referrals (and to ensure that all pages are tracked).
The Google Analytics Crawler Guide
Start by downloading and installing the Screaming Frog SEO Spider. It’s available for Mac, PC and Linux. The free version will let you crawl up to 500 pages on your website. So if you have more pages than that, you should invest in the paid version (99 GBP) – which is cheap considering the number of hours you’ll save checking your site manually.
1. Configure Screaming Frog
Start by opening up the Custom Search dialogue in Screaming Frog from the menu bar:
2. Enter your Google Analytics tracking ID
This will open up the Custom Search dialogue. Make sure to clear all fields by clicking the “Clear All Filters” button before proceeding.
Next, change the dropdown for Filter 1 to “Does Not Contain”. This will make sure that we just get a list of all pages missing the tracking code – and not a list of all pages with the code.
In the text field immediately to the right of the Filter 1 dropdown, enter your Google Analytics Tracking Code ID. If you’re not sure what your ID is, then log on to your Google Analytics account, go to Admin, click Tracking Info under your Property and click on Tracking Code. There’s your Tracking ID.
The Custom Search dialogue should now look like this (except, it’ll be *your* tracking ID):
Note! If your GATC is implemented through Google Tag Manager, you should enter your GTM Container ID instead of the Google Analytics Tracking ID.
Now, click OK.
3. Start crawling
All there’s left is to tell Screaming Frog which website to crawl and then do the actual crawl.
Simply enter the address of your website in the address bar:
…and then hit the Start button. Screaming Frog will now crawl all pages on your website. With the exception of those pages that are not being linked to from any other page. The app is a crawler, which basically means that it will follow all internal links. So if you have pages that are not being linked to from other pages, they won’t be crawled.
That’s it! As the crawl progresses, you’ll be able to see the full URLs of the pages where your tracking code is missing. Your next step is obviously to add the tracking code to those pages (duh!).
Bonus: Check for self referrals with a custom report
Another quick and dirty approach to checking your Google Analytics property for self referrals is to use a Custom Report.
Simply log on to your Google Analytics account, select a view which you want to examine (preferably an unfiltered view) and follow these steps:
- Go to the Customization tab
- Click the button +New Custom Report
- Name the report Self Referrals
- Just select Pageviews as a single metric
- Select Full Referrer as the single dimension
- Add one filter with Full Referrer as the dimension
- Set the filter match expression to Regex
- Enter your domain name in the filter search field (e.g. yourdomain.com) without the http part
- Click Save
This will give you a list of all pages that are likely missing the GATC.