Solved

What source to use for the new Google Tag Manager Template "Amplitude Analytics Browser SDK"

  • 10 February 2023
  • 10 replies
  • 375 views

Badge +1

I send data with GTM and the new Template "Amplitude Analytics Browser SDK", and it works. I see the events as a unknown source.

I tried to create it as a source by using the “Google Tag Manager” option but it is stalled at listening for the events coming.

I the tried the “Browser SDK” source, but the events send are not automatic detected. 

I also tried to create a HTTP API source, but with same result.
The events i send will not associate them self with the source.
 

How do I ensure that the event form this specific GTM container using the Amplitude Analytics Browser SDK template are recognized as a source, and what source type should I use ?
 
I know i can add a property like “data_source=GTM-W639JT” to all events, but was under the assumption that Sources was to be used for this purpose. 

icon

Best answer by r0bbieWa11ace 15 February 2023, 04:38

View original

10 replies

Userlevel 2
Badge +3

Hey @Rune Andersen ! Happy to help! I believe the Browser SDK is the preferred method to use with the GTM Template. What are you using for a trigger to fire the Tag Template?

similar issue. 

trigger is all pages

Badge +1

@r0bbieWa11ace 
Trigger for the Init event is a cookie-consent-accepted trigger, but similar to a “All Pages” trigger.

For the other events it’s different but normal GTM “Custom Event” triggers.
I had to move the setup to a EU account, but it’s the same issue.
The event are not recognized as either HTTP API or Browser SDK. And the GTM option are stuck as listening for events.

Userlevel 2
Badge +3

@Rune Andersen : Another customer has raised this issue and we are working to resolve. Can you send a ticket to support within the Amplitude UI (Click the Icon on the Bottom Right to open up the options)

In the short-term if you need some data, you can leverage the Legacy Tag Template. Please let me know if you experience the same outcome with the Legacy Template.

-Robbie

Userlevel 2
Badge +3

@Rune Andersen : Have you set up a tag to initiate the SDK? If you haven’t yet, create a new Tag, add your API Key, change event type to “init” and add a trigger to enable on all pages. 

This was a change in the newest version of the tag template to allow you to initiate the tag based on user consent requirements. If a user declines to be tracked, then the sdk will not initialize and no data will be collected. If they accept cookies OR do not set their consent to block, then it will allow your data to be collected and sent to amplitude.

Let me know if this resolves the issue.

 

Best,

 

Robbie

Badge +1

@r0bbieWa11ace 
To answer both your replies.
Yes i have a Init tag, firing on all pages before any other Amplitude event tags.

I tried to add the legacy tag and it instantly creates the “Google Tag Manager” source and is auto-named.

Is this actual an issue from a data-collection perspective ?
What do I miss by the source being  “unknown” ?. Are any functionality broken or is it primarily a visual issue ?

I’m still on a Trial account while the client im working for decides what plan to go with.
So it does not seem like im able to create a support case. 

Userlevel 2
Badge +3

@Rune Andersen : If you are wanting to track the specific GTM Container it will have to be hardcoded. This has been recommendation I have been providing customers so if they have multiple GTM containers to help give yo this level of validation within the UI.

Badge +1

FYI @r0bbieWa11ace i don’t consider this bug fixed.
The new GTM template is still not recognized as a valid source in the Amplitude Data UI. 

Badge +1

FYI @r0bbieWa11ace it’s now fixed and events are automatic detected as “amplitude-js-gtm” 👍

Userlevel 2
Badge +3

Thanks @Rune Andersen ! I appreciate the follow up. Apologies on my end. I did hear that engineering was aware of this issue and was actively working on it last week. Glad to see the change was successfully released!

Reply