On this page
What this issue is
Autocapture is a setting in PostHog and Heap that records user actions such as clicks, form changes and page views without you writing code for each one. It is handy, but it has limits. It logs that someone clicked a button. It does not know that the click led to a paid order or a saved lead.
The issue appears when your conversion is not a plain click or a classic form submit. Examples: a form that sends data with JavaScript (fetch or XHR) and shows a message with no page load, a button inside an iframe or a shadow DOM, a checkout that finishes on another domain, or a thank-you state that never changes the URL. Autocapture may record the click but never the result, or record nothing.
Why it costs you leads or sales
Missing conversion events do not stop visitors buying. They hide what works. If a funnel shows 2% conversion when the real figure is higher, you may cut a good landing page, pause a good ad, or ship a worse variant of an A/B test. Teams that feed these events into cohorts or alerts also get wrong results.
- Landing page viewPageview captured
- Click SubmitClick captured by autocapture
- Form sent by scriptNo native submit event, nothing captured
- Success messageNo page load, no event
- Conversion in funnelNever counted
The click is recorded, but the success moment is never sent, so the funnel ends early.
Example: 100 real leads in a week. Autocapture-based funnel counts only some; a named event counts all. Numbers are illustrative.
How to check if your site has it
Open the live view
In PostHog, open Activity (live events). In Heap, use Live or the Events view. Keep it open in one tab.
Complete the conversion yourself
In another tab, submit your form or place a test order. Use your own details and, for stores, test mode only.
Look for the success event
You should see an event that clearly marks the conversion, not just a
$autocaptureclick or a pageview. If you only see clicks, the conversion is missing.Check the event properties
Open the event. Confirm it has the page URL, the form or product name, and your user ID if you identify users.
Test the awkward paths
Repeat with a form in a popup, an embedded iframe form, and the mobile layout. Autocapture often fails in these.
How to fix it
The reliable fix is to stop depending on autocapture for conversions. Send one explicit event at the moment the conversion succeeds, such as after the server replies OK or on the thank-you page. Keep autocapture on for general exploration.
fetch('/api/lead', { method: 'POST', body: new FormData(form) })
.then(function (res) {
if (res.ok) {
posthog.capture('lead_submitted', {
form_name: 'contact',
page: location.pathname
});
}
});fetch('/api/lead', { method: 'POST', body: new FormData(form) })
.then(function (res) {
if (res.ok) {
heap.track('lead_submitted', {
form_name: 'contact',
page: location.pathname
});
}
});Create a trigger
Add a Custom Event trigger (for example
generate_leadpushed to the dataLayer) or a Page View trigger limited to your thank-you URL.Add a Custom HTML tag
Use
<script>posthog.capture('lead_submitted');</script>or<script>heap.track('lead_submitted');</script>. Fire it on that trigger only, after the PostHog or Heap snippet has loaded.Preview and publish
Use Preview mode, complete the form, and confirm the tag fires once before you publish.
Find how your form reports success
Plugins such as Contact Form 7, Gravity Forms and WPForms differ. Some redirect to a thank-you page, others show a message by AJAX. This decides where the event goes.
Add the event
For a redirect, put the capture call on the thank-you page. For AJAX forms, listen for the plugin's success event (for example
wpcf7mailsentin Contact Form 7) and callposthog.captureorheap.trackthere.Load the code safely
Add it through a header and footer scripts plugin or your child theme, not by editing plugin files.
Use Customer events
In Settings, Customer events, add a custom pixel that subscribes to events such as
checkout_completedand calls your PostHog or Heap capture function.Pass order details
Include order value and currency as properties so revenue funnels work.
Test with a test order
Only use the store's test mode or a bogus gateway. Do not enter real card details for testing.
Pick the success point
Webflow forms show a success message on the same page. Use custom code in Page settings to listen for the form submit and then the success state, or send visitors to a thank-you page.
Add the capture call
Place it in the thank-you page's custom code before the closing body tag, then publish and test.
Call capture on confirmed success
Fire the event after your server or API confirms the lead or order, not on the button click.
Guard against double firing
Disable the button after click and fire once per submission, or counts will be inflated.
Autocapture only
- Clicks recorded, outcomes unknown
- Script-sent forms missing
- Funnel conversion looks too low
- Hard to build reliable goals
Named conversion event
- One clear event per conversion
- Fires only after confirmed success
- Funnels match real leads and orders
- Autocapture still available for exploring
How to confirm it's fixed
- The live events view shows your named event once per test conversion
- The event has the right properties (form name, page, value for orders)
- It fires on desktop, mobile, popups and embedded forms
- It does not fire when the form fails validation or the server returns an error
- A funnel in PostHog or Heap now includes the event as its final step
- Counts roughly match your CRM or order list for the same days
How to prevent it happening again
Autocapture breaks quietly when a theme, form plugin or button class changes. Keep a short list of your conversion events and who owns them. Re-run the live view test after every redesign, form plugin update or checkout change. Compare weekly counts in PostHog or Heap against your CRM or order system, and look into any gap that grows.
| Need | Autocapture | Named event |
|---|---|---|
| Explore what visitors click | Good fit | Not needed |
| Count leads or orders | Unreliable | Use this |
| Survive a redesign | Often breaks | Stays stable |
| Script-sent or iframe forms | Often missed | Works if called on success |
How FunnelGuard handles this
FunnelGuard does not check this yet. Whether a PostHog or Heap conversion event arrives is a possible future check, but it is not something FunnelGuard looks at today.
What FunnelGuard does cover nearby: a robot visitor runs your real journeys, such as a lead form or checkout, on a schedule and checks each step. It also checks the tracking hits sent to ad and analytics platforms like GA4, Google Ads and Meta, and whether test leads reach your inbox and CRM. If the form itself breaks, that is caught even though product analytics tools are not inspected.
To watch for this yourself, set a weekly reminder to submit a test lead with your live events view open, and compare PostHog or Heap conversion counts with your CRM. Test traffic from FunnelGuard is marked (utm_source=funnelguard, fg_test=1), so you can filter it out of your analytics. The Free plan covers 1 site and 2 journeys with daily checks, no card needed.
Questions people ask
Why is PostHog autocapture not capturing my form submit?
Autocapture relies on native browser events. If your form is sent with JavaScript (fetch or XHR), sits in an iframe, or shows a message without a page load, the submit may not be recorded. Send a named event with posthog.capture('lead_submitted') after the server confirms success.
Why is my Heap conversion not showing up?
Heap autocapture records clicks and form interactions, but it cannot tell which one is a conversion. Define an event from the click, or better, call heap.track('lead_submitted') after the submission succeeds. Then check the Live view to confirm it arrives.
How do I track a conversion in PostHog without autocapture?
Call posthog.capture('event_name', { properties }) at the moment the conversion succeeds, such as on the thank-you page or after an API reply of OK. You can also fire it from Google Tag Manager with a Custom HTML tag on a custom event trigger.
Should I turn autocapture off?
Usually no. Autocapture is useful for exploring behaviour and building ideas for goals. Just do not rely on it for conversions. Use a named event for each lead or order and keep autocapture for everything else.
Why do my PostHog numbers not match my CRM leads?
Common causes are missed script-sent forms, ad blockers, consent banners stopping capture, and double firing. Test the form with the live events view open, then compare weekly counts with your CRM to see which direction the gap goes.
How do I stop a conversion event firing twice?
Fire it only after confirmed success, once per submission. Disable the submit button after click, and avoid having both a GTM tag and a code snippet send the same event. Check the live view after a single test to see how many events arrive.
Does FunnelGuard check PostHog or Heap events?
No, not yet. FunnelGuard checks journeys, tracking hits to platforms such as GA4, Google Ads and Meta, and whether test leads arrive, but PostHog and Heap events are a possible future check.
Related issues
- TRK-243Mixpanel / Amplitude / Segment events missingFix guide
- TRK-244Segment write key wrong or destinations offFix guide
- TRK-248Two analytics tools disagreeing on conversion countsFix guide
- TRK-241Session recording loading before consentFix guide
- TRK-240Session recording capturing form fields (PII in recordings)Fix guide
- TRK-246Plausible / Fathom / Matomo tag missingFix guide