How to control GTM Tags for jQuery to be loaded first?

Let's start

One method is to push an event to dataLayer when the popup is loaded.

the other method is you can fire your code and gtm.dom or gtm.load(when the page is completely loaded)

here is an article that will help you understand GTM triggers

https://www.simoahava.com/analytics/google-tag-manager-playing-rules/

if you are using this trigger for a click/form you can simply use the data validation offered by these trigger

enable check both options in check validation

set the time you would like to wait

you would have to create a variable for the element you are waiting and set the rule to match the value you are looking for

Don't miss out when new resources launch

Our customer analytics experts share wisdom only once a month

Share now
We are customer-analytics consultancy that transforms messy data into actionable insights that will help you grow your company and make better data-backed decisions.