July 15, 2021
*Editor’s Note: A Smarter Way to Track Campaigns in Google Analytics (+ Free URL Builder) was updated May 2018
How do we track a campaign’s performance?
We can track how many people click a link to visit our blog, but do you know where they came from, if they visited a specific landing page, if they found our blog from a specific Google Search, if your email campaign worked better than your Facebook ads campaign, or if you generated any revenue for those campaigns.
Fortunately, this information is relatively easy to track using Google Analytics, but what isn’t easy is trying to track performance for a client that has an awful event tracking setup.
Since tracking mistakes are a fairly common issue (and I’ve, admittedly, made a few myself), I’ll teach you how to fix your tracking mess, explain the shortcomings of using a pre-built URL Builder tool, and walk you through how to create your own URL builder with a free downloadable template (see below)!
You get out exactly what you put into your website tracking.
Garbage in, Garbage out.
We’ll get further into this later, but whatever you put in your tracking URL is what shows up in the analytics software you use.
If you don’t use good naming conventions, aren’t tracking useful variables, or (worse) aren’t consistently applying tracking, you’ll have no way to know if your campaigns are working.
If your event tracking is a mess, you don’t have good data. If you don’t have good data, you can’t know how to improve performance.
Note: I’ll use Google Analytics in all my examples, but the same (or similar) concepts apply to all analytics platforms; Mixpanel, Omniture, KISSMetrics, etc. Make sure you ask your vendor how tracking with your platform differs from Google Analytics.
When you open Google Analytics (assuming you have it already set up), you can already see what websites sent you traffic. In this example, I see that Facebook is sending us a lot of referral traffic, so let’s dig deeper and see what campaigns are working well for us.
No campaign information.
Well, it’s still not too much of a problem at this stage; even if you can’t tell which Facebook post worked the best, you can at least tell how your efforts on Facebook are doing in general.
Now, say you wanted to spend some money promoting a post. How would you tell whether that spend was worthwhile?
Well, that’s where UTM codes come in.
Urchin Traffic Monitors (UTM) codes are small bits of text you can attach to a custom URL to track the effectiveness of your marketing campaigns from various sources, mediums, and platforms.
If, for instance, I want to track the performance of my email marketing campaign, I can use UTM campaign parameters to look up that campaign in Google Analytics and see how much traffic and how many conversions that campaign drove.
You should be familiar with the five UTM parameters:
Here’s what UTM parameters look like when added to a website’s URL:
There are a couple of rules to remember must remember regarding URLs:
Note: social media management tools like Buffer can add utm_ parameters and shorten the links for you automatically.
Mobile is different.
In fact, it’s a completely different ball game. Though utm_ parameters do work for Android apps (with a slight modification), the Apple app store won’t let your utm_ parameters pass through!
There are a number of different mobile-friendly tools which solve this ‘link attribution’ problem, but we mostly use Branch.io or AppsFlyer. Though the setup is complicated, it works in a really similar way:
You’ll grab a link just like a Bit.ly link from whatever platform you use and enter that where the URL would normally go.
Once someone clicks the link, the Branch.io or AppsFlyer records information about the user, then redirects them to the app store. Once they install and open the app, it does a reverse lookup to see what link they clicked and attributes that install to the right campaign.
With additional setup, you can often then push that information into your analytics platform (for example Localytics or Mixpanel) and/or land a user on the right deep link page; for example, if you’re promoting a specific page within the app, i.e. a Paris hotel deal.
Note: Installing the Facebook SDK solves this issue for FB, but it doesn’t tie into or attribute the same way as your analytics platform so you’ll get conflicting numbers.
So far so good? Now, this is where it gets tricky.
Just because you can put whatever you want in these parameters, it doesn’t mean you should. Remember ‘Garbage In, Garbage Out’?
Because there’s no way to overwrite Google Analytics data, using the wrong campaign parameters can get you into trouble when you try to do analysis on your data.
For example, check out these source/mediums from a real client of ours:
What a mess!
If you wanted to do analysis on the value of Facebook traffic, where would you start?
Here are just some of the issues could face:
It should be obvious at this point that sticking to consistent naming conventions is the key to getting the most out of your parameters.
So that’s what we’ll cover next.
Now that we’ve seen how much of a pain it can be to get this wrong, let’s go over a few sensible principles for getting tracking right.
Keep track of the names you use to refer to each channel, and don’t deviate.
I.e. ‘ppc’, ‘cpc’ and ‘google-ads’
Decide on how you will capitalize and stick to it. My preference is all lower case.
I.e. ‘Facebook’, ‘facebook’ and ‘FACEBOOK’
Don’t repeat the same information in multiple utm_ parameters, it’s a waste of space.
Make sure the variable you plan to report on, is in your utm_ parameters.
I.e. ‘utm_campaign=image-a’ vs ‘utm_campaign=image-b’
If you use a unique ID in your utm_ parameters you can look up information about it later.
I.e. ‘utm_campaign=test1a’; with all the details of test1a stored in a google doc
Make sure all ‘paid’ advertising or marketing campaigns are denoted in the parameters.
I.e. ‘utm_medium=cpc’ or ‘utm_source=facebook-ads’ or ‘utm_campaign=$test1a’
You can also use colons (:), pluses (+) or pipes (|) or underscores (_), but dashes are best.
Don’t start with complex rules you’ll never stick to. Start simple and slowly build on it.
I.e. ‘utm_campaign=T93-a45-c88-m42-pDT-cpc-US-20160922’ is probably too much at the start
Remember that users can see whatever you put in your parameters. Don’t embarrass yourself.
Think about what aggregate data would be interesting to see; add them to your parameters.
I.e. use ‘utm_medium=social’ across Twitter, Facebook & Pinterest to report on all social traffic.
Great – so how do you take those concepts and put them into practice?
It’s time to build a URL builder!
First, let’s take a look at Google‘s URL Builder:
This tool is definitely useful, particularly for beginners.
…but there’s a problem. Well, 3 problems actually:
So I’m going to teach you how to build your own, for free.
The collaborative features of Google spreadsheets make it the obvious choice for an important document like a URL builder. You can share with multiple people, who can all edit in real time and you can roll back changes if something goes wrong. Can’t beat it.
Pro Tip: If you’re not particularly savvy with Excel / Google Docs, check out the Excel tutorial I made for all our new marketing hires at Ladder.
We can develop on this further, but for now, we just need the landing page (Base URL), Source, Medium and Campaign (UTM parameters) and a place for the output (Tracked URL).
Add a wide variety of examples so you can develop a good naming convention in line with the principles we discussed previously. In this example, I have a few paid search campaigns (cpc), a few paid social campaigns (cpm) and a number of links I post on social media.
With these parameters, I’ll be able to answer the following questions within Google Analytics:
The next step is to concatenate the URL, which is just a fancy way of saying combining all of your UTM elements together.
If you’re up for a little challenge, here’s the formul you need to do it manually: (copy-paste it into your own spreadsheet):
This may look complicated, but it’s not too difficult once you get used to it (check out our Excel tutorial if you’re struggling).
All it’s doing is adding (or concatenating) the cell values together with the right UTM parameters, to build the URL.
Drag this formula down and you have your very own URL builder!
You can add new rows to the bottom as you get new campaigns, and just drag the formula down to update it and get your links.
If you need a little help getting started, download the exact Google Sheet I created and use it as a template.
Now, you’ve already got a version that works better than Google’s tool. It saves our old links in a collaborative file we can share with our team.
But how do we solve the other problem, ensuring people follow the right naming conventions?
That’s where validation comes in.
First, create a new tab with all the valid entries you want to allow–in this example, I’ve just decided to lock down Source and Medium.
Next, select the column in your main sheet, and go to Data > Validation.
From there, you can enter in the Criteria row (the column in the ‘valid’ sheet) and voila! Entering anything other than a correct value will cause an error.
As your list grows, you’ll find yourself endlessly scrolling, and getting lost in the sheet. To make it a little more useable, filter the table (above) and freeze the top row (below). Now you can sort or filter the sheet, and scroll down without getting lost.
As you start to run more marketing experiments, you’ll probably outgrow this simplistic spreadsheet and you’ll want to track more variables. Here’s how:
First, insert more columns for your new variables. In this case, I want to track the audience, creative, and the messaging used. Then fill out the values, as before.
Now it’s just the case of updating the concatenation formula, and you’re set. Here’s what that looks like:
All these additional variables aren’t doing us any good if we don’t know what they mean. Now, it’s time to create a ‘key’ where we can write explanations for what each ID refers to.
I’d opt to keep this relatively uncomplicated and link out to other more detailed Google docs if the client/your boss/your team needs more detail.
Of course, you could keep going from here: you could add more variables, make a column for the encoded URL, and add a column for the Bit.ly link.
You could manage your workflow from this document; add a checkbox for when the team has put the new URL live. You could even add reporting; fill in performance data by utm_ parameter.
I’d also recommend you institute regular audits of this document and how well it matches your campaigns; pay a cheap freelancer every month to go through your campaigns line by line and check the URL is a) not broken and b) it matches what’s in the document.
So I think you get the idea; the sky is the limit when it comes to making this URL builder more useful, but with just a few minutes (and zero cost) you could have a working builder that solves all the horrendous tracking problems most people suffer with. Again, if you need help getting started, click the button below to download my free URL builder template.
Because highly technical issues come up surprisingly frequently, I wanted to reference them briefly here and point to potential solutions.
If you look at your source/medium report and see traffic coming from your own site or a third party payment site like PayPal, you’ve got a problem. Your traffic will lose its original marketing source (facebook, google) and instead your sales will be attributed to your own domain or a third party payment system (PayPal). There are more technical fixes, but luckily the problem is easily solved by just excluding the offending domain in Google Analytics.
If you’re really savvy, you’ll notice the UTM system isn’t perfect; what happens if I come through a Google Adwords campaign, but then I share my URL with you (complete with utm_ parameters)? Google will attribute your conversions back to the original campaign I clicked on. This issue can be solved by wiping the referral information once you’re done with it.
Want an easy way to personalize a landing page? Use utm_ parameters to conditionally change content on the page for visitors from specific marketing campaigns. For example, trigger a customized SumoMe welcome mat or smart bar only for visitors from a specific site. You can do the same thing with Optimizely experiments (pro tip: to make temporary personalized changes on your site, just set the ‘test’ to 100% of that specific audience). Unbounce dynamic text is another great example of this.
Need to tie your marketing campaigns back to the specific leads that came in? Or simply can’t get your boss/client to log into Google Analytics? Use hidden form fields in Unbounce to record the utm_ parameters right alongside the lead’s email address in the database. Something about seeing those leads right alongside their marketing source makes the whole system more trustworthy, particularly for non-technical people. From Unbounce you can push that information into any other CRM, but if you want an implementation that works on your own website, try something like this custom solution. It will take some development work, but the flexibility to be able to use your own attribution rules and being 100% confident in the data can be priceless.
Sign up to our newsletter to stay up to date with all the latest movements in the field.
More from Ladder Blog
Putting finance at the heart of the business allows you to connect all the dots, have the business work in harmony, grow faster, and substantially reduce setbacks. By analyzing the data provided by all the departments, finance can design a master template, a master data budget, or a growth plan to make the right decisions that can help you effectively grow the business.Read More →
Your marketing success ultimately comes down to your goals, your risk tolerance, and employing a sound strategy regardless of whether it’s volume or efficiency-based. The key is to clearly outline your strategies and expectations and optimize your resources, time, and capital to give yourself the best opportunity for success. Remember that you and your growth partner must be on the same page or you might run into some very unpleasant conversations when it comes time to report on progress.Read More →
Promote a social post to get cheap visits to a website and capture emails. High quality social posts can be targeted to reach specific audiences based on interests, shopping habits, browsing habits, and more. Publish a post on a social network and use their native advertising too...
Place your call to action form or button on the right side of your landing page to increase activation. Focusing on the right side of your landing page rather than the center, especially when the form remains visible while scrolling down the page, keeps registration forms and CTA...