Every now and then you will need to promote a page through a channel that HubSpot or Google Analytics has difficulty recording properly. When this happens, you end up throwing traffic coming from your campaign into the dreaded “Direct Traffic bin”, which leaves you little hope of understanding the true return on investment of your marketing campaign.
Another problem is when too many things are being grouped under one channel and you want to know how much traffic has come from one of your campaigns compared to another.
Sometimes, the best and only way to solve these problems is by creating custom tracking URLs for your campaign links.It is very easy to create tracking URLs using either HubSpot’s Tracking URL builder, the Campaign URL Builder by Google, or you can even build them yourself.
A tracking URL such as the one below, might look scary with symbols such as “?_=&” and the repetition of the word “utm” but if you look closer you will see that it is actually fairly simple - and once you understand it you will be able to build tracking URLs on the fly!
If you what to know more about UTM Parameters and how they came to be, Wikipedia has a great article here.
However, some parameters are more important than others, so let's focus on the five you really need to know.
In the above example we can see all of them together with their values, separated by “&”. The parameters take values that we specify and can be virtually anything.
You can see the values that I have set here as it is the text that follows each parameter after the “=”. So, in the above example the parameters and their values are:
Set Parameter Value
The sequence that these parameters will be included in the tracking URL does not matter and the only parameter that is necessary is the utm_source. However, If you actually want to use the full power of this functionality then you will have to use more than that.
In the example that follows, we will create new custom tracking URLs using HubSpot’s URL builder.
Creating a HubSpot Tracking Link
Let’s assume that we have the following situation:
(a LinkedIn Sponsored Post promoting our "How to" Campaign)
Channel: LinkedIn Sponsored Content
(as opposed to LinkedIn Ads, LinkedIn InMail etc.)
Target Audiences: “Buyer Persona 1” and “Buyer Persona 2”
Creatives: “Sponsored Post 1” and “Sponsored Post 2”
In order to tackle the above, I have created two campaigns in my LinkedIn Campaign Manager account, one to target each audience, and I have created two sponsored posts with the same message but different images and used both of them in both campaigns.
I want to understand which post works better and for which audience and this is what I will try to track through my Custom Tracking URLs.
Where to go in HubSpot?
In HubSpot, I navigate to “Reports” -> “Reports Home” -> “Tracking URL Builder” and I click on the Create a new tracking URL button at the top right and this is what I see:
I insert my target page in the first textbox and then click on the dropdown for Campaign Name. This is what will go in the “utm_campaign” parameter value and HubSpot is giving me a list of all the campaigns that currently exist in my account.
I can choose one of them if I want, but I would actually prefer to keep them separate, so I start typing a new name for my campaign. To do this I click on the orange option Create item “linkedin_spp_how_to” and my campaign is created.
Now I need to choose my Source which, as you probably guessed, will populate the “utm_source” parameter value. The available values here are pre-set but I can create a custom one if I click on the Other Campaigns option. I scroll down to find the Paid Social category and click on LinkedIn.
After that I receive the message “Traffic to this URL will appear in your Sources report under Paid Social: LinkedIn”. This has now fixed where my campaign will show in HubSpot reporting.
NB. Google Analytics does not recognise Paid Social as a Default Channel Grouping. We will tackle that later.
Now, I want to take things a step further and use the rest of the utm parameters as I need to know which ad is working for which audience. So, I click on Switch to advanced view at the bottom of the pop-up window. As I have chosen LinkedIn from Paid Social in the source, you will see that my medium is auto-populated with paid social which is what I want.
The next two utm options are Content and Term which I will populate with sponsored_post_1 and buyer_persona_1 respectively as in the screenshot below.
Finally, I press Generate and voila!!!
I get my custom tracking URL as in the screenshot below.
This is now saved in my HubSpot account and I can come back to the Tracking URL builder and find both the shortened and full versions of my tracking URL.
I have now created one custom tracking URL but I have two target audiences and two ads which make up a total number of four combinations, therefore I need four custom tracking URLs.
Now I have two options. I can either:
Repeat the above process to create the other three links. (This is advised if you need to use the shortened version which cannot be created manually.)
Copy the URL in a spreadsheet and manually change the utm parameter values to create all the variations that I need. (This is a quicker way of producing tracking URLs, especially when you need to create a large number of them. Even though the URLs have not been built out in HubSpot's URL builder, HubSpot will recognise the parameters and bucket the traffic accordingly).
For my LinkedIn Sponsored Posts campaign, I do not need the shortened version of the URLs and for the purposes of this demonstration I will do this manually.
However, knowing my way around Excel helps a lot in this process!
I copy my newly created tracking URL to an excel spreadsheet and using the Text to Columns function and the symbol & as my delimiter, I break my tracking URL to its components as shown below
I need another 3 variations of the tracking URL in which the landing page, campaign, source and medium will be the same. So I copy those 3 times.
And now I need to add the variations of target audiences and ads such as below (I have colour-coded to show identical values).
And now by using the formula =B2&"&"&C2&"&"&D2&"&"&E2&"&"&F2 I create all the tracking URLs that I need in a new column. This formula uses the content of columns B-F but separates each parameter with an & symbol.
Prepare your Google Analytics for your custom tracking code
Google Analytics has a pre-set dimension which is called “Default Channel Grouping”. This is the channel breakdown that most of us know and love in Google Analytics. In order for sessions to be attributed to one of these channels, the session medium has to match with some predetermined values in Google Analytics. If they do not, your traffic will be bucketed in “Other” or “Direct” which is not very helpful. Here is a list of what you could set your medium value to in order to assign your traffic to the channel you want:
Default Channel Grouping
Additionally, there are ways to build your own channels and add them to the “Default Channel Grouping” in case you think that your tagged traffic should be shown separate to other sources. A perfect example is the one that I have given above where the traffic that will be generated from the LinkedIn Sponsored Posts campaign is “Paid Social” and does not belong under “Social” or “Paid Search”. Google Analytics does not have Paid Social as a pre-set channel, so you might want to create that. Here is a link on how to do this in Google Analytics.
Here at Huble Digital, we love creating accurate and concise reports. We will be happy to help you build your own and help you with your tracking and reporting needs in HubSpot.
25 inspirational quotes to keep you motivated for business in 2021