Solved

Can't get UTMs from Gclid

  • 2 June 2022
  • 5 replies
  • 171 views

Badge

 Hello,

We are having problems in identifying traffic sources from UTMs, FBclid and Gclid. We set up Amplitude SDK in our digital asset with Google Tag Manager using Amplitude GTM Template.

This is how we set up the initilization:

 

We added the recommended option keys so we could track all the traffic. Despite of that, we are not getting any UTM from the gclid.

As an example we can search for our page in Google.

 

Then click in the ad and not getting any UTM data.

 

But the gclid is being captured without problems.

 

In this example from Google Analytics data in BigQuery, Gclid can be interpretated into UTMs but we’re not getting this information in Amplitude.

As a results of this, when we analyze User Composition by Source, we can’t find Google on it and also any Campaign and Keyword data from Google and some from Facebook.

 

icon

Best answer by Denis Holmes 5 June 2022, 14:14

View original

5 replies

Userlevel 4
Badge +7

Hey @joselarosa

AFAIK gclid is Google’s way of encrypting the URL parameter info so Google Analytics is the only platform that is able to decipher it. I believe that’s why Amplitude is only capturing gclid and not utm/referrer. I think you’ll need to move to manual tagging in Google Ads in order to capture utm/referrer information for that traffic

Userlevel 6
Badge +8

Hi @joselarosa ,

 

My understanding is that UTM tracking should work fine with GTM. You just need to make sure to initialize amplitude with the includeUtm option set to true. Which you have done. Then our SDK will pull the UTM data from the url/cookie and send those as user properties to amplitude. 

 

What are some reasons why the referrer/referring domain is (none)? What does this mean?

  1. Every page in which has the JS snippet will need to have the includereferrer set to true. If there is one page that does not have this config options, no referrer information will be captured from this entry point. I recommend taking a look through to see if all JS snippets has this option added. 

  2. Ad blocker can definitely break traffic source as well. Unfortunately there isn't much that can be done around this one. Are there any ad blockers present?

  3. Sometimes users might enter your website not from another website - i.e. they copied your website's link onto a Word doc for example and clicked directly from there. Referrer represents the referring site so therefore information will only appear if the user comes from another website. However, this does seem to be the case here. 

  4. But, regarding the above, if you only have last-touch attribution, the SDK will only save values at the start of the session so if a user triggers some flow that causes them to land on the site again with a different set of UTM parameters within the same session, that second set will not be saved. As such, we would recommend turning on multi-touch attribution: Web Attribution

  5. If the deviceID changes mid-session, it's possible that this will break the succession of referrer information as a new user profile is created instead. This isn't a typical behavior but a possibility. I would recommend looking into the rest of the above first before looking into this. 

  6. Amplitude's JavaScript SDK supports integration with Google Tag Manager. Take a look at our demo application for instructions on how to set it up here. 

I hope this helps for now! If you are still having trouble, do let me know and I will try to delve into the issue further. 

 

Kind Regards,
Denis

Badge

Hi @joselarosa ,

 

My understanding is that UTM tracking should work fine with GTM. You just need to make sure to initialize amplitude with the includeUtm option set to true. Which you have done. Then our SDK will pull the UTM data from the url/cookie and send those as user properties to amplitude. 

 

What are some reasons why the referrer/referring domain is (none)? What does this mean?

  1. Every page in which has the JS snippet will need to have the includereferrer set to true. If there is one page that does not have this config options, no referrer information will be captured from this entry point. I recommend taking a look through to see if all JS snippets has this option added. 

  2. Ad blocker can definitely break traffic source as well. Unfortunately there isn't much that can be done around this one. Are there any ad blockers present?

  3. Sometimes users might enter your website not from another website - i.e. they copied your website's link onto a Word doc for example and clicked directly from there. Referrer represents the referring site so therefore information will only appear if the user comes from another website. However, this does seem to be the case here. 

  4. But, regarding the above, if you only have last-touch attribution, the SDK will only save values at the start of the session so if a user triggers some flow that causes them to land on the site again with a different set of UTM parameters within the same session, that second set will not be saved. As such, we would recommend turning on multi-touch attribution: Web Attribution

  5. If the deviceID changes mid-session, it's possible that this will break the succession of referrer information as a new user profile is created instead. This isn't a typical behavior but a possibility. I would recommend looking into the rest of the above first before looking into this. 

  6. Amplitude's JavaScript SDK supports integration with Google Tag Manager. Take a look at our demo application for instructions on how to set it up here. 

I hope this helps for now! If you are still having trouble, do let me know and I will try to delve into the issue further. 

 

Kind Regards,
Denis

Hi @Denis Holmes ,

Thank you so much for your answer. I understand that we’ve already include ‘includeUtm’ parameter to our initilization tag and also it is triggered by the ‘Initialization’ trigger in GTM, despite of that we still have the same problem.

Userlevel 6
Badge +8

HI @joselarosa ,

 

Thanks for getting back to me! Would you be able to upgrade to the latest JS SDK available and try again? Once you have done that and it is still not working, can you PM me your Org email and Org ID and the affected Project ID and I will look into it with the Engineers, thank you!

Badge

Hello @Denis Holmes 

We’ve already updated the Amplitude GTM Template version but still having the problem. I’m going to PM you, thank you so much!

 

Reply