If you’re using campaign tracking urls in Google Analytics you should be a bit careful. There are some common pitfalls that can break the tracking or lead to serious inaccuracies in your reporting. This article outlines 3 easy tips to remember to ensure your campaing tracking is the success it should be!
1: Don’t put spaces, or other url unfriendly characters into your URLs.
Particularly if you’re using my Google Analytics Campaign Tracking URL builder you need to be careful you aren’t copying and pasting spaces into your URLs! If you are in any doubt about what characters are allowed a good rule of thumb is to stick
to standard English letters and numbers. If you need a separator you can use ‘-‘ or ‘_’. Or you could encode a space using ‘+’.
2: Specify everything you want to see in your report.
Before you set up campaign tracking urls, eg: for an affiliate, you’ll notice they’re already in your source and medium reports through Google Analytics natural referral traffic reporting. If you then set up a campaign tracking url with just ‘medium’ and no value for ‘source’, you’ll see (not set) in your source report. The same is true of everything you can define in campaign tracking: campaign, keyword, ad content. To avoid daily questions from your stakeholders about ‘not set’ values in the reports, once you start defining a campaign tracking url, specify everything you need to see in the reporting.
3: Query strings should only ever have one ‘?’.
I see this one all the time. People take their landing page URL and add campaign tracking to it, not taking account of an existing query string on the URL! Query Strings are typically a ‘?’ followed by ‘key-value pairs’ which are separated by ‘&’ anything after a question mark in a URL. Your Google Analytics campaign tracking code needs to either be a query string or part of a query string. If you need the existing query string for whatever reason, simply add your GA code after the existing query string, and change the ‘?’ to a ‘&’.
If you’re still in doubt, check out the wikipedia article about query strings.
Now you’re cooking on gas and ready to set up your campaign tracking without a hitch. Unless I’ve missed something else that might go wrong? If you’ve made any other bloopers in your campaign tracking let me know!