Reports

Ad tracking in HubSpot

Last updated: April 2, 2019

Applies to:

Marketing Hub Professional, Enterprise

Set up ad tracking in HubSpot and learn how HubSpot tracks which ads your contacts are clicking and converting on.

 

Auto tracking

To track ads in an ads account, ensure that auto-tracking is enabled.

  • In your HubSpot account, click the settings icon settings in the main navigation bar.
  • In the left sidebar menu, navigate to Marketing > Ads.
  • For each ad account, click to toggle the Auto tracking switch on.

Please note: HubSpot can only attribute contacts to the ads they clicked after auto-tracking is enabled. Contacts will not be attributed to the ads they clicked while auto-tracking is disabled.

 

Facebook Ads

HubSpot tracks Facebook ads by adding the following URL parameters to each ad:

hsa_acc={accountid}
hsa_cam={adcampaignid}
hsa_grp={adsetid}
hsa_ad={ad_id}
hsa_net=facebook

hsa_src=[SOURCE_SITE_NAME] - set to Facebook or Instagram automatically
utm_source=facebook
utm_medium=paid
utm_campaign={Name of Ad campaign}
hsa_ver=3
hsa_la={true} - for lead ads, {false} or absent otherwise
hsa_ol={true} - for organic leads from lead ads, {false} or absent otherwise

These parameters are automatically added when your Facebook Ads account is connected to HubSpot. Any changes made to the UTM parameters in Facebook Ads will not be overwritten by HubSpot. HubSpot's ads tool updates multiple times a day to ensure new ads are being tracked.

Requirements for tracking Facebook ads

  • The final URL in the Facebook ad must be a full URL and not shortened by a link shortener (e.g., bit.ly or hubs.ly). Link shorteners strip parameters from the end of the URL and prevents tracking.
  • Existing ads must have fewer than 20 engagements at the time you first connect your Facebook Ads account to HubSpot to be tracked. This prevents Facebook's ad optimization algorithm from being reset.

 

Google Ads

HubSpot tracks Google ads by applying a tracking template at the campaign level. Any parameters specified on the account or campaign level will be merged with the HubSpot parameters at the campaign level, and will not be overwritten by HubSpot. Google auto-tagging is also compatible with HubSpot's ad tracking template.

Please note: from October 2018, Google Ads requires parallel tracking in all Google Ads accounts. While this update does not interfere with HubSpot's ads tracking, you should not concurrently use an external click tracking service that uses redirects. HubSpot uses tracking templates that require any clicks on an ad to send visitors directly to the destination URL. External click tracking services that require redirects are not compatible with HubSpot's ad tracking template.

HubSpot adds the following URL parameters to each Google ad:

hsa_cam={campaignid}
hsa_grp={adgroupid}
hsa_mt={matchtype}
hsa_src={ad network}
hsa_ad={creative}
hsa_acc={ID of account/customer}
hsa_net=adwords
hsa_kw={keyword}

utm_term={keyword}
hsa_tgt={targetid}
utm_campaign={_utmcampaign} - set by default to the name of the Ads campaign or, if you associate your ad with a HubSpot campaign, the HubSpot campaign name
utm_source=adwords
utm_medium=ppc
hsa_ver=3

Requirements for tracking Google Ads

  • The destination URL in the Google ad must be a full URL and not shortened by a link shortener (e.g., bit.ly or hubs.ly). Link shorteners strip parameters from the end of the URL and prevents tracking.
  • Customized tracking parameters should not be added at the ad group or ad level, as HubSpot's parameters do not take precedence over them.

 

LinkedIn Ads

HubSpot tracks LinkedIn ads by applying a tracking template to supported formats of Sponsored Content.

Please note: if multiple ads link to the same content, they will have the same creative ID, and only the first ad will receive credit for conversions. If an ad is created for an existing LinkedIn post, the same tracking will be applied to the ad and the existing post, and HubSpot will not be able to differentiate between organic and paid interactions. For these reasons, it's recommended to create new, individual Sponsored Content in LinkedIn for accurate tracking.

HubSpot adds the following URL parameters to each LinkedIn ad:

hsa_net=linkedin
hsa_ver=3
utm_source=linkedin
utm_medium=paid
hsa_acc={accountid}
hsa_cam={campaigngroupid}
hsa_grp={campaignid}
hsa_ad={creative}
utm_campaign={name of ad campaign}

