Tracking URLs

Tracking URLs help you measure the effectiveness of your marketing campaigns by providing information to HubSpot when visitors access your site through the URL.

The following documentation will go through how Hubspot uses default UTM tagging on certain marketing modules (eg. email and social media) and your customization options. You will also learn how to store the original source and medium values as part of the contact's properties and understand how Hubspot's own analytics tools report on attribution.

1. UTM Parameters

Before reading this section, we recommend you take a look at the latest UTM standards used by Greenpeace. Read the documentation below to understand best practices when tracking URLs:

pageUTM Standards

How Hubspot tracks URLs by default?

  • Hubspot will append default UTM parameters to links according to their standards (see table below)

  • Hubspot will not overwrite any custom query parameters (eg. domain.com/?customquery=test)

parameter

Email

Social Media

utm_source

hs_email

{{social platform name}}

utm_medium

email

social

utm_campaign

{{campaign name}}

{{campaign name}}

utm_content

{{email ID number}}

{{content ID}}

utm_term

hss_channel

tw-{{post-ID}} fbp-{{post-ID}}

_hsmi

{{email ID number}}

_hsenc

{{ID}}

Values in between {{brackets}} are variables. They are dynamically populated and depend on the content (email or social media post) that you are creating

Tracking URLs on Email

You can define in which cases Hubspot should add automatic default UTM tags to email marketing links. Go to your account settings (settings > marketing > email > tracking):

We recommend selecting the option "Add source tracking only if no existing tags in URL".

  • In this case, Hubspot will add default tracking UTMs only to URLs that do not include any default UTM tag (utm_source, utm_medium, utm_content, utm_campaign, utm_term).

  • If there's at least one added, no other default tags will be added (this doesn’t apply to custom queries such as ?anything=). This option allows you to customise your email links with your NRO's UTM conventions.

Use cases:

  1. The email link domain.com/?customquery=testwill be transformed into domain.com/?customquery=test&utm_campaign=Oil&utm_medium=email&_hsmi={{email-ID}}&_hsenc={{ID}}&utm_content={{email-ID}}&utm_source=hs_email

  2. The email link URL domain.com/?utm_source=test will be transformed into domain.com/?_hsmi={{email-ID}}&_hsenc={{ID}}&utm_source=test

Tracking URLs on Social Media

For Hubspot's Social Media module there's no option to customize how the tracking URLs should work. See below what is Hubspot's default behaviour:

  • You cannot use custom tracking URLs in social posts published through HubSpot. HubSpot automatically adds tracking parameters to posts published through the social tool to track traffic back to the original post. (documentation source)

  • If the Campaign field was not selected (is blank), Hubspot will not add or overwrite the utm_campaign parameter

This behavior does not apply to Email Marketing if you have selected the option “Add source tracking only if no existing tags in the URL”. In this case, if the utm_campaign tag is declared, no other default tag will be added automatically.

Use cases: This twitter post was created inside Hubspot.

  • The editor added the original URL in the shortened version: https://act.gp/37dRlEk. This included the parameters:utm_source=twitter&utm_medium=social&utm_campaign=greenwire&utm_content=en_20201016_link

  • Hubspot generated another shortened version: https://bit.ly/3nWRAtj and replaced the default parameters values: utm_campaign=greenwire&utm_content=142672709&utm_medium=social&utm_source=twitter&hss_channel=tw-16334137

  • Since no Campaign was selected in Hubspot, the only parameter that wasn’t overwritten was the utm_campaign

Tracking URLs on Landing Pages

  • Hubspot will not add any default UTM tags to the links used in Landing Pages, either via Call to Action or added directly to the page content (eg. text links).

  • If you add yourself some tracked URLs, Hubspot won't remove them doesn't remove them

More information on Hubspot's own documentation:

By default, HubSpot's Social Media Tool will shorten links in your social post to a hubs.ly, hubs.li, or hubs.la link. If you own a branded short domain on Bitly, you can connect your Bitly account to HubSpot to use your branded short domain for links in social posts.

3. URL Builder

Hubspot offers a Tracking URL Builder functionality, similar to what burlo.greenpeace.org provides, it only facilitates the creation of tagged links. Users can copy/paste these tagged links in their emails and social media posts, but that would not change the overwriting behavior mentioned in the sections above.

This tool can be found in Reports > Analytics Tools > Tracking URL Builder.

By default, these are the UTM parameters available in Hubspot’s Tracking URL Builder:

parameter

Email

Paid Search

Social

Paid Social

utm_source

email

ppc

{{social platform name}}

{{social platform name}}

utm_medium

*

*

social

paid social

utm_campaign

{{campaign name}}

