Issues with GTM SS Amplitude HTTP API V2 Tag

Hi @Ada

I am currently facing a weird issue while using this tag for sending self-describing events and contexts to Ampitude.

I am trying to use the snowplow event context rules to add simpler names for contexts and wrap other properties, but it doesn’t work.

All the contexts and events are added to the event property itself. Adding an optional mapped name has no effect at all.
{ "$insert_id": "c6ef3124-b53a-4b13-a233-0088f79dcb12", "$schema": 13, "_time": 1700537091313, "amplitude_attribution_ids": null, "amplitude_id": 771508240881, "app": 531564, "city": "San Francisco", "client_event_time": "2023-11-21 03:24:51.313000", "client_upload_time": "2023-11-21 03:24:51.313000", "country": "United States", "data": { "group_first_event": { }, "group_ids": { }, "path": "/2/httpapi" }, "device_carrier": "AT&T", "device_family": null, "device_id": "de81d764-990c-4fdc-a37e-adf526909ea6", "device_type": null, "display_name": "page_view", "dma": null, "event_id": 531825997, "event_properties": { "contexts_com_snowplowanalytics_snowplow_user_1.deviceFamily": "Other", "contexts_com_snowplowanalytics_snowplow_user_1.email": "jayant1234@abc ![Tag Configs|690x257](upload://nAByJcOngMMcYdf0USXIsqd4bkI.png) .com", "contexts_com_snowplowanalytics_snowplow_user_1.osFamily": "Windows XP", "contexts_com_snowplowanalytics_snowplow_user_1.osVersion": "Windows XP", "contexts_com_snowplowanalytics_snowplow_user_1.uid": "2b15e5c8d3b111e4b9d6", "contexts_com_snowplowanalytics_snowplow_user_1.useragentMinor": "0", "contexts_com_snowplowanalytics_snowplow_user_1.useragentVersion": "IE 7.0", "contexts_org_w3_performance_timing_1.connectEnd": 1415358090183, "contexts_org_w3_performance_timing_1.connectStart": 1415358090103, "contexts_org_w3_performance_timing_1.domComplete": 0, "contexts_org_w3_performance_timing_1.domContentLoadedEventEnd": 1415358091309, "contexts_org_w3_performance_timing_1.domContentLoadedEventStart": 1415358090968, "contexts_org_w3_performance_timing_1.domInteractive": 1415358090886, "contexts_org_w3_performance_timing_1.domLoading": 1415358090270, "contexts_org_w3_performance_timing_1.domainLookupEnd": 1415358090102, "contexts_org_w3_performance_timing_1.domainLookupStart": 1415358090102, "contexts_org_w3_performance_timing_1.fetchStart": 1415358089870, "contexts_org_w3_performance_timing_1.loadEventEnd": 0, "contexts_org_w3_performance_timing_1.loadEventStart": 0, "contexts_org_w3_performance_timing_1.navigationStart": 1415358089861, "contexts_org_w3_performance_timing_1.redirectEnd": 0, "contexts_org_w3_performance_timing_1.redirectStart": 0, "contexts_org_w3_performance_timing_1.requestStart": 1415358090183, "contexts_org_w3_performance_timing_1.responseEnd": 1415358090265, "contexts_org_w3_performance_timing_1.responseStart": 1415358090265, "contexts_org_w3_performance_timing_1.unloadEventEnd": 1415358090287, "contexts_org_w3_performance_timing_1.unloadEventStart": 1415358090270, "self_describing_event_com_snowplowanalytics_snowplow_page_view_1.elementClasses": [ "foreground" ], "self_describing_event_com_snowplowanalytics_snowplow_page_view_1.elementId": "exampleLink", "self_describing_event_com_snowplowanalytics_snowplow_page_view_1.event": "page_view", "self_describing_event_com_snowplowanalytics_snowplow_page_view_1.event_id": "c6ef3124-b53a-4b13-a233-0088f79dcbcb", "self_describing_event_com_snowplowanalytics_snowplow_page_view_1.event_name": "page_view", "self_describing_event_com_snowplowanalytics_snowplow_page_view_1.targetUrl": "http://abc.com" }, "event_time": "2023-11-21 03:24:51.313000", "event_type": "page_view", "group_properties": { }, "groups": { }, "ip_address": "92.231.54.234", "language": null, "library": "http/2.0", "location_lat": 37.443604, "location_lng": -122.4124, "os": "", "os_name": null, "os_version": null, "partner_id": null, "paying": null, "plan": { }, "platform": "web", "processed_time": "2023-11-21 03:24:53.019000", "region": "CA", "sample_rate": null, "server_received_time": "2023-11-21 03:24:51.313000", "server_upload_time": "2023-11-21 03:24:51.317000", "session_id": -1, "source_id": null, "start_version": null, "timeline_hidden": false, "user_id": "jon.doe@email.com", "user_properties": { }, "uuid": "cbdc2012-e452-4fe0-8523-d7392012a3a2", "version_name": null }

As you can see, user_properties is simply empty.

Hi @Jayant_Kumar ,

I haven’t been able to reproduce the issue you are describing.

From the screenshot it looks like you are using an older version of the Amplitude HTTP API V2 GTM-SS tag: as you can see in the Snowplow Event Context Rules section in the docs, the UI is a bit different than the one you are using. So a first idea would be to upgrade to the latest template.

By the way, i see that you are attempting to use the Entities’ mapping table on an unstruct_event_.... This is not expected to work. If your intention is to include the self-describing event, but rename it, the way to do so would be:

  1. Uncheck Include Self Describing Event
  2. Use the Additional Event Mapping Options to rename. Please notice that the way to reference a self-describing event into this section, is through its full/common/client name, e.g. x-sp-self_describing_event_com_acme_test_event_1.

Hopefully this helps!

1 Like

Thank you for your response on this @Ada , I can check for the version part to see if that works.