Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtsternberg/41f05feeb628451d8388acdb13f0aaa4 to your computer and use it in GitHub Desktop.
Save jtsternberg/41f05feeb628451d8388acdb13f0aaa4 to your computer and use it in GitHub Desktop.
om.Analytics.track Example
document.addEventListener('om.Analytics.track', function(event) {
if ( 'conversion' === event.detail.Analytics.type ) {
console.log(event.detail.Campaign.id + '-' + event.detail.Campaign.type + ' successfully tracked a conversion.');
} else {
console.log(event.detail.Campaign.id + '-' + event.detail.Campaign.type + ' successfully tracked an impression.');
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment