Reports

Ad tracking in HubSpot

Last updated: September 3, 2019

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. To attribute contacts to your ads, HubSpot applies tracking parameters to the end of your ad URLs. This allows HubSpot to determine which specific ad a contact interacted with. If HubSpot is unable to track an ad, reporting information such as 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 Google Smart Campaigns due to API limitations.
  • Facebook Ads: HubSpot can track most Facebook ad types but it cannot track ads placed on Instagram stories or Instagram feeds, and ads on Facebook that do not link to external sites, like Facebook Messenger ads.

Please note: while Facebook has a feature that allows you to crop your ad images to the 1.91:1 aspect, their API no longer supports this feature. Because of this, Facebook may prevent HubSpot from tracking ads with these cropped images. It is recommended that ad images are cropped outside of Facebook to prevent any ad tracking issues.

  • LinkedIn Ads: HubSpot is only able to track LinkedIn single image ads. Leads who submit Lead Gen Forms on any ad type will sync to HubSpot, even if the ad type is not trackable.

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:

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.
  • 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 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.

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

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.

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

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 or 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.
  • 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.
  • Tracking templates at the campaign level must either be blank or start with {lpurl} for HubSpot to track the ad.

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

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.
  • 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 troubleshooting section below.

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: The user who connected the ads account to HubSpot doesn't have sufficient permissions for the account or business page. To resolve this issue, make sure the user has the correct permissions for the Facebook Ads, Google Ads, or LinkedIn Ads account. Also make sure the user has sufficient permissions for the relevant Facebook or LinkedIn business page(s).
  • Redirected ad URLs: Redirected URLs are not compatible with HubSpot's ad tracking because URLs will lose all tracking parameters during the redirect. To resolve this issue, use the full, final URL for each ad, and don't use click tracking services that require a redirect.

    The following are the most common redirect situations that result in errors:
    • Link-shortening services, such as bit.ly and hubs.ly.
    • Click tracking services that require a redirect.
    • URLs that redirect from an http to an https version of your page.
  • 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.

      a-d-tracking-in-facebook-1
    • 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 and ad level in your Google Ads account:
    • To remove custom parameters from the ad group:
      • In your Google Ads account, navigate to your campaigns.
      • In the left menu, click Ad groups.
      • Select the checkboxes next to the ad groups you want to edit, or select the top checkbox to select all ad groups (recommended).
      • Click the Edit dropdown menu and select Change tracking templates.
      • Leave the field blank and click Apply to remove any existing tracking templates.
      • Click the Edit dropdown menu again and select Change custom parameters.
      • Select Remove parameters and click Apply to remove any additional custom parameters.
edit-google-a-dgroup-tracking
    • To remove custom parameters from individual ads:
      • In the left menu, click Ads & extensions.
      • Select the checkboxes next to the ads you want to edit, or select the top checkbox to select all ads (recommended).
      • Click the Edit dropdown menu and select Change tracking templates.
      • Leave the field blank and click Apply to remove any existing tracking templates.
      • Click the Edit dropdown menu again and select Change custom parameters.
      • Select Remove parameters and click Apply to remove any additional custom parameters.

        edit-google-a-d-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.

  • Your ad is using shared content or the tracking has been edited (LinkedIn only): LinkedIn uses the same identifiers on all ads that point to the same LinkedIn post. In ads reporting, this means that all interactions on these ads will only be attributed to the first ad that was created for that piece of content. For this reason, it's recommended to only create one ad for each existing piece of content on your LinkedIn company page, or to create an entirely new company post when creating Sponsored Content ads.
  • 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.
  • Unable to track this campaign type: This error displays for ad formats that cannot be tracked by HubSpot due to ad network API limitations.

Once an issue 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.