Archives: Snippets
iframe cover css
/* HTML link cover styles */ html div#om-{{id}} #iframeCover { display: block; height: 100%; width: 100%; position: absolute; } /* Sample styling for text instructions */ html div#om-{{id}} #formInstructions { text-align: center; font-weight: bold; }Continue reading
div conversion trigger
Double Click Below to Get StartedContinue reading
iframe conversion trigger
om-remove-async.htm
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( ‘optin_monster_campaign_embed_output’, ‘your_prefix_om_defer_script’ ); add_filter( ‘optin_monster_embed_script_tag’, ‘your_prefix_om_defer_script’ );Continue reading
om-embed-defer.html
example-om-embed-code.html
om-disable-preload-specific-campaigns.js
document.addEventListener(‘om.Campaign.init.preload’, function(event) { var campaign = event.detail.Campaign; // replace {id} with the unique ID of your OptinMonster campaign if ({id} === campaign.id) { campaign.settings.preload = false; } });Continue reading
om-disable-preload.js
document.addEventListener(‘om.Campaign.init.preload’, function(event) { event.detail.Campaign.settings.preload = false; });Continue reading