{{campaign name}}

{{campaign name}}

{{campaign name}}

utm_content

*

*

*

*

utm_term

*

*

*

*

The cells with an asterisk * means you can customize and input any value. Values in between {{brackets}} are variables. They are dynamically populated and depend on the content (email or social media post) that you are creating

Other observations about Hubspot's URL Builder:

  • Mandatory to select a Hubspot campaign.

    • To build a tagged link with UTMs you need to select a Campaign in Hubspot. A campaign name is required when creating a tracking URL because the campaign name is used in several reports in HubSpot. Visits to the tracking URL will be attributed to this campaign in the sources report and will count towards the analytics for the campaign in the campaigns too

  • The Campaign name will be used as the utm_campaign value, meaning that you can’t customize this value directly in the Tracking URL Builder.

Recommendation: Although using the Hubspot tracking builder could help us to have a more fixed/standardized use of UTMs, some NROs might need more customization options. Additionally, the tool doesn't have nice usability for customizing values. You can't set pre-defined custom values, they need to be input manually and that opens big error/typo margins which we should avoid.

For more information on GPI's recommended practices for UTM tagging check below:

pageUTM Standards

4. Recording UTMs

This section explains how to record UTM values as part of contact information.

Step #1: Create HubSpot properties for UTM parameters

Create properties (“fields”) in your Hubspot account to store the utm values from the session’s signup. To do so, in HubSpot click on Settings -> Properties -> Create a property under Contact Properties. You can also create a property group called “UTM Parameters”.

Note that the “Internal Name” of the HubSpot property should be all lowercase to match the URL parameter name in the URL.

Now select the field type single-line text:

Repeat this process and create a property for each default UTMs: utm_source, utm_medium, utm_campaign, utm_content, utm_term.

Step #2: Insert UTM parameter properties as hidden form fields in your HubSpot forms When creating a new Form in Hubspot, don’t forget to add your UTM parameter properties as hidden form fields to your form:

Step #3: Test your HubSpot form

Append URL parameters to a landing page with your HubSpot form. Verify if the contact has been saved with the values.

Observations

  • The first original source and medium are already saved into a default contact property (the "original source" in the web analytics properties of the contact). You can also create a list and query these values as "value has ever been X", which allows you to see if the user has ever signed up via a specific channel, based on the contact history. Since you don't have an option "value has first been X", then you have to use that secondary property which stores just the original value.

  • Every time the user signs a new form, this value will be updated.

  • Hubspot keeps the contact change history and there are a few query options that you can use to segment this information.

    • Eg (a): source equals ‘facebook’ would retrieve a list of users that signed up via facebook last time

    • Eg (b): source has even been equal to ‘facebook’ would retrieve a list of users that once signed up via facebook

  • Another benefit of saving UTM values as contact properties is that you can duplicate these values to other custom properties, for example, to store the original source of a contact for a specific campaign (eg. forest_original_source).

5. Hubspot Analytics

Channel Definitions:

HubSpot follows a set of rules to categorize traffic into a specific source, and checks the full page URL and the referring domain, if available, against these rules. They are applied in this order:

Order

Source

Rule

1

None

The referring domain is considered internal traffic based on the listed site domains in reports settings.

2

Social media

The "utm_medium" parameter is “social” and the "utm_source" contains a name of a recognized social network.

OR

The "utm_medium" parameter is "social" and the referring domain is a social media site.

3

Email marketing

The "utm_source", "utm_medium", "utm_campaign", or "source" parameter contains the word “email”.

4

Paid social

The "utm_medium" parameter contains "paid," "ppc," or "cpc", and the "utm_source" parameter contains the name of a recognized social network.

OR

The "utm_medium" parameter contains "paid," "ppc," or "cpc", and the referring domain is a social media site.

OR

The "utm_source" or "utm_medium" contains "paidsocial".

5

Paid search

The "utm_source", "utm_medium", "utm_campaign, or "source" parameter contains the word “adword”, “ppc”, or “cpc”.

6

Paid search

The "gclid" parameter is present, as it is the Google click ID

7

Paid search

The "utm_source", "utm_medium", or "utm_campaign" parameter is present and the referring domain is google.com.

8

Other campaign

The "utm_source", "utm_medium", "utm_campaign", or "source" is present and does not contain the words “email”, “adword”, “ppc”, or “cpc”

9

Social media

Referring domain is a social media site.

10

Organic search

Referring domain is a search engine.

11

Referral

Referring domain is not a social media site or search engine.

12

Direct traffic

Referring domain is a mail domain or RSS reader.

13

Direct traffic

No referring domain or tracking URL.

More information on Hubspot's own documentation:

Last updated