Solved

Properties in GTM vs. Properties in Amplitude

  • 20 April 2023
  • 2 replies
  • 114 views

Userlevel 1
Badge +1

Related to https://community.amplitude.com/data-instrumentation-57/amplitude-s-google-tag-manager-gtm-client-side-template-no-longer-seems-to-have-an-event-properties-field-1671  

Does anyone have information on whether to set event and user properties in the GTM tag, in the Amplitude event or both?

I’m seeing the properties in live data but in the event property, it shows a warning sign. Brought me to the question, should I be setting properties in GTM or in Amplitude properties? If both, when/how do you which should be used when?  

Thanks

icon

Best answer by dangrainger 24 April 2023, 10:46

View original

2 replies

Userlevel 5
Badge +8

Hi @mkoiva I’ve asked more of the team to look into this, but in the meantime, I’ve linked another resource with a few helpful links (in case you haven’t seen this). Part of the answer depends on how you’re currently set up using GTM.

Userlevel 5
Badge +9

I’ve just rebuilt our Amplitude implementation in GTM using the new Amplitude Analytics Browser SDK template. Still testing before publishing on our websites, here’s some general guidance.

  1. You’ll need to use three types of call from the template tag, namely “init”, “identify” and “track”...you might choose to use more for your specific implementation, but these three are the core
  2. “init” should fire earliest as it initialises Amplitude with your required options, such as your marketing tracking/ attribution options (https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/#configuration and https://www.docs.developers.amplitude.com/data/sdks/marketing-analytics-browser/#usage)
  3. “identify” should fire after “init” and before “track”, set your user properties in this (https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/#user-properties)
  4. “track” is what you use to capture your events/ event properties (https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/#tracking-an-event)

For the “track” calls I use GTM triggers/ exceptions. Then for the other two I simply use GTM’s tag sequencing functionality, putting “identify” as a set-up tag on all “track” event tags, and “init” as a set-up tag on the “init” tag. “track” and “identify” I’ve configured as firing “once per event” while “init” is set to “once per page”….though this may differ based on your needs.

Hope this is useful!

Reply