OptinMonster Team
Member since March 2023
om-nextjs.js
import { useEffect } from 'react'; import { useRouter } from 'next/router'; const OptinMonsterEmbed = ()…
om-reactv4.js
// Using React Router V4 import React from "react"; import { withRouter } from "react-router"; class…
om-reactv3.js
// Using React Router V3 import { browserHistory } from 'react-router'; class App extends React.component {…
om-angularjs.js
// Using AngularJS. var myApp = angular.module('myApp', []); myApp.run(function($rootScope) { $rootScope.$on("$locationChangeStart", function(event, next, current) { if…
htmk to monsterlink
jQuery(document).ready(function($) { $('a[href="#"]').addClass("manual-optin-trigger"); $('a[href="#"]').attr("data-optin-slug", "pm6fnflhiocj7cge"); });
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 =…
om.Campaign.canShow
document.addEventListener('om.Campaign.canShow', function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); } );
om.Optin.init.submit
document.addEventListener('om.Optin.init.submit', function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); // This event is…