const queryString = window.location.search; // capture all query args document.addEventListener(‘om.Dtr.init’, function(event) { // use this event instead if added directly through the OM campaign builder // document.addEventListener(‘om.Campaign.load’, function(event) { // Registers {{query_args}} smart tag that outputs all query args from…Continue reading
document.addEventListener(‘om.Dtr.init’, function(event) { console.log(event.detail.Dtr); console.log(event.detail.Campaign); // Registers a custom `name` smart tag. event.detail.Dtr.setCustomVariable(‘name’, ‘Thomas’); } );Continue reading
document.addEventListener( ‘om.GoogleAnalytics.preConversionEvent’, function( event ) { const { gaEvent } = event.detail; gaEvent.params.your_param1 = param1value; gaEvent.params.your_param2 = param2value; } );Continue reading
document.addEventListener( ‘om.GoogleAnalytics.preConversionEvent’, function( event ) { const { gaEvent } = event.detail; gaEvent.name = ‘generate_lead’; // generate lead is a recommended event } );Continue reading