Google’s Tag Assistant plugin is an indispensable tool for troubleshooting various Google tags like Google Analytics, Google AdWords, and Google Tag Manager; just install and navigate to your site to enable checks for nearly 300 possible issues. This post will describe how to fix of one of the most common issues reported by this plugin: “Same web property ID is tracked twice.”
Same web property ID is tracked twice simply means that you have the Google Analytics tracking script on your page more than once, with the same tracking ID. This means every page load fires off two or more instances of the GA code, and will cause metrics like page views and bounce rate to be incorrect. Where are these multiple tracking scripts coming from? Read on:
#1. TRACKING CODE ON PAGE AND WITHIN GOOGLE TAG MANAGER
Google Analytics provides a tracking code script that can be directly entered onto your website. Alternately, you can fire Google Analytics from within Google Tag Manager. Google Tag Manager is a container for other tags, so you should only use one of these implementation methods, not both.
To check if you’re using GA and GA-from-within-GTM at the same time, it’s best to install another Chrome add-on, the Google Analytics Debugger. Once it’s installed, do the following:
- Click the add-on icon in the Chrome toolbar to ensure that it says “GA Debug: ON”
- Navigate to your site
- Open Developer Tools in Chrome (Press F12 on Windows or Cmd + Opt + I on Mac), and click the Console tab
- [optional] Type “pageview” into the filter bar at the top. This isn’t necessary, but it makes the output easier to read
- Check for multiple versions of the “send pageview” call to Google Analytics, with and without the “gtm” preface.
- If you see multiple calls with the same UA number, with and without the “gtm” preface, it means you have implemented GA both directly on the page and through GTM.
- Remove one of these versions so that you are only firing GA from a single location.
#2. TRACKING CODE ON PAGE AND FROM WORDPRESS PLUGIN
WordPress enables you to install Google Analytics tracking in many ways. The method from #1 can be a starting point to verify if you have multiple instances of the tracking code, but it won’t necessarily identify where this code is being fired from. To check this you will need to review each place where GA code can be inserted using WordPress:
a) Google Analytics plugins. In WordPress, navigate to Plugins > Installed Plugins and see if there are any Google Analytics plugins in the list.
b) Google Tag Manager plugins. As above, navigate to Plugins > Installed Plugins and see if there are any Google Tag Manager plugins in the list. If so, check the settings or log into your Tag Manager account to look for a GA tag.
c) directly in of the theme templates (usually located at Appearance > Editor > header.php). Open up your theme’s files and search for GA or GTM code to see if it has been directly inserted here.
d) a custom option within a theme. Some themes have an option to directly enter a GA ID. Review your theme’s settings to see if this is the case.
#3. OLD AND NEW GA TRACKING CODE SCRIPTS AT THE SAME TIME
Google Analytics regularly releases new versions of the tracking code, from Urchin (urchin.js) to Classic (ga.js) to Universal (analytics.js) to the new Global Site Tag (gtag.js). When the new tracking code is released, many users update their websites with the new version, neglecting to remove the old version first.
If you’re using different versions of the same code, Google’s Tag Assistant plugin will show all versions like this:
If you see more than one Google Analytics tag listed here, with identical UA IDs, that means you have multiple tags firing. To find out the version, you can click on the item to view metadata on whether the Code Version/Syntax is Universal or Asynchronous.
Remove all but one of the versions if you have this problem. Typically you should leave the version served through a tag manager, or the most recent version (currently gtag.js).
If you’re still not sure where these extra tracking scripts are coming from, there’s another option to try.
- Open Developer Tools in Chrome (Press F12 on Windows or Cmd + Opt + I on Mac)
- click Ctrl+Shift+F
- In the search box that appears, type in your UA tracking ID.
- In the bottom panel, a list of code snippets containing this tracking ID will appear. You can click each one to be taken to the location in your code. It won’t necessarily surface all your GA code if it’s bundled into another container, but it may help.In this example, I first loaded a Google Analytics plugin onto my site, then found it by searching as described here.