305 Snippets
<10 Favourites
<10 Downloads

om.DisplayRules.actions

document.addEventListener('om.DisplayRules.actions', function(event) { console.log(event.detail.DisplayRules); // An array of the Ruleset objects which have passed console.log(event.detail.DisplayRules.passed); console.log(event.detail.Campaign);…

om.Optin.error example

document.addEventListener('om.Optin.error', function(event) { const url = "http://optinmonster.com"; window.location.href = url; } );

Slide Reposition Bottom Left

html div#om-{{id}} { right: auto !important; margin-left: 20px !important; }

trigger monsterlink on hover

jQuery(document).ready(function($){ // Change 'rt78pcbzrddo1y7w0yq3' to match your specific campaign slug var campaignSlug = 'rt78pcbzrddo1y7w0yq3'; $('body').on('mouseover', '[href="https://app.monstercampaigns.com/c/'…

defer-om-embed-wordpress.php

function your_prefix_om_defer_script( $campaign_embed ) { $campaign_embed = str_replace( 's.async=true;', 's.defer=true;', $campaign_embed ); return $campaign_embed; }; add_filter(…

om-exclude-campaign-revenue-attribution.js

document.addEventListener('om.Campaign.init', function(event) { if ('CAMPAIGN_ID' === event.detail.Campaign.id) { // replace CAMPAIGN_ID with the OptinMonster campaign's unique…

CSS for Countdown Timer text

Translate the text ‘Days’, ‘Hours’, ‘Minutes’, and ‘Seconds’ into another language.

om.Iframes.init

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

om.Styles.init

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

om.Action.view

document.addEventListener('om.Action.view', function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); // This event is…

1 13 14 15 16 17 26