OptinMonster Team
Member since March 2023
om.Campaign.init.preload2
document.addEventListener('om.Campaign.init.preload', function(event) { var campaign = event.detail.Campaign; if ({slug} === campaign.id) { campaign.settings.preload = false; }…
om-nextjs14.js
'use client'; import { usePathname } from 'next/navigation'; import { useEffect, useState } from 'react'; export…
om-change-view.js
// Show the Yes/No view om{{id}}.changeView('yesno'); // Show the Optin view om{{id}}.changeView('optin'); // Show the Success…
And the Javascript to turn your HTML link into a MonsterLink v2
jQuery(document).ready(function($) { $('a[class*="campaign"]').addClass("manual-optin-trigger"); $('a[class*="campaign"]').attr("data-optin-slug", "pm6fnflhiocj7cge"); });
OM-revenue-attribution-curl.sh
curl --request POST \ --url https://app.optinmonster.com/v2/revenue \ --header 'Content-Type: application/json' \ --header 'Origin: optinmonster.com' \ --header…
Webhook smart tags
{ "smart_tags": { "region": "Gujarat", "state": "Gujarat", "province": "Gujarat", "territory": "Gujarat", "region_code": "GJ", "country": "India", "country_code":…
Dynamic Monsterlinks by Id
// Target by ID window.onload = function(){ document.getElementById("someID").href="MONSTERLINK_URL"; }
zapier-lead-data.json
{ "lead": { "email": "[email protected]", "ipAddress": "1.2.3.4", "referrer": "https://optinmonster.com/", "timestamp": 1699985224, "privacyConsent": true, "firstName": "Archie", "lastName":…
om-nextjs14-layout.tsx
import '@/app/ui/global.css'; import {RouteChangeListener} from '@/app/route-change-listener.tsx'; export default function RootLayout({ children, }: { children: React.ReactNode; })…