ads

Ad tracking in HubSpot

Last updated: October 13, 2020

Applies to:

All products and plans

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

How ad tracking in HubSpot works

Tracking allows HubSpot to attribute contacts to specific ads, by applying tracking parameters to the end of your ad URLs. After you connect your ad account, HubSpot will apply tracking to ads that are currently active or pending review. If HubSpot is unable to track an ad, some reporting data from the network like clicks and impressions, will still display for that ad in the HubSpot ads tool.

HubSpot is only able to track the following types of ads for contact attribution:

  • Google Ads: HubSpot can track most Google ad types, including YouTube ads, but it cannot report on or track Smart campaigns or Discovery campaigns due to API limitations.
  • Facebook Ads: HubSpot can track most Facebook ad types but it cannot track ads on Facebook that do not link to external sites (e.g., Facebook Messenger ads).
  • Instagram AdsHubSpot can only track ads placed on Instagram if they received no engagements, such as likes or comments. Due to API limitations, any existing engagements on an Instagram ad would be reset if tracking were applied.
  • LinkedIn Ads: HubSpot can track most LinkedIn ads, but it cannot track carousel or Message ads. Leads who submit Lead Gen Forms on any ad type will sync to HubSpot, even if the ad type is not trackable.

If you edit the name of an ad campaign, the utm_campaign value in HubSpot's tracking template will not automatically update. HubSpot will continue to track the ad, but if you rely on the utm_campaign parameter for other systems, you may need to update the ad URL. To update the URL to match the new ad campaign name, do one of the following:

  • In the ad network, manually edit the ad campaign URL to reflect the new name.
  • In the ad network, remove the utm_campaign parameter and value entirely, then save. HubSpot will detect the missing parameter and automatically update the URL.

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.

ad-accounts-auto-tracking-1

  • To disable HubSpot tracking for your ads, click to toggle the Auto tracking switch off. This will remove HubSpot access to your tracking settings, but will not remove the existing tracking parameters from your ads. You can remove these parameters from within Google Ads, Facebook Ads, and LinkedIn Ads.

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:

utm_source=facebook
utm_medium=paid
utm_campaign={Name of Ad campaign}
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
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, with the exception of hubs.ly). Link shorteners strip parameters from the end of the URL and prevents tracking.
  • The URL in the Facebook ad cannot redirect because HubSpot's tracking parameters are stripped during redirects.Only use the final, non-redirecting version of a URL. This includes http to https redirects.
  • Existing ads must have fewer than 20 engagements when you first connect your Facebook Ads account to HubSpot to be tracked. This prevents Facebook's ad optimization algorithm from being reset. If an ad has 20 or more engagements, you can override the limit to apply HubSpot tracking.

If you meet all of the above requirements but are seeing errors, check out the tracking troubleshooting guide.

Override Facebook Ads tracking limits for existing ads

When you enable auto tracking for your Facebook Ads account, HubSpot will apply tracking templates to your existing ads. By default, HubSpot will not apply a tracking template to Facebook ads that have more than 20 engagements. This is done automatically due to Facebook's ad optimization procedures.

HubSpot will display an error message next to any Facebook ads that aren't being tracked due to engagement limit. 

tracking_alert_campaigns_page
To track a Facebook ad that has reached its engagement limit:

  • In your HubSpot account, navigate to Marketing > Ads.
  • Click the ad campaign that the untracked ad is under.
  • Click the ad set that the untracked ad is under.
  • Hover over the ad, then in the alert, click Fix alert.

    tracking_alert_alert-fix-this
  • In the dialog box, click Yes, add tracking.

    tracking_alert_confirmation-1

HubSpot will then append its tracking parameters to the ad, allowing you to track engagements on that ad in HubSpot.

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. 

HubSpot adds the following URL parameters to each Google ad:

utm_term={keyword}
utm_source=adwords
utm_medium=ppc
utm_campaign={_utmcampaign} - set by default to the name of the Ads campaign
hsa_cam={campaignid}

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

hsa_tgt={targetid}
hsa_ver=3

Please note: when HubSpot's ad tracking template is applied to your Google ads, the update will be reflected in the Change History of your Google Ads account. The user associated with the change will be the user who connected the ad account to HubSpot.

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, with the exception of hubs.ly). Link shorteners strip parameters from the end of the URL and prevents tracking.
  • Only use the final, non-redirecting version of a URL. This is because a redirect will remove HubSpot's tracking parameters. This includes http to https redirects and third-party click tracking services.
  • Customized tracking parameters should not be added at the ad group or ad level, as HubSpot's parameters do not take precedence over them.
  • Existing custom tracking parameters or tracking templates at the campaign level must either be blank or start with {lpurl} for HubSpot to track the ad.
  • HubSpot is not able to track or report on Smart Campaigns (formerly Google Express Campaigns). If your Google Ads account is in Smart Mode, your ads will not display in HubSpot. Learn how to check if your Google Ads account is in Smart Mode.

If you meet all of the above requirements but are seeing errors, check out the tracking troubleshooting guide.

Google auto-tagging

Google auto-tagging is also compatible with HubSpot's ad tracking template. To set up auto-tagging, you'll need to manually update your tracking template in your Google Ads account:

  • Navigate to your Google Ads account.
  • In the left sidebar menu, click Settings, then click Account Settings.
  • Click Tracking.
  • Under Tracking Template, enter the parameters below, replacing the value for hsa_acc with the account ID of your Google Ads account.
{lpurl}?utm_feeditemid={feeditemid}&utm_device={device}&utm_term={keyword}&utm_source=google&utm_medium=ppc&utm_campaign={utmcampaign}&hsa_cam={campaignid}&hsa_grp={adgroupid}&hsa_mt={matchtype}&hsa_src={network}&hsa_ad={creative}&hsa_acc={ID of account/customer}&hsa_net=adwords&hsa_kw={keyword}&hsa_tgt={targetid}&hsa_ver=3
  • Under Final URL, enter the parameters below, replacing the value for hsa_acc with the account ID of your Google Ads account.
utm_feeditemid={feeditemid},utm_device={device},utm_term={keyword},utm_source=google,utm_medium=ppc,utm_campaign={utmcampaign},hsa_cam={campaignid},hsa_grp={adgroupid},hsa_mt={matchtype},hsa_src={network},hsa_ad={creative},hsa_acc={ID of account/customer},hsa_net=adwords,hsa_kw={keyword},hsa_tgt={targetid}

autotagging-in-google-ads-account

 

LinkedIn Ads

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

HubSpot adds the following URL parameters to each LinkedIn ad:

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

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, with the exception of hubs.ly). Link shorteners strip parameters from the end of the URL and prevents tracking.
  • The URL in the LinkedIn ad cannot redirect because HubSpot's tracking parameters are stripped during redirects. Only use the final, non-redirecting version of a URL. This includes http to https redirects.
  • 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.

If you meet all of the above requirements but are seeing errors, check out the tracking troubleshooting guide.

Troubleshoot ad tracking issues

An error will display on any ad that HubSpot cannot track. When tracking errors 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. Check out the tracking troubleshooting guide to learn how to resolve tracking errors.

HubSpot will start tracking your ads and attributing contacts after the error is resolved.