Skip to main content
Solved

UTM tracking with Amplitude GTM Template

  • July 1, 2022
  • 1 reply
  • 1652 views

Amplitude’s GTM template is not able to track the utms or referral source. I have set the all the parameters with page viewed tag but it doesn’t work. See the attached images.

 

 

here is the event raw json.

{
  "$insert_id": "9a533718-0fa2-4c79-9805-b8aeee9b3d87",
  "$row_source": "realtime",
  "$schema": 12,
  "_time": 1656694749835,
  "adid": null,
  "amplitude_attribution_ids": null,
  "amplitude_event_type": null,
  "amplitude_id": 424126236273,
  "app": 393948,
  "city": "Karachi",
  "client_event_time": "2022-07-01T16:59:09.835",
  "client_upload_time": "2022-07-01T16:59:09.835",
  "country": "Pakistan",
  "data": {
    "group_first_event": {
    },
    "group_ids": {
    }
  },
  "device_brand": null,
  "device_carrier": null,
  "device_family": "Windows",
  "device_id": "IoRfC1Ahq0KYb_V3gluG1v",
  "device_manufacturer": null,
  "device_model": "Windows",
  "device_type": "Windows",
  "display_name": "page_viewed",
  "dma": null,
  "event_id": 230,
  "event_properties": {
    "hostname": "tuio.com",
    "page_path": "/",
    "page_url": "https://tuio.com/?utm_source=testS&utm_medium=testM&utm_campaign=testC&gtm_debug=1656694723401"
  },
  "event_time": "2022-07-01T16:59:09.835",
  "event_type": "page_viewed",
  "group_properties": {
  },
  "groups": {
  },
  "idfa": null,
  "ip_address": "103.244.177.229",
  "is_attribution_event": false,
  "language": "English",
  "library": "amplitude-js-gtm/2.0.2",
  "location_lat": null,
  "location_lng": null,
  "os": "Chrome 103",
  "os_name": "Chrome",
  "os_version": "103",
  "partner_id": null,
  "paying": null,
  "plan": {
  },
  "platform": "Web",
  "region": "Sindh",
  "sample_rate": null,
  "server_received_time": "2022-07-01 16:59:10.437000",
  "server_upload_time": "2022-07-01T16:59:10.439",
  "session_id": 1656693127851,
  "start_version": null,
  "timeline_hidden": false,
  "user_creation_time": "2022-06-30T12:02:25.665",
  "user_id": "testing@gmail.com",
  "user_properties": {
    "Email": "testing@gmail.com",
    "Name": "test",
    "PH-TUIO-0006": "01",
    "Phone": "+923212574637",
    "Surname": "testt"
  },
  "uuid": "211e4a99-f95f-11ec-ab16-1db97ef78b78",
  "version_name": null
}

 

Best answer by Jacenda Davis

Hello @muffaddal. Thanks for your question and happy to help!

If you have set includeReferrer and includeUtm to true in your code and there are parameters available in your URL, then the UTM and referrer properties should be tracked as user properties on your events.

I triggered an event on your product and from what I can see the UTM and referrer properties are not being tracked in identify calls:

 

This leads me to believe that there is an issue in your instrumentation.

 

In this case, I suggest you leverage the Instrumentation Explorer to QA your instrumentation. 

Here are links on configuring web attribution for the JS SDK as well as how to use identify calls to set user properties on events.

 

I hope this helps!

 

-Jacenda

View original
Did this topic help you find an answer to your question?

1 reply

Jacenda Davis
Team Member
Forum|alt.badge.img+5
  • Team Member
  • 58 replies
  • Answer
  • July 2, 2022

Hello @muffaddal. Thanks for your question and happy to help!

If you have set includeReferrer and includeUtm to true in your code and there are parameters available in your URL, then the UTM and referrer properties should be tracked as user properties on your events.

I triggered an event on your product and from what I can see the UTM and referrer properties are not being tracked in identify calls:

 

This leads me to believe that there is an issue in your instrumentation.

 

In this case, I suggest you leverage the Instrumentation Explorer to QA your instrumentation. 

Here are links on configuring web attribution for the JS SDK as well as how to use identify calls to set user properties on events.

 

I hope this helps!

 

-Jacenda


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings