# Ads Attribution

**URL:** <https://community.hubspot.com/t/ads-attribution/13182>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [February 22, 2019, 8:45pm UTC](https://community.hubspot.com/t/ads-attribution/13182 "2019-02-22T20:45:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/justin4/32/31184_2.png) [@Justin4](https://community.hubspot.com/u/Justin4)\
**Post date:** [February 22, 2019, 8:45pm UTC](https://community.hubspot.com/t/ads-attribution/13182/1 "2019-02-22T20:45:12Z")

</div>

We are using a Vue.JS website, Hubspot Forms API and Adwords.

Ad Attributions are not working. This is important to us because the Ads dashboard can show us the all important Customer Acquisition Costs.

Here is what is done.

1) Adwords Auto Tagging Enabled

2) Hubspot Tracking Templates setup to use the utm parameters as well as the hubspot tracking template.

As you may know Internet Explorer needs the # in the url to be compatible with Vue.js applications.

For Example we have a Final Url of [Fleet GPS Tracking for Small Businesses | Momentum IoT](https://momentumiot.com/#/getstarted) The problem is google is putting the GCLID property before the #/getstarted, additionally the utm parameters in the tracking template append a ? to the final url which means that when someone clicks on our ad, the url they actually land on is [https://momentumiot.com/?gclid=EAFfD\_BwE#/getstarted?utm\_term=gps&utm\_source=adwords&utm\_medium=ppc&utm\_campaign=CPA-freegear-no%20audiences&hsa\_cam=1669917592&hsa\_ad=325865788922&hsa\_acc=5421955974&hsa\_mt=e&hsa\_net=adwords&hsa\_ver=3&hsa\_src=g&hsa\_tgt=kwd-11642161&hsa\_grp=66195819338&hsa\_kw=gps](https://momentumiot.com/?gclid=EAIaIQobChMIm9Sbm5DG4AIVZijTCh3bGQLhEAAYASAAEgJ4FfD_BwE#/getstarted?utm_term=gps&utm_source=adwords&utm_medium=ppc&utm_campaign=CPA-freegear-no%20audiences&hsa_cam=1669917592&hsa_ad=325865788922&hsa_acc=5421955974&hsa_mt=e&hsa_net=adwords&hsa_ver=3&hsa_src=g&hsa_tgt=kwd-11642161&hsa_grp=66195819338&hsa_kw=gps)

Notice the 2 ? in this url. One for the gclid and one for the utm\_term. While this url actually works and we can see the Original Source Drill Down, referrer and original source the Ads attribution doesn’t work.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 26, 2019, 9:51pm UTC](https://community.hubspot.com/t/ads-attribution/13182/2 "2019-02-26T21:51:15Z")

</div>

Hi, @Justin4.

Apologies for the delayed response. Our team has been working to address posts as quickly as possible.

I’ve touched base with Kristen and can confirm that the different sets of query strings, delineated by the two `?` symbols, prevent HubSpot’s ads tool from recognizing the `hsa_...` parameters and [properly attributing contacts](https://knowledge.hubspot.com/articles/kcs_article/ads/ad-tracking-in-hubspot).

I’ll need to touch base with the ads team to determine whether we can apply the ads tracking template in a manner compatible with Vue.js URL hashes (e.g. appending the parameters to `gclid` instead of in their own query string). Stay tuned.

In the meantime, can you expound upon exactly what you mean by “Internet Explorer needs the `#` in the url to be compatible with Vue.js applications”? I know a little about Vue.js’ compatibility issues with, for example, IE8, but I haven’t found anything specifically citing hashes/fragment identifiers. Thanks for your help on this!

---

<div class="post-metadata">

**Author:** ![Justin4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/justin4/32/31184_2.png) [@Justin4](https://community.hubspot.com/u/Justin4)\
**Post date:** [March 5, 2019, 6:31pm UTC](https://community.hubspot.com/t/ads-attribution/13182/3 "2019-03-05T18:31:07Z")

</div>

Thanks for your reply. Basically, IE 10 and IE 11 don’t support the history api that VUE uses so the # needs to be there for IE 10 and IE 11 to work.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 5, 2019, 9:50pm UTC](https://community.hubspot.com/t/ads-attribution/13182/4 "2019-03-05T21:50:58Z")

</div>

Thanks for clarifying, @Justin4.

The ads team is still investigating the issue. I’ll update here when I have more information. You may also hear directly from Kristen, as she’s looped in as well.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 15, 2019, 1:23am UTC](https://community.hubspot.com/t/ads-attribution/13182/5 "2019-03-15T01:23:14Z")

</div>

Hi, @Justin4.

Thanks for your patience.

After further investigation, we have found that the Google Ads [tracking template](https://support.google.com/google-ads/answer/7197008?hl=en) method, [which HubSpot uses](https://knowledge.hubspot.com/articles/kcs_article/ads/ad-tracking-in-hubspot#facebook-ads), is _incompatible_ with single-page applications using hashes and AJAX fragments like `/#/`.

As outlined in [Google’s documentation](https://support.google.com/google-ads/answer/6277564?hl=en):

**If you use an anchor or AJAX fragment in your final URL and your tracking template appends extra parameters to the end of the final URL, then you must put all the tracking parameters in your final URL.**

In practice, this means that you must manually add:

`?{ignore}utm_term={keyword}&utm_source=adwords&utm_medium=ppc&utm_campaign={_utmcampaign}&hsa_cam={campaignid}&hsa_ad={creative}&hsa_acc=5421955974&hsa_mt={matchtype}&hsa_net=adwords&hsa_ver=3&hsa_src={network}&hsa_tgt={targetid}&hsa_grp={adgroupid}&hsa_kw={keyword}`

_after_ the `https://momentumiot.com` part of the final URL but _before_ any `#` symbols _whenever you create a new Google Ads campaign_.

For example, if you want the campaign to send visitors to `https://momentumiot.com/#/new-promotional-page`, then you would end up putting

`https://momentumiot.com/?{ignore}utm_term={keyword}&utm_source=adwords&utm_medium=ppc&utm_campaign={_utmcampaign}&hsa_cam={campaignid}&hsa_ad={creative}&hsa_acc=5421955974&hsa_mt={matchtype}&hsa_net=adwords&hsa_ver=3&hsa_src={network}&hsa_tgt={targetid}&hsa_grp={adgroupid}&hsa_kw={keyword}#/getstarted`

into Google Ads as the campaign’s _Final URL_.

Per Google’s documentation, all parameters which lie between an `{ignore}` token and a `#` will be treated as tracking parameters. This method of inserting tracking parameters _before_ hashes and fragments is also consistent with [RFC 3986 section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2).

For best results, I also recommend:

1. Toggling _off_ HubSpot auto-tracking for the “Momentum IoT” Google Ads account [here](https://app.hubspot.com/settings/4661209/marketing/ads/adAccounts) in **Settings** \> **Marketing** \> **Ads** \> **Accounts**.
2. Removing the existing HubSpot tracking template from the _account_ level in your Google Ads account. See the GIF below for the location of this setting.

![Account level tracking template in _new_ AdWords experience.gif](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/d/bd5b50fe19ca6ae42b942322eb0a1dfb3c00e237.gif)

Disabling auto-tracking and removing the tracking template from your Google Ads account is not necessary, but will prevent `hsa_` and `utm` tracking parameters from applying twice to your final URLs.

I am sorry that we couldn’t find an ideal solution for you. The ads team now knows that Google Ads tracking templates are not compatible with URLs containing hashes or anchors and will try to advocate on behalf of customers like you until Google supports such URL structures. Please let me know if you have any additional questions.

---

<div class="post-metadata">

**Author:** ![twomy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/twomy/32/99949_2.png) [@twomy](https://community.hubspot.com/u/twomy)\
**Post date:** [February 24, 2020, 5:50am UTC](https://community.hubspot.com/t/ads-attribution/13182/6 "2020-02-24T05:50:42Z")

</div>

cccccccccc\<i\>jjjcccccc[ccccccccccc.com"tt](http://ccccccccccc.com)

javascript&colon;ffffffdddddddd

uuuuuuuuuuuuu
