You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the GTM demo, I see that the Amplitude SDK initialization is separate from setting the user_id from GTM. This can lead to race conditions where events are fired before the user_id is set.
I'm wondering if there's a way to set the user_id from GTM so that it's part of the Amplitude SDK initialization
amplitude.getInstance().init("API_KEY", userId); // initializes client with the given userId
I have a question about integrating the Amplitude SDK with GTM:
https://github.com/amplitude/GTM-Web-Demo
In the GTM demo, I see that the Amplitude SDK initialization is separate from setting the user_id from GTM. This can lead to race conditions where events are fired before the user_id is set.
I'm wondering if there's a way to set the user_id from GTM so that it's part of the Amplitude SDK initialization
amplitude.getInstance().init("API_KEY", userId); // initializes client with the given userId
https://developers.amplitude.com/docs/javascript#setting-user-id
The text was updated successfully, but these errors were encountered: