Skip to main content
Solved

Best way to configure JavaScript SDK in GTM?

  • November 8, 2022
  • 1 reply
  • 307 views

sinebycos

My website (E-learning website) is built with React and it is distributed in to micro-services like if users want to login, it will redirect them to login.mywebsite.com. If they want to start learning, then it will bring them to app.mywebsite.com.

So, I would like to install Javascript SDK via GTM, what is the best way to configure, especially the trigger? because I’ve tried like this https://share.cleanshot.com/26n173 but it did not work. The event just only registered to Amplitude one time and that’s it (but it fired in GTM correctly every time).

Looking forward for any help 😊

Best answer by Denis Holmes

Hi @sinebycos ,

 

Thanks for writing in! Usually, people would use our GTM Template which is described here. Have you been using the Amplitude GTM Template?

Did you trigger the event on each appropriate page or only on load up? While I am not overly familiar with GTM, it does sound like the event is only getting fired on the initial page visit and not after. Can you see if there is an option to trigger the event on multiple pages?  

 

Once you get back to me, we can proceed with troubleshooting. 

 

Kind Regards,
Denis

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

1 reply

Denis Holmes
Team Member
Forum|alt.badge.img+8
  • Team Member
  • 448 replies
  • Answer
  • November 10, 2022

Hi @sinebycos ,

 

Thanks for writing in! Usually, people would use our GTM Template which is described here. Have you been using the Amplitude GTM Template?

Did you trigger the event on each appropriate page or only on load up? While I am not overly familiar with GTM, it does sound like the event is only getting fired on the initial page visit and not after. Can you see if there is an option to trigger the event on multiple pages?  

 

Once you get back to me, we can proceed with troubleshooting. 

 

Kind Regards,
Denis


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