Knowing when Google Analytics has loaded when loaded via Google Tag Manager -


we're using gtm load universal analytics , want send custom events js ga. need this:

ga('send', {     hittype: 'event',     eventcategory: 'legitimation',     eventaction: 'is returning customer',     noninteraction: true }); 

but don't know when ga has loaded since gtm makes async. how can know when ga() ready?

sending ga events not through tag manager if load ga through gtm little bit tricky. can´t use normal events use if have ga hardcoded on page.

here thread - answering question: https://productforums.google.com/forum/#!topic/tag-manager/c2j4nt8dbxw

i suggest send datalayers instead of events, catch datalayers gtm , send events through gtm. makes lot easier.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -