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, or 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!
https://www.prmarketingbollox.com/blog?utm_source=b2bmarketinglab.co.uk&utm_medium=referral&utm_campaign=blog_link& utm_term=url_tracking&utm_content=u_hit_that
However, to get to that point we need to take a step back and understand some basic aspects of tracking URLs - especially the tracking links that you can build using the above-suggested applications.
UTM Parameters
The custom URLs that can be built and read by HubSpot and Google Analytics are comprised of two main elements.
1. The page URL
In the above example this is everything that is before the “?” is your landing page URL
(https://www.prmarketingbollox.com/blog)
i.e. the link that you would use if you had not thought about using a HubSpot tracking link.
2. The UTM parameters
Everything after the “?" is what gives the “tracking” to your “tracking URL”
(utm_source=b2bmarketinglab.co.uk&utm_medium=referral&utm_campaign=blog_link& utm_term=url_tracking&utm_content=u_hit_that)
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:
UTM Parameter |
Set Parameter Value |
utm_source |
b2bmarketinglab.co.uk |
utm_medium |
referral |
utm_campaign |
blog_link |
utm_term |
url_tracking |
utm_content |
u_hit_that |
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:
Target Landing page: https://www.b2bmarketinglab.co.uk/blog/how-to-choose-the-right-hubspot-website-templates
Campaign: LinkedIn SP.P. how to
(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 been fixed and 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 into 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.
And now I have my four tracking URLs ready:
https://www.b2bmarketinglab.co.uk/blog/how-to-choose-the-right-hubspot-website-templates?utm_campaign=linkedin_spp_how_to&utm_source=linkedin&utm_medium=paidsocial&utm_term=buyer_persona_1&utm_content=sponsored_post_1
https://www.b2bmarketinglab.co.uk/blog/how-to-choose-the-right-hubspot-website-templates?utm_campaign=linkedin_spp_how_to&utm_source=linkedin&utm_medium=paidsocial&utm_term=buyer_persona_1&utm_content=sponsored_post_2
https://www.b2bmarketinglab.co.uk/blog/how-to-choose-the-right-hubspot-website-templates?utm_campaign=linkedin_spp_how_to&utm_source=linkedin&utm_medium=paidsocial&utm_term=buyer_persona_2&utm_content=sponsored_post_1
https://www.b2bmarketinglab.co.uk/blog/how-to-choose-the-right-hubspot-website-templates?utm_campaign=linkedin_spp_how_to&utm_source=linkedin&utm_medium=paidsocial&utm_term=buyer_persona_2&utm_content=sponsored_post_2
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 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 |
utm_medium value |
Organic Search |
organic |
Social |
social |
|
|
Affiliates |
affiliate |
Referral |
referral |
Paid Search |
CPC |
Display |
display |
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 separately from 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.