Connecting Gravity Forms to Mixpanel
Gravity Forms stores the entry in your own WordPress database, which makes it one of the easier sources to join correctly. Mixpanel is a product analytics tool, not an ad platform, which means it has no attribution model of its own and will faithfully report whatever event schema you give it — including a bad one. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Gravity Forms entry before the conversion happens, because Mixpanel can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Gravity Forms to Mixpanel: carry distinct_id into a hidden field
Read Mixpanel's distinct_id from the SDK with JavaScript into a hidden field just before submit, which survives caching and AJAX. Send the event from gform_after_submission with that distinct_id, form ID, entry ID as $insert_id and only non-sensitive segmentation fields, not email or phone. Name events by purpose, and decide your identity merge rule once.
Mixpanel only connects a form submission to the browsing that came before it if the server event carries the visitor's distinct_id. Gravity Forms can't populate that from PHP on a cached page, and the value lives in the browser anyway. So read it from the Mixpanel SDK with JavaScript and write it into a hidden field just before the visitor submits. That survives page caching and AJAX submission alike.
From gform_after_submission, send the event with that distinct_id, the form ID, the entry ID as $insert_id, and only the non-sensitive fields you need for segmentation, like service type or budget range. Don't send email or phone as event properties. If you want an identified profile, decide your identity merge rule once. A form submission isn't a signup on most WordPress sites, and identifying on every entry can merge different people who share a device.
Product teams use Mixpanel to compare forms, so name events per purpose, not per form ID. A multi-page Gravity Form also leaves a gap: Mixpanel only sees the final submission unless you track page changes in the browser. Check whether your form's page-change JavaScript event fires on your version before relying on it for drop-off reporting.
Gravity Forms → Mixpanel · what breaks
Why this join usually fails — Gravity Forms → Mixpanel
- 01
The distinct_id never reaches Gravity Forms
The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce.
- 02
Dynamic population fails silently under page caching
The field is configured correctly and still arrives empty, because the visitor was served a cached page rendered for someone else. This is the most common Gravity Forms failure and it looks like nothing is wrong.
- 03
One event schema, two teams, no agreement
Marketing names an event Purchase, the product team names it purchase_completed, and both are sent. Mixpanel treats them as unrelated, every funnel silently splits, and two teams spend a quarter arguing about which number is right when both are.
- 04
Nothing reconciles afterwards
Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.
Gravity Forms → Mixpanel · the fix
What working looks like — Gravity Forms → Mixpanel
The distinct_id on every entry
Conversions arriving in Mixpanel
The event lands on the user profile and becomes available in funnels, retention and cohort analysis.
Reconciled against the source
Gravity Forms → Mixpanel · architecture
How Gravity Forms and Mixpanel actually connect
- 1
Gravity Forms holds the truth
The entry lives in your database with every field value attached. You can query it, back it up and reconcile against it without depending on any third party, which is a real advantage over hosted form tools.
- 2
Mixpanel needs a click to match
Mixpanel needs a distinct_id, an event name and its properties. Events without a distinct_id are rejected; events with the wrong one land on a stranger's profile.
- 3
The identifier is the bridge
The distinct_id, captured at the visit and carried into the Gravity Forms entry.
- 4
The event source decides reliability
Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.
- 5
Deduplication at the destination
Mixpanel deduplicates on $insert_id within a time window. Without it, a retried server request creates a second event, and because Mixpanel is where product decisions get made, that inflation ends up in a roadmap rather than in an ad report.
Gravity Forms → Mixpanel · normal or broken
Working vs. broken, side by side — Gravity Forms → Mixpanel
Normal, not a fault
The distinct_id present on the entry
Sent from the gform_after_submission hook
Deduplicated correctly
Mixpanel deduplicates on $insert_id within a time window. Without it, a retried server request creates a second event, and because Mixpanel is where product decisions get made, that inflation ends up in a roadmap rather than in an ad report.
Reconciles with the source
Actually broken
The distinct_id missing on most records
The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce.
Sent from the browser
The field is configured correctly and still arrives empty, because the visitor was served a cached page rendered for someone else. This is the most common Gravity Forms failure and it looks like nothing is wrong.
Counted twice, or not at all
Marketing names an event Purchase, the product team names it purchase_completed, and both are sent. Mixpanel treats them as unrelated, every funnel silently splits, and two teams spend a quarter arguing about which number is right when both are.
Nobody has reconciled it
Gravity Forms → Mixpanel · diagnose
Diagnostic order — Gravity Forms → Mixpanel
- 01
Count entrys carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Submit a test entry through a cached page
Not through a logged-in admin session, which bypasses the cache. If the hidden field is empty on the cached path and populated on the admin path, caching is your cause.
- 04
List every event name in the project and look for near-duplicates
Case differences, tense differences and synonyms are the usual finding, and they are cheap to fix before a year of data is built on them.
- 05
Read the match rate, not the success message
Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.
Gravity Forms → Mixpanel · prove
How it gets proven — Gravity Forms → Mixpanel
Source of truth
The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.
- The distinct_id confirmed present on a live entry.
- Purchase events reconciled per transaction against your billing system, with identity aliasing verified across the signup boundary.
- Entry meta confirmed populated on a submission made from a fully cached page as an anonymous visitor.
Gravity Forms → Mixpanel · free audit
What we check in the free audit
- Count entrys carrying the distinct_id
- Follow one real conversion end to end
- Submit a test entry through a cached page
- List every event name in the project and look for near-duplicates
- Read the match rate, not the success message
Checked against
The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.
Free30 minutesNo obligation
Gravity Forms → Mixpanel · when not to buy
When you don't need this — Gravity Forms → Mixpanel
- Measure identifier coverage yourself first — pull your last hundred entrys and count how many carry the distinct_id.
- If your site has no caching layer and one form, a developer can wire this in an afternoon. Worth trying before hiring anyone.
- If you already have the same events in a warehouse and nobody is running product analysis on them, adding Mixpanel adds a second source of truth rather than an answer.
Gravity Forms → Mixpanel · what we deliver
What gets built — Gravity Forms → Mixpanel
Identifier capture into Gravity Forms
Hidden field with 'allow field to be populated dynamically' enabled and a parameter name set, plus a cookie fallback via a gform filter so the identifier survives a visitor who browsed several pages before converting.
Event source: the gform_after_submission hook
Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.
Dispatch to Mixpanel
The Mixpanel ingestion API, posted server-side from your backend with the distinct_id and event properties.
Reversals where they exist
Nothing to reverse, though entries marked spam should be excluded from the send.
Written guarantee
95%+ tracking accuracy
Measured against The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Gravity Forms → Mixpanel questions, answered
Write mixpanel.get_distinct_id() into a hidden field with JavaScript, then send the event from the gform_after_submission hook using that value and the entry ID as $insert_id.
Only if a submission really means a known account. Otherwise you risk merging different people who used the same device into one profile.
Almost always because the distinct_id never reached the Gravity Forms entry. The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce. Measure coverage before debugging the dispatch.
Mixpanel identifies people by distinct_id, which starts as an anonymous device value and should be aliased to your own user ID at signup. Getting that alias wrong is the single most common Mixpanel implementation failure: the anonymous pre-signup activity and the identified user become two separate people, and every funnel that crosses signup is broken.
The gform_after_submission hook. Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.
Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.
More on Gravity Forms → Mixpanel
- Gravity Forms → Google AdsConnecting Gravity Forms to Google Ads
- Gravity Forms → MetaConnecting Gravity Forms to Meta Conversions API
- Gravity Forms → GA4Connecting Gravity Forms to GA4
RELATED GUIDES
Where Gravity Forms → Mixpanel fits in the rest of your tracking
- Formstack → MixpanelConnecting Formstack to Mixpanel
- Ninja Forms → MixpanelConnecting Ninja Forms to Mixpanel
- Fluent Forms → MixpanelConnecting Fluent Forms to Mixpanel
- Gravity Forms → Adobe AnalyticsConnecting Gravity Forms to Adobe Analytics
- Gravity Forms → MatomoConnecting Gravity Forms to Matomo
- Home servicesConversion tracking for home service businesses, measured in completed jobs
- Jotform → MixpanelConnecting Jotform to Mixpanel
- Cognito Forms → MixpanelConnecting Cognito Forms to Mixpanel
Free · 30 min
Get Gravity Forms and Mixpanel joined properly
Free30 minutesNo obligation
