305 Snippets
<10 Favourites
<10 Downloads

registering query args as smart tag on campaign load

document.addEventListener('om.Campaign.load', function(event) { const queryString = window.location.search; // capture all query args // Registers a custom…

disable OptinMonster campaigns for visitors with specific user roles

function om_docs_hide_optin_for_user_roles( $campaigns ) { // Do nothing if no user is logged in. if (…

start Close

om{{id}}.startClose();

om-manually-set-global-cookies.js

// Set OptinMonster Global Cookies when this function runs function setGlobalCookies() { document.cookie = "omSuccessCookie=true; expires=Fri,…

slide-top-right.css

html div#om-{{id}} { top: 0px !important; bottom: unset !important; transition: top 0.3s ease 0s !important; }

What is Available

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

om.Html.customVars

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

om.Optin.success example 1

document.addEventListener('om.Optin.success', function(event) { event.detail.Campaign.startClose(); } );

Slide Reposition Top Right

html div#om-{{id}} { top: 0px !important; bottom: unset !important; transition: top 0.3s ease 0s !important; }

trigger monsterlink of an external link

jQuery(document).ready(function($){ // Change 'rt78pcbzrddo1y7w0yq3' to match your specific campaign slug var campaignSlug = 'rt78pcbzrddo1y7w0yq3'; // When…

1 14 15 16 17 18 26