jquery - dataLayer.push() doesn't trigger an HTTP request -


i triggering google analytics event on page load code:

datalayer.push({     'event': 'gaevent',     'eventcategory': 'data-harvest',     'eventaction': 'form-submitted',     'eventlabel': 'vr-gear' }); 

it happens on document.ready() , there no errors in console, reason doesn't trigger http request. idea why that?

if not using google tag manager, that's expected result. datalayer specific json object gtm defines , deploys in order fire tags , acquire various pieces of information page. uses special 'event' fire custom tags. google analytics not utilise datalayer that's why, without gtm, won't see http requests.

if using gtm need have edit access @ least, , you'll need to:

  1. create custom event trigger uses specific event value (gaevent)

enter image description here

  1. create variables use other event-based parameters (eventcategory, eventaction, eventlabel)

enter image description here

  1. and tag uses pieces together.

enter image description here

beyond this, you'll need familiarise gtm. kind of pointless if site uses gtm, (assuming you're dev or analyst) not provided access.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -