document.addEventListener(‘om.Campaign.init’, function(event) { if (‘CAMPAIGN_ID’ === event.detail.Campaign.id) { // replace CAMPAIGN_ID with the OptinMonster campaign’s unique ID event.detail.Campaign.settings.revenueAttribution = false; } });Continue reading
document.addEventListener(‘om.Campaign.load’, function(event) { const queryString = window.location.search; // capture all query args // Registers a custom `query_args` smart tag that outputs all query args from the current page. event.detail.Campaign.Dtr.setCustomVariable(‘query_args’, queryString); });Continue reading
document.addEventListener(‘om.Campaign.load’, function(event) { const queryString = window.location.search; // capture all query args // Registers a custom `query_args` smart tag that outputs all query args from the current page. event.detail.Campaign.Dtr.setCustomVariable(‘query_args’, queryString); });Continue reading
document.addEventListener(‘om.Styles.positionPopup’, function(event) { const campaign_selector = “#om-” + event.detail.Campaign.id + “-” + event.detail.Campaign.view; $(campaign_selector).dragon(); } );Continue reading
document.addEventListener(‘om.Styles.positionPopup’, function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); // This event is passed the Styles object console.log(event.detail.Styles); } );Continue reading