Set a cookie if the URL contains specific UTM parameters.

The below script checks the URL for specific UTM parameters and if found, saves a cookie…

Custom Separator

This code creates a custom separator smart tag for OptinMonster, which determines whether to use ?…

Privacy checkbox field remains at the top line

The following code snippet will ensure that the privacy checkbox remains at the top line if…

Remove All Campaigns From a Specific URL

document.addEventListener('om.Campaign.startShow', function(event) { if(window.location.href == 'https://example.com/specific-page') { // replace with your specific URL var optinCampaign =…

Remove Specific Campaign From a Specific URL

document.addEventListener('om.Campaign.startShow', function(event) { if(window.location.href == 'https://example.com/specific-page') { // replace with your specific URL var optinCampaign =…

Remove Specific Campaign From Any URLs Containing a Specific URL Path

document.addEventListener('om.Campaign.startShow', function(event) { if(window.location.search.indexOf('shopping-cart') > -1) { // replace shopping-cart wtih your specific URL path var…

Remove Specific Campaign Based on the Referral URL

document.addEventListener('om.Campaign.startShow', function(event) { if(document.referrer.search.indexOf('google.com') > 0) { // replace with the specific referral domain var optinCampaign…

Event Use

document.addEventListener('EVENT NAME', function(event) {} );

What is Available

document.addEventListener('om.Campaign.load', function(event) { console.log(event.detail); });

1 102 103 104 105 106 210