Requirements for tracking LinkedIn ads

  • The final URL in the LinkedIn ad must be a full URL and not shortened by a link shortener (e.g., bit.ly or hubs.ly). Link shorteners strip parameters from the end of the URL and prevents tracking.
  • LinkedIn automatically shortens long ad URLs. LinkedIn's automatic link shortening is compatible with HubSpot's tracking and will not interfere with HubSpot's ability to apply the tracking template.

 

Troubleshoot ad tracking issues

An error will display on any ad that HubSpot cannot track. You can drill down into a campaign to see which specific ad(s) are affected by the error. If any of the following issues occur, HubSpot will not apply a tracking template to your ad, and contacts will not be attributed to those ads. Reporting data such as click and impression counts will still display. HubSpot will start tracking your ads and attributing contacts after the error is resolved. 

  • Auto-tracking is turned off: to resolve this issue, turn auto-tracking on for the ad account(s) in your HubSpot ads settings.
  • Insufficient permissions: if the user who connected an ads account to HubSpot does not have sufficient permissions, HubSpot will not be able to track ads for that account. To resolve this issue, ensure the user in your HubSpot account has the correct permissions for the Facebook AdsGoogle Ads, or LinkedIn Ads account.
  • Redirected ad URLs: redirected URLs are not compatible with HubSpot's ad tracking. URLs that redirect, including those that use link-shortening services (such as bit.ly and hubs.ly) will lose all tracking parameters during the redirect. Click tracking services that require a redirect will also remove HubSpot's tracking template. To resolve this issue, use the full, final URL for each ad, and don't use click tracking services that require a redirect.
  • Too many engagements (Facebook Ads only): Facebook uses an algorithm to optimize ads in their network. To prevent interfering with this optimization, HubSpot will not apply tracking to any ads that have more than 20 engagements at the time a Facebook Ads account is connected to HubSpot. To resolve this, duplicate the ad to create a new version with no engagements. Alternatively, manually apply HubSpot's tracking template to the ad in your Facebook Ads account:
    • In your Facebook Ads account, navigate to the Ad Manager.
    • Locate the campaign to edit, then click Edit.
    • Click the specific ad to edit.ad-tracking-in-facebook
    • In the Tracking section of the editor, click Build a URL parameter
    • Enter in each of the parameters from HubSpot's tracking template, omitting the hsa_src parameter (this is a variable that can only be added via API). 
    • Set the proper numerical values for your account ID, campaign ID, ad group ID, and ad ID for the hsa_acc, hsa_cam, hsa_grp, and hsa_ad parameters respectively.
  • Overriding customized tracking (Google Ads only): in Google Ads, customized tracking parameters on the ad group or ad level will override HubSpot's tracking template. To resolve this issue, remove any customized tracking on the ad group or ad level in your Google Ads account:
    • In your Google Ads account, navigate to your campaigns. 
    • In the left menu, click Ad groups then select the ad groups to edit. 
    • To remove custom parameters from the ad group, click the Edit dropdown menu and select Change tracking templates. Follow the instructions, then click the Edit dropdown menu again and select Change custom parameters and complete the steps. edit-google-ads-adgroup-tracking
    • Next, in the left sidebar menu, click Ads & extensions and select the individual ads to edit.
    • To remove custom parameters from the selected ads, click the Edit dropdown menu and select Change tracking templates. Follow the instructions, then click the Edit dropdown menu again and select Change custom parameters and complete the steps. edit-google-ads-ad-level-tracking

Please note: customized tracking on the campaign or account level does not interfere with HubSpot's tracking template, and is therefore compatible with HubSpot's ads tracking. Parameters added on the campaign or account levels in Google Ads will merge with the existing parameters in HubSpot's tracking template.

  • We can’t track your ads right now. We'll automatically try again every day: this error displays when HubSpot is unable to apply tracking to your ad, but is not getting more specific information from the network about the issue. If this error does not resolve itself, please contact HubSpot Support.

Once the issue(s) is resolved, HubSpot will attempt to apply the tracking template again within 15 minutes.

Please note: the ad networks' UI frequently update, and while HubSpot monitors these changes closely, keep in mind that the screenshots included here may not always match what you see in your ads account. 

Free Inbound Marketing Training Learn inbound marketing techniques that range from creating content, using  social promotion, converting and nurturing leads, and all the way to marketing  to your customers. Start the course