Creating your own Google Analytics Tag Auditing System

Tag auditing is used to identify various tags (tag is a piece of JavaScript code) on a website for the purpose of:

#1 Upgrading from Classic Google Analytics to Universal Analytics

#2 Migrating Classic / Universal Analytics tags & configurations to Google Tag Manager.

#3 Debugging various Google Analytics tracking code issues

#4 Identifying and removing tags which no longer serve the purpose and should be removed in order to clean the website code.

#5 Migrating non google tags (like Facebook tags, Omniture tags) to Google Tag manager.

In tag auditing we identify all the tags currently being deployed on a website.

It doesn’t matter whether these tags fire or not.

They need to be identified and then updated, migrated or removed.

There are 3 methods through which you can identify various tags on a website:

  1. Tag auditing tools
  2. Manually
  3. Website scraper tools

Tag Auditing Tools

There are various free and paid tag auditing tools available in the market.

The one which I frequently use are:

  1. Google Tag Assistant
  2. Ghostery
google tag assistant

Google Tag Assistant

Google Tag Assistant is a chrome extension through which you can identify and validate the implementation of various Google Tags fired on a web page.

However, there are three shortcomings of Google Tag Assistant:

#1 It can’t identify and validate tags across a website.

#2 It doesn’t work for non google tags

#3 It can’t identify tags which don’t fire (as they are either broken or waiting for an event to occur first)



Ghostery is a chrome extension through which you can identify all the tags (both google and non google) which fire on a web page.

This extension also let you block tags which could be useful in debugging tracking issues:

Ghostery blocking tags

Just like Google Tag Assistant, it has its own shortcomings:

#1 It can’t identify tags across a website.

#2 It can’t identify tags which don’t fire (as they are either broken or waiting for an event to occur first)

Get the E-Book (37 Pages)

Learn to read e-commerce reports book banner

Get the E-Book (104 Pages)

Manual Tag Auditing

I manually search for a tag on a web page if its not picked up by Google Tag Assistant or Ghostery.

Generally this happen when a tag is broken and thus can not be fired on page load.

For example if your GTM container code is broken (may be due to formatting issues) then it won’t be picked up by Google Tag Assistant.

In that case you look into the source code of the page, search for ‘gtm.js’ file to find the location of GTM container code and determine what is wrong with the code.

I also do manual tag auditing while diagnosing ecommerce tracking issues.

Generally ecommerce tracking code is placed on order confirmation page which can not be accessed directly through any third party tag auditing tool or website scraper.

In fact any web page which is hidden behind a login or some sort of authentication system can not be scanned by any third party tool and manual auditing is required.

Website Scraper Tools

Website scraper tools like Screaming Frog SEO spider can be used to identify tags across a website of any size.

I use screaming frog for tag auditing and for diagnosing tracking issues.

Don’t be fooled by its name. It is much more than a SEO tool.

It is a powerful website crawler through which you can identify any piece of code (and its occurrences) across a website of any size and it is not very expensive either.

There are other better alternatives to screaming frog, when it comes to tag auditing but they will cost you thousands of dollars a year, a price not many are ready to pay.

Also no paid tag auditing tool I know is able to audit Google Analytics tags the way I am going to show you, in the next few minutes.

My tag auditing system will help you in identifying different types of Google Analytics trackings installed on a website like:

  • Event Tracking
  • Cross domain tracking
  • Social Interactions tracking
  • User ID
  • Custom dimensions
  • Custom metrics
  • and many more

Through my tag auditing system, you can:

#1 Identify the pages where GA/GTM tags are found.

#2 Identify the pages where GA/GTM tags are not found.

#3 Identify the pages where data layers are found or not found.

#4 Identify any tag whether it was fired or not.

#5 Identify old GA configurations, the one which are based on Classic GA traditional syntax or even older urchin syntax.

#6 Identify non google tags and their location.

#7 Identify any type of GA tracking

#8 Scan any number and type of tags and technologies used on a website.

Custom Google Analytics Tag Auditing System

Let us suppose you want to audit your website for following tags and technologies:

  1. Universal Analytics Tracking Code
  2. Classic Google Analytics Configuration
  3. Universal Analytics Cross domain Auto linking
  4. Universal Analytics event tracking
  5. Facebook Custom Audience

You want to scan your website to find the pages which contain or do not contain these tags.

To do this follow the steps below:

Step-1: Open Screaming Frog SEO Spider tool and then go to Configuration > Spider:

Screaming frog configuration spider

Step-2: Uncheck following check boxes to speed up your crawl:

spider configuration

  1. Check images
  2. Check CSS
  3. Check JavaScript
  4. Check SWF
  5. Check External Links

By unchecking these checkboxes you will greatly reduce the crawling time esp. if your website has got hundred thousands web pages.

Step-3: Go to Configuration menu and click on ‘Custom’:

custom menu

Step-4: Set up following Custom Filters:

custom filter configuration

Note: The search strings (like analytis.js) that I have selected to find particular tags are based on the special characters which Screaming Frog SEO Spider can detect.

I am using the latest version of this crawler which is 3.3 and this version supports following special characters:

  1. = (equals to)
  2. / (slash)
  3. . (dot)
  4. – (dash)
  5. : (colon)
  6. ‘ (single quotation mark)

Screaming frog is not able to detect strings which contain any of the following special characters:

  1. _ (underscore)
  2. ( (parentheses)
  3. [ (bracket)
  4. ? (question mark)

Step-4: Now start the crawl and once the crawl is finished, click on the Custom tab on the right hand side:

custom tab

Under the ‘Filter’ drop down menu, you can see all the filters you setup before starting the crawl.

Select one of the filters from the drop down menu.

You can now filter out all those web pages which contain or do not contain your specified tags.

You can then download the list into excel by clicking on the ‘Export’ button and then update / remove the tag code from a page. 

Following is the list of tags along with their search string for easy reference:

Classic Google Analytics Tags

Tag Search String
1 GA traditional Tracking Code getTracker
2 GA asynchronous Tracking Code ga.js
3 Classic GA configurations gaq.push
4 Custom Variables setCustomVar
5 Traditional GA configuration pageTracker
6 Classic GA Ecommerce Tracking addTrans
7 GA Local currency setup currencyCode
8 GA Event Tracking trackEvent
9 Google Analytics Content Experiments //
10 GA Cross domain tracking – Traditional pageTracker._setDomainName (won’t work in screaming frog)
11 GA Cross domain tracking – Asynchronous setDomainName
12 GA Search Engine Configuration addOrganic
13 GA Session Timeout Configuration setSessionCookieTimeout
14 GA Campaigns Timeout Configuration setCampaignCookieTimeout
15 GA Referral exclusion Configuration addIgnoredRef
16 GA Search Terms exclusion Configuration addIgnoredOrganic
17 GA Social Interactions Tracking trackSocial
18 GA User Timings trackTiming
19 GA Enhanced link attribution pluginUrl
20 GA Content Group setPageGroup
21 Obsolete Google Analytics urchin.js

Universal Analytics Tags

Tag Search String
1 Universal Analytics Tracking Code analytics.js
2 UA Cookie Name Customization cookieDomain
3 UA Enhanced Link Attribution linkid.js
4 UA App / Screen Tracking screenview


5 UA Cross Domain Tracking linkerParam
6 UA Cross Domain Auto Linking ‘require’, ‘linker’
7 Client ID clientId
8 Custom dimensions ‘dimension1′
9 Custom metric ‘metric1’
10 UA Advertising/Display Features ‘require’, ‘displayfeatures’
11 Multiple Trackers .send’, ‘pageview’
12 UA Ecommerce Tracking ‘require’, ‘ecommerce’
13 Enhanced Ecommerce Tracking ‘require’, ‘ec’
14 UA Event Tracking ‘send’, ‘event’
15 Exceptions Tracking ‘send’, ‘exception’
16 UA Plugins ‘require’,
17 UA Social Interactions ‘send’, ‘social’
18 User ID ‘userId’:
19 UA User Timings ‘send’, ‘timing’
20 UA Content Group ‘set’, ‘contentGroup

Other marketing Tags

Tag Search String
1 Google Adwords Remarketing var google_remarketing_only = true (won’t work in screaming frog)
2 Google Adwords Conversion Tracking var google_remarketing_only = false (won’t work in screaming frog)
3 Crazy Egg
4 Kissmetrics //
5 Inspectlet //
6 Facebook Conversion Tracking Facebook Conversion Code
7 Facebook Custom Audience ‘addPixelId’
8 Mix Panel
9 Optimizely
10 Google Tag Manager gtm.js
11 GTM Data Layer dataLayer.push

var dataLayer

12 Adobe Site Catalyst assets.adobedtm
13 AdRoll

Other article you will find useful: Cross domain tracking in Google Tag Manager

Other Articles on Specialised Tracking in Google Analytics

  1. Google Analytics Recurring Revenue and Subscriptions Tracking Guide
  2. How to track the impact of cookie consent on website traffic in Google Analytics
  3. Phone Call Tracking in Google Analytics and Beyond
  4. Scroll Tracking via Scroll Depth Trigger in Google Tag Manager
  5. Video Tracking via YouTube Video Trigger In Google Tag Manager
  6. Calculated Metrics in Google Analytics – Complete Guide
  7. The one thing that you don’t know about and the referral exclusion list
  8. Introduction to Postbacks in Google Analytics
  9. Creating Content Group in Google Analytics via tracking code using gtag.js
  10. Tracking Site Search without Query Parameter in Google Tag Manager
  11. Setting Up Site Search Tracking for POST based search engines in Google Analytics
  12. Tracking Site Search for GET-Based Search Engines in Google Analytics
  13. Understanding site search tracking in Google Analytics
  14. Tracking Virtual Pageviews in Google Tag Manager – Complete Guide
  15. Creating and using Site Search Funnel in Google Analytics
  16. Learn to Setup Facebook Pixel Tracking via Google Tag Manager
  17. How to use Keyword Hero to reveal Not Provided keywords in Google Analytics
  18. Guide to Event Tracking via Google Tag Manager
  19. Learn to track Qualified and Won leads in Google Analytics
  20. Creating your own Google Analytics Tag Auditing System
  21. Using multiple Google Analytics tracking codes on web pages
  22. Guide to Offline Conversion Tracking in Google Analytics
  23. Google Analytics and YouTube Integration Guide
  24. Complete Guide to Google Analytics for Facebook
  25. Tracking true referrals in Google Analytics when using PayPal and other payment gateways
  26. Virtual pageviews in Google Analytics – Complete Guide
  27. YouTube Video tracking via Google Tag Manager
  28. Implementing E-Commerce Tracking via Google Tag Manager
  29. Event Tracking in Google Analytics – Complete Guide
  30. E-Commerce Tracking in Google Analytics – Complete Guide
  31. Google Analytics Cross Domain Tracking Explained Like Never Before
  32. Google Analytics Social Tracking – Twitter, Facebook, Google Plus and LinkedIn
  33. Setting up & Tracking AMP Pages in Google Analytics
  34. Setting up Sales Funnel across websites in Google Analytics
  35. Using Data Visualization to analyze the SEO Performance
  36. Tracking offline conversions in Google Adwords
  37. How to Correctly Measure Conversion Date & Time in Google Analytics
  38. Tracking Twitter and Linkedin Social Interactions in Google Analytics
  39. Implementing Scroll Tracking via Google Tag Manager
  40. Phone Call Tracking and ROI calculations – Champion’s Guide
  41. Google Analytics Cross Domain Tracking (ga.js)
  42. Open Graph Protocol for Facebook Explained with Examples

Learn about the Google Analytics Usage Trends Tool

The Google Analytics usage trend is a new tool which is used to visualise trends in your Google Analytics data and to perform trend analysis.

Do you want to Learn Web Analytics in 8 Weeks?

  • Learn and Master Web Analytics, Conversion Optimization & Google Analytics from Industry Expert in 8 weeks.
  • Lifetime access to the course + Lifelong FREE course updates.
  • New study material added every few months (lifelong learning).
  • Up to date training material.
  • Most exhaustive course on Google Analytics on the internet.
  • Hundreds of Assessments to test your learning.
  • Your 24/7, 365 days a year reference source.
  • Learn at your own pace and from any place.

Take your Analytics knowledge to the next level. Checkout my Best Selling Books on Amazon

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Himanshu Sharma

Certified web analyst and founder of

My name is Himanshu Sharma and I help businesses find and fix their Google Analytics and conversion issues. If you have any questions or comments please contact me.

  • Over eleven years' experience in SEO, PPC and web analytics
  • Google Analytics certified
  • Google AdWords certified
  • Nominated for Digital Analytics Association Award for Excellence
  • Bachelors degree in Internet Science
  • Founder of and

I am also the author of three books:

error: Alert: Content is protected !!