This website or its third-party tools use cookies which are necessary to its functioning and required to improve your experience. By clicking the consent button, you agree to allow the site to use, collect and/or store cookies.
The platform this site runs on doesn't have the option to turn off cookies server side, but you can do that in your browser and then return to the site.
I accept
Deny cookies Go Back

Annielytics.com

I make data sexy

  • About
  • Resources
  • Services
  • Blog
  • Contact
  • Log In

Oct 07 2013

How To Trash Your Google Analytics Account With Campaign Tagging

Campaign tagging gone horribly awry in Google Analytics
Save yourself from mutant data.

TL;DR: If you’re using campaign parameters on internal links get them out. Immediately. And add an annotation noting that you got rid of them.

I’m a huge proponent of campaign tracking for marketing campaigns. But used the wrong way, they can totally trash your Google Analytics data. Like to the point of making the data in your profile completely unusable. And since I’ve run into this in the past six analytics audits I’ve done, I thought I’d aim to raise the level of awareness on this topic.

What Is Campaign Tagging?

If you’re unfamiliar with campaign tagging, check out my comprehensive guide on campaign tagging, where I talk about marketers not taking enough credit for their work. It is beyond critical if you’re doing email marketing. If you’re doing email marketing and you’re not tagging your links, you’re junking up your direct and referral traffic numbers. (Can you say bogo special?)

A Cautionary Tale

But this post isn’t about the efficacies of campaign tagging; it’s a cautionary tale about what can go wrong if you use campaign tagging improperly. Why? Campaign tagging is meant for external links that point back to your site.

Ergo, the best way to trash your data is to use campaign parameters in internal links.

Deep In The Weeds

The reason for this is when you tag a link with campaign parameters using Google’s URL Builder or my Google Doc that enables you to just paste a list of URLs and have the parameters added automatically (wooOOoop!), you are reassigning the source and medium data. So let’s say you tagged a link to look something like this:

https://www.annielytics.com/hundreds-of-tools-for-marketers/?utm_medium=social&utm_source=twitter.com&utm_campaign=sample+campaign

And someone clicks on this link from from hootsuite.com. Because I assigned the source to be twitter.com (via utm_source=twitter.com), that referral source will now show up as twitter.com, not hootsuite.com. And instead of the visit showing up as a referral, it will show up as social because I assigned the medium to social (via utm_medium=social).

You following me?

So what I’ve seen sites do is add campaign parameters to their navbar and footer links or even internal banners. The problem with this is let’s say you have a navigation link tagged, and it looks something like this:

http://www.yoursite.com/about/?utm_medium=top+navbar&utm_source=homepage&utm_campaign=nonsense

Now let’s say someone comes to your site via Pinterest and then clicks this tagged link to get to your about page. That visitor no longer shows up as coming from Pinterest. Your referral is your own site.

Worst Case Scenario

In auditing a company’s Google Analytics profile this week (a service I offer), they had 1.4 million sessions in the past month that had been reassigned. My heart stopped. I’ve seen campaign tagging cause shenanigans in data but never anything this pandemic. It was the first time I had to tell someone that their analytics data is completely useless. As in they can’t use their analytics data to measure any of their marketing efforts — organic, paid search, campaigns — nothing. Because they had tagged links in their navigation and all through the site, those reassigned visits were just too pervasive.

So if you’ve been using campaign tagging on internal links you need to see what percentage of your visits have been reassigned. If it’s a significant amount of data, I would recommend consulting with an experience analyst to make sure your data is trustworthy at all. Here are a couple preliminary checks I use to check for evidence of tagging internal links.

Learn More

If you want to see if you’ve been tagging your campaigns correctly, and how the rest of your Google Analytics is doing, check out my DIY Analytics Audit Template.

You can also check out my Definitive Guide to Campaign Tagging in Google Analytics for a more in-depth look at how you should be tagging your campaigns.

 

Written by Annie · Categorized: Analytics · Tagged: Campaign Tagging

Comments

  1. Molly says

    September 8, 2015 at 12:36 PM

    Thanks Annie! This has been SO helpful 🙂

    Reply
    • Annie Cushing says

      September 8, 2015 at 1:54 PM

      My pleasure, Molly!

      Reply
  2. Joe L says

    December 7, 2016 at 9:02 AM

    Hi Annie. I’m in the middle of a site consolidation, bringing dozens of blogs from external domains into my primary domain (e.g. blog1.com and blog2.com are becoming primarydomain.com/blog1, etc). The problem is that the authors have been using campaign tags on links to point to primarydomain.com for years – literally thousands of posts. And many links are wrapped in a shortener, so we can’t even do a find/replace during content migration.

    I’ve been trying to figure out some way in GTM or GA to “ignore” the campaign tags if the referrer is primarydomain.com, but haven’t figured it out yet.

    Have you ever had such a problem, and were you able to solve it?

    Reply
    • Annie Cushing says

      December 7, 2016 at 11:03 AM

      So I threw this question out on Twitter and got a bunch of options for you to consider. One friend, a developer at Google, even wrote custom code for you. https://twitter.com/AnnieCushing/status/806518054368739329

      Reply
    • Annie Cushing says

      December 7, 2016 at 11:04 AM

      Here’s a link to the custom code tweet: https://twitter.com/iamchrisle/status/806527934844444672.

      Reply
      • Joe L says

        December 7, 2016 at 11:11 AM

        Ho. Ly. Cow!!!! Annie, this is amazing! Using your network to help me out is truly going above and beyond for your readers. Thank you so much!

        Reply
        • Annie Cushing says

          December 7, 2016 at 11:16 AM

          My pleasure, Joe! They’re a smart bunch of guys! (And the conversation is still going.)

          Reply
        • Annie Cushing says

          December 7, 2016 at 6:30 PM

          So my friend, Simo Ahava (a total badass developer), followed up with an email with further instruction and clarification:

          So, from what I understand the user has lots of links pointing to pages in primarydomain.com, but these links have UTM parameters, and are shortlinks so you can’t just run a find-and-replace?

          In that case, here are top-off-my-head alternatives:

          1) Develop a crawler (or perhaps leverage something like Screaming Frog) that goes through all these shortlinks and resolves them. If the shortlinks resolve to primarydomain.com?utm_something, then rewrite them in the page templates to proper, UTM-less links. This is naturally quite a big development undertaking, though if the client uses some existing framework such as WordPress, it might be not be too cumbersome. This would definitely be the solution for the long run, as it would strip UTMs in the page template level, so you won’t require redirects or JavaScript hacks.

          2) Server-side redirects. For every request to primarydomain.com, if the referrer is primarydomain.com AND the request URI has ?utm_something, redirect (301) the user to an UTM-less version of the URL. This is should be quite simple to do, depending on the web server software used. With Apache, for example, I think it could be done in .htaccess quite easily.

          3) JavaScript fixes. There are some of these. One is to use GTM on primarydomain.com, and if the referrer is primarydomain.com and the URL has ?utm_something, then modify the “page” field in all GA tags to not include any UTM parameters. This is fairly simple to do but unfortunately requires you to keep every single GA tag up-to-date with the change. If even a single tag slips through the cracks then BAM! It’s a broken session.

          Another JavaScript fix would be to create a fake history entry. If the referrer is primarydomain.com and the URL has ?utm_something, then use window.history.replaceState() to replace the current URL with UTM-less URL. This is fairly clean, doesn’t require modding your GA tags at all, but the downside is that it needs to run before GTM has time to start up, so it might require developers to add the hack to the page template. Also, IE from 9 and older do not support the window history API.

          So there you go … an early holiday present!

          Reply
          • Joe L says

            December 9, 2016 at 1:12 PM

            Annie, you and your friends are unbelievable! I’m probably personally responsible for about 5% of the pageviews on Simo’s blog, so I know his insights are top notch. To get personalized recommendations from him, Chris, etc… it really is an early holiday present. Thank you so much!!!

          • Annie Cushing says

            December 9, 2016 at 4:53 PM

            Happy to leverage my network of geniuses to help, Joe!

« Older Comments

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CAN I HELP YOU FIND SOMETHING?

‘MAKING DATA SEXY’ IS LIVE ?

Want to learn how to create compelling, aesthetically pleasing charts in Excel? Learn how with Making Data Sexy.

Note: Also offered for Mac

STUFF I BLOG ABOUT

LEARN HOW TO USE ALL THE TOOLS

marketing strategy guide

DIY marketing strategy guide. This guide provides step-by-step instructions on how to perform 66 unique marketing tasks using 15 reputable marketing tools (both free and paid). Steal it for $295! Learn more.

LEARN TO DO A SITE AUDIT

site audit template

DIY site audit template. 20 sections, 215 checkpoints, 100+ explainer graphics, 218 pages, step-by-step instructions. Steal it for $295! Learn more.

LEARN TO DO AN ANALYTICS AUDIT

analytics audit template

DIY analytics audit template. 8 sections, 61 checkpoints, 100+ explainer graphics, 205 pages, step-by-step instructions. Steal it for $295! Learn more.

TO THIS DATA I DO THEE WED

dashboard course

Learn to build dynamic dashboards in Excel with Google Analytics data. 16 hours of video, 3 sample dashboards, 142-page workbook, practice Excel file, and more! Learn more.

FOLLOW ME ON TWITTER

SUBSCRIBE TO MY YOUTUBE CHANNEL

Privacy Policy
  • Email
  • LinkedIn
  • Twitter
  • YouTube

© 2023 annielytics.com