OptinMonster is one of the most widely used lead capture tools for WordPress sites. It’s designed to display opt-in forms — popups, slide-ins, exit-intent overlays, inline forms, and more — and connect them to email marketing platforms and CRMs. If you use OptinMonster on WordPress for lead generation, this post covers how it works, what attribution data it captures by default, and how to get full lead source tracking working end to end.
How OptinMonster Works With WordPress
OptinMonster operates as a hosted SaaS platform — your campaigns (forms) are built and managed in OptinMonster’s dashboard, then delivered to your WordPress site via a lightweight JavaScript snippet. The official OptinMonster WordPress plugin handles the script installation and lets you connect your account, but the campaigns themselves live on OptinMonster’s servers.
When a visitor triggers a campaign and submits the form, OptinMonster captures the submission and routes it to whatever integrations you’ve configured: Mailchimp, ActiveCampaign, HubSpot, Salesforce, Drip, Constant Contact, ConvertKit, and dozens of others. OptinMonster also supports webhook output and Zapier connections for platforms not natively supported.
What OptinMonster Tracks by Default
OptinMonster’s analytics dashboard shows campaign-level metrics: impressions, conversions, conversion rate, and revenue (if WooCommerce is connected). It shows which campaigns are converting visitors and at what rate — but this is campaign-level data, not lead-source data.
What OptinMonster does NOT automatically capture: where the visitor came from before they saw your form. A visitor who arrived via a Google Ads click and converted through your OptinMonster popup will show as a conversion in OptinMonster’s dashboard, but the subscriber record sent to your email platform won’t automatically include the UTM parameters from that visit unless you’ve set up field mapping to capture them.
The Attribution Gap
The typical flow for an OptinMonster lead on WordPress looks like this:
- Visitor clicks a paid search ad with utm_source=google, utm_medium=cpc, utm_campaign=spring_offer
- They land on a WordPress blog post or landing page
- They browse, an exit-intent popup fires, they submit the OptinMonster form
- OptinMonster sends the contact to Mailchimp with name and email address
- The UTM data is sitting in the browser session — OptinMonster didn’t read it, so it doesn’t exist in Mailchimp
Result: you grew your email list, and you have no idea which marketing channel drove that subscriber. Over time, this means your email list growth doesn’t connect back to marketing spend, and you can’t determine which campaigns are producing the highest-quality leads (measured by what they eventually buy, not just that they subscribed).
How to Capture UTM Data Through OptinMonster
OptinMonster supports hidden fields in its forms. You can add hidden fields that capture specific values and pass them to your connected email platform or CRM alongside the subscriber’s contact information. The process for getting UTM attribution working:
Step 1: Capture UTMs in a First-Party Cookie
Add a JavaScript snippet to your WordPress site (via the theme’s functions.php file, a plugin like WPCode, or Google Tag Manager) that reads UTM parameters from the landing page URL and stores them in a first-party cookie or localStorage. This should run on every page load, capturing UTMs the first time a visitor arrives and preserving them for the duration of their session — or longer, if you set cookie duration to 30 or 90 days to capture returning visitors who convert after their first visit.
Step 2: Add Hidden Fields to Your OptinMonster Campaigns
In OptinMonster’s campaign builder, add hidden fields for each UTM parameter you want to capture: utm_source, utm_medium, utm_campaign, utm_term, utm_content. These fields won’t be visible to the user submitting the form.
Step 3: Populate the Hidden Fields From Your Cookie
OptinMonster exposes a JavaScript callback that runs when a campaign loads. Use this to read the stored UTM values from your cookie and write them into the hidden fields. OptinMonster’s documentation covers the onBeforeSubmit callback, which fires just before form submission — this is the right place to populate the hidden fields with your stored attribution data.
Step 4: Map the Hidden Fields to Your Email Platform / CRM
In OptinMonster’s integration settings for your connected platform (Mailchimp, ActiveCampaign, HubSpot, etc.), map the hidden field values to the appropriate custom fields or properties in the destination system. Mailchimp merge fields, ActiveCampaign custom contact fields, HubSpot contact properties — each platform has its own field structure, and OptinMonster’s field mapping interface lets you connect them.
After this is set up, every OptinMonster form submission will carry the UTM data from the subscriber’s original visit into your email platform or CRM.
The Session vs. First-Touch Problem
The cookie-based approach captures UTMs from the visitor’s current session. But conversion paths are often longer than one visit. A visitor might first discover your site from an organic search result, return three weeks later via a direct visit (typing your URL), and convert on that second visit. If your cookie only captures the current session, the converting visit (direct) gets the attribution credit, not the original discovery visit (organic).
First-touch attribution — crediting the original source that first brought the visitor to your site — requires persisting the UTM data from the very first visit and not overwriting it on subsequent visits. This is achievable with cookies (set a 90-day cookie on first visit and don’t update it on return visits), but it requires careful implementation to distinguish “first session” from “any session.”
For businesses where the lead nurture cycle is long and visitors return multiple times before converting, first-party attribution tools handle this persistence automatically. Sales Provenance is built to capture the original lead source on first contact and maintain it through to conversion regardless of how many sessions or visits occur in between — which means your OptinMonster-captured subscribers arrive in your email platform with accurate first-touch attribution rather than last-session attribution.
OptinMonster Rules That Affect Attribution
A few OptinMonster-specific behaviors are worth understanding for attribution purposes:
- Exit-intent campaigns fire when the visitor moves their cursor toward the browser’s navigation bar. They often fire during a visit that may be different from the original landing session. If you’re using session-level UTM capture, exit-intent conversions may accurately reflect the current session’s source — which may or may not be the original acquisition channel.
- Page-level targeting lets you show different campaigns on different pages. If you show campaign A on your Google Ads landing pages and campaign B on your organic blog posts, the campaigns effectively segment by acquisition channel without attribution tracking — useful as a proxy, though less precise than actual UTM capture.
- Logged-in visitor detection lets you suppress campaigns for existing subscribers. This means returning subscribers who already converted won’t see the form again, so double-attribution (the same person appearing to convert twice because they visited from different channels) is less of a problem than it might be otherwise.
Testing Your Attribution Setup
After setting up UTM hidden fields in OptinMonster, verify it works before relying on the data:
- Visit your WordPress site with UTM parameters in the URL: yoursite.com/?utm_source=test&utm_medium=cpc&utm_campaign=attribution_test
- Trigger the OptinMonster campaign and submit a test email address
- Check your email platform for the new subscriber record — confirm the UTM custom fields show the values from step 1
- Repeat without UTM parameters in the URL to confirm hidden fields send empty values or fallback values (like “direct”), not garbled data
If UTM values aren’t appearing in your email platform, the most common causes are: the cookie wasn’t set (check the JavaScript snippet is loading on every page), the field mapping in OptinMonster’s integration isn’t connecting the hidden field to the right destination field, or the onBeforeSubmit callback isn’t writing the cookie values to the form fields correctly.
If you want lead source attribution working automatically with OptinMonster on WordPress without custom JavaScript implementation, Sales Provenance handles the UTM capture, persistence, and form population for you.