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:
- create custom event trigger uses specific event value (
gaevent
)
- create variables use other event-based parameters (
eventcategory, eventaction, eventlabel
)
- and tag uses pieces together.
beyond this, you'll need familiarise gtm. kind of pointless if site uses gtm, (assuming you're dev or analyst) not provided access.
Comments
Post a Comment