Last week we discussed how to track the performance of specific marketing initiatives.
In this week’s post we’ll see how exactly to setup custom campaign tracking in Google Analytics. In this post you’ll see how easy is to use Custom Campaigns and you’ll get some ideas about what type of campaigns you can track on your website.
What are custom campaigns?
Custom campaigns are created by adding an extra information to the links that users click on to get to your site. This process is called link tagging and the “information” you add to the links is called UTM parameters (or campaign tags).
Google Analytics uses the information from these additional parameters (tags) to identify where exactly the visitor is coming from. The campaign tags overwrite the default categorization that would normally be assigned to the incoming traffic and ensures that GA is capturing the correct information.
In that way, the campaign tags help Google Analytics to track more accurately the incoming traffic and to avoid some common traffic channel misattributions, such as:
- traffic coming from newsletters is often recorded as “direct”,
- banner ads on third party websites shows up as referral traffic, even though they’re ads.
You can avoid these and many others tracking mistakes, by using custom campaigns.
How to setup a Custom Campaigns?
Step 1: Identify the destination URL you want to track
First step would be to identify the exact URL that you will promote offsite. A custom campaign is created by adding tags to the links to this URL. So, the URL represents the base of the tracking links you’ll create later.
To illustrate, let’s say that I want to promote this blog post on Twitter and I want to use a custom campaign to track the results of this promotion.
The URL I will promote is:
Step 2: Select a variable for each of the UTM parameters you want to use
Next you need to decide what variables you’ll assign to the UTM parameters. To do that you first need to understand what each UTM parameter represents, and how to use them effectively.
You can add five different types of UTM parameters to your links:
- utm_medium (required) – This tag tells Google Analytics what’s advertising or marketing medium, that brought the user to your website. It could be: cpc, banner, email, newsletter, organic, etc.
utm_medium=cpc, utm_medium=email, utm_medium=organic and so on
It overwrites the medium that GA would ordinarily get set by default.
- utm_source (required) – Use this to tag to tell Google Analytics where the user would have came from. It could be a specific site, a publication, an advertiser, a newsletter name, social media website or another.
utm_source=velizaratellalyan.com, utm_source=facebook and so on
It overwrites the source that GA would ordinarily get set by default.
- utm_campaign (required) – Use the Campaign Name parameter to identify the name of a strategic campaign or promotion. The tag is used to name your marketing campaign and to provide additional information about the URL the visitors clicked on.
utm_source=free_trial, utm_source=christmas_sale and so on
- utm_term – This parameter is paid search ads only. Use it to identify the specific paid keywords you bid on.
- utm_content – This parameter is used to identify different links that point to the same URL. It is very useful when you have different versions of an ad on the same website.
Only 3 parameters are required: utm_source, utm_medium and utm_campaign (utm_term should be used for paid ads only and utm_content is usfeful to do for A/B testing of content-targeted ads.
A common mistake Custom Campaign newbies make is to mix up medium and source. Think of the Medium as the largest parameter you can tag your links with. Don’t use specific things like “twitter”, “weekly_newsletter” or “website_banner” for it. All these are Sources of traffic. Instead use “social”, “email”, “cpc” and “banner” for the Medium.
In my example I will use the following tags:
utm_source=twitter utm_medium=social utm_campaign=blog_post_promotion utm_content=How_to_setup_Custom_Campaigns_Google_Analytics
Step 3: Create a tracking link by adding the campaign tags to the destination URL
Next step is to add the campaign tags (UTM Paramethers) to the destination URL:
- the campaign tags are added at the end of the URL and initialized by the question mark “?”,
- Every UTM parameter starts with it’s name followed by “=” (e.g. utm_source=twitter),
- Leave no spaces between the parameters,
- Each UTM parameter is separated by an ampersand sign “&”.
At the end the tagged URL looks like that:
If you don’t want to tag links manually you can use a popular tool called Campaign URL Builder.
This is a simple online tool, where you can enter the destination URL, specify UTM parameter values, click submit and the tool will generate the tracking link. Here is a screenshot of the tool being used to generate the link for my example from above:
At the end, the auto-generated tracking link looks like that:
Note that I didn’t use spaces while entering parameter values in the URL builder. Instead I used underscores (_). If you leave spaces, the URL builder will transform each space in “%20” and the result will be a long and spammy-looking link:
Another way to tag links faster is to use an excel sheet where you enter the destination URL and the different UTM values in separate columns and use CONCATENATE formula to automatically join the texts streams from the different sells into one sell.
At the end you have one ready-to-use tracking link:
As you see, to get the tracking URL in column 6, I have simply concatenated the contents of cells A3, B3, C3, D3, E3 and F3. You can modify the destination URL and the inputs after the = signs and the formula will automatically create a new campaign tracking link.
And to simplify things even more, you can use my Google Analytics Campaign Tagging Spreadsheet, where you only need to put the destination URL and the UTM parameter values in separate cells. The formula will automatically generate the tracking link for you.
You can get a copy of the spreadsheet here.
Use this spreadsheet to tag links faster and to keep a track of all the custom campaigns you’ve done over the time.
Step 4: Place the tracking links
My example is for Twitter, so I’m placing my tagged link there:
Step 5: Check your Google Analytics reports
Once you’ve placed the tracking links, Google Analytics will start to report on all visits from these links.
Log in to Google Analytics, navigate to “Traffic Sources” section > click “Sources,” > then “Campaigns.” This GA report will show you how much traffic you’ve received on the campaigns, using the various custom UTM parameters you created.
Custom Campaign tracking can only be used for external campaigns
GA’s custom campaign tracking should only be used for external campaigns driving traffic to your website (email, social media, ppc, etc).
Do not place links tagged with UTM parameters on your own website!
UTM parameters should be used only when linking from external sources!
That’s because the source parameter in the tagged URL will going to overwrite the original referrer. This means that when an exciting visitor of your website clicks on a link tagged with UTM parameters, Google Analyics will immediately end his session and will record a new session with the campaign information specified in the UTM parameters of the tagged link.
For example: if a visitor enters your website from Google’s search results, GA records a new session on your website from the source “google” (utm_source=google). But if the same visitor clicks on a link tagged with UTM parameters while he’s still browsing your website, GA will immediately end his session and record a new session whose source and medium will be the ones you specified as utm_source and utm_medium in the tagged link.
At the end Google Ananlytics will count two sessions from two different sources for the same user. That’s why GA Custom Campaign tracking can only be used for external campaigns.