Audit This – Why It Matters Where You Put The Google Analytics Tracking Code

Audit This – Why It Matters Where You Put The Google Analytics Tracking Code

This is the first in (hopefully, what will become) a series of posts, where I focus on various items in our massive diagnostic checklist that we use for auditing Google Analytics and Google Tag Manager implementations for problems and for finding opportunities.

  • Ever have someone say to you: “There’s no way your website’s Bounce Rate is below 10%.”
  • How about: “I don’t believe their data because it’s half what my Google Analytics says.”

These are red flags that you have some pretty big core tracking code problems with your Google Analytics.  And in this case, it could boil down to something as simple as placing your tracking code in the wrong place on your website.

One of the first things we usually do with a new Analytics client at Seer is to figure out if there is anything wrong with their data. We check out hundreds of ways your data can be messed up. The first focus when a client uses Google Analytics (GA), is to look at how GA and Google Tag Manager (GTM) are implemented on their main website.

Here’s Item 4 from our Google Analytics and Tag Manager Diagnostic Checklist:

  • ”Google Analytics, On-Page, Code Placement – Evaluate whether GA is the correct code in the correct place.”

This is stupid important.

The last time we went through an audit with a new Associate, I realized how terrible this checklist item is. How loaded is “the correct code in the correct place”? (Hint: super loaded)

Here are some things that can happen to your data if you don’t have the correct code in the correct place:

  • Double or Triple Tracking… or worse
    This is when  you are firing multiple “hits” to Google Analytics on every page load. Essentially, this makes your audience look seriously engaged with a super low bounce rate, a high pages per session, and lots and lots of pageviews. It makes you think your site is so much better than it really is, and if you are looking at pageviews instead of users, you might think that you are getting tons more traffic than you actually are.
  • Half Tracking… or worse
    If your code is wrong or in the wrong place, it can not fire all the time — or not fire at all. It could get delayed by other bad code on your page that takes too long and hangs up everything on the page (like a bad 3rd party vendor tag you’ve put on your site and is slowing down your page load), or it could error out and not record anything at all.
  • Wrong Tracking… it’s already worse…
    Related to the above, you could have “the right” code, but if it’s in the wrong place, it could send the wrong information. Maybe it’s bad information about the page itself, or maybe it’s ecommerce transaction information. If you put the code on the page incorrectly, it’ll screw up your conversions.

Those are just a few of the issues you can run into if your code is wrong or in the wrong place.

I mean, this is the core tracking code for your digital experience — and for many companies and organizations this might be the ONLY data that you OWN. It has to be as correct as you can make it.

What are some mistakes you can make if you’re not aware that your data is incorrect?

  • Incorrect Attribution
    Everyone loves proper attribution, right? Hey! Guess what can happen if you have bad code and/or bad code placement on your site? You can destroy your attribution. With the right combination, you can (usually with multiple trackers) destroy your session and referral information. Then, when someone lands on your site (say from a paid ad, or organic visit) they, at best, stay clocked in as the same user but with a different referral for last click attribution, or they become a completely new direct user with zero history with your site. In the one case, you can still assign some value from Multi Channel Funnels and Assisted Conversions, but with the latter, all your work getting that user to your site is unattributable.
  • User Bloat
    If you do it just right (i.e. wrong) you can make it look like every user is more than a single user. “Hurray! We doubled our users with the new website!” (*cough* by improperly tracking them each as two people *cough*) As you can imagine, it’s not a good idea to use these  numbers. Because when you realize that you have been doing it wrong, you’re going to have to rip the Bandaid and cut your users in half. Then you’ll have to explain why your numbers are 50% lower than the expectations you set last quarter.
  • User Engagement Lies
    If you are selectively incorrectly tracking parts of your site, you can get a heavily skewed view on your site. For instance, say you had a new blog manager who started publishing new content and it was super heavily engaged. The old content bounced at 98% but this new content was bouncing at 4%. So, what’s the deal? Do you have a great new blog manager writing great content, or a bad new blog manager who added new tracking code to the new blog pages, but forgot to remove the old code? It makes a difference.

So, what would I look at, as of early 2017, and call it correct? I would ask:

  • “Is there a technically correct Google Tag Manager implementation on the page, and the Google Analytics “Universal” Code being delivered via Google Tag Manager…. And nothing else?”

Here’s the Google Tag Manager code instructions:

That pretty much should be the only code on the page. That and related JavaScript and DataLayer objects ( are ok, but the important part for this is that there is NO OTHER GOOGLE ANALYTICS CODE ON THE PAGE, either for firing Pageviews or Events. None. Zero. Zip.

Maybe the most common problem is to have Google Tag Manager on your site working correctly, but you also have some older “Classic” Google Analytics code that’s still firing to your account and property, giving you double tracking.

Once you get into what should belong in the DataLayer and what should be on the Google Analytics tag firing from Google Tag Manager, you’re opening up a huge can of worms. However, at the very least, the “Correct” code would be Google’s Universal Analytics tag firing most likely to All Pages from within Google Tag Manager. In this scenario, when I look at the code on the page via Google Tag Assistant (, I am only seeing your Google Tag Manager container, and Google Analytics Pageview (being delivered via the Container). Yes, you can have multiple pageviews firing to different Google Analytics properties — and maybe you even have a good reason to do that — but you shouldn’t be firing a pageview to the same Google Analytics property (shown by using the same I.D. like UA-12345-1 multiple times). Things can get complicated… But that part generally won’t change.

Using the correct tracking code is paramount. Without good base tracking, everything else might be crap and you won’t know it. That’ll lead you to making bad decisions and embarrassing yourself in front of your boss, customer, or client.

It’s so much more than “Put this code there.”

It’s “If you don’t do this a (proverbial) kitten will die.” And that kitten is your data confidence.

It’s important.

Published at Wed, 25 Jan 2017 15:00:56 +0000

Leave a Comment