Forked from brianaohern/om-Analytics-conversion-example.js
Last active
November 15, 2018 19:56
-
-
Save jtsternberg/fb40c731b37a8c872c45762f0657e64d to your computer and use it in GitHub Desktop.
om.Analytics.track Example using Google Tag Manager to track a specific event in our Google Analytics account.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('om.Analytics.track', function(event) { | |
if ( 'conversion' === event.detail.Analytics.type ) { | |
dataLayer.push({ | |
'event': 'gaTriggerEvent', | |
'gaEventCategory': 'form', | |
'gaEventAction': 'submit', | |
'gaEventLabel': 'optin-monster' | |
}); | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment