Skip to content
FunnelGuard

Fix guide by FunnelsGuard

PostHog or Heap autocapture missing conversions: how to fix it

TRK-245Low impactCould addBy FunnelGuardPublished Updated
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.

Where autocapture loses the conversion
  1. Landing page viewPageview captured
  2. Click SubmitClick captured by autocapture
  3. Form sent by scriptNo native submit event, nothing captured
  4. Success messageNo page load, no event
  5. Conversion in funnelNever counted

The click is recorded, but the success moment is never sent, so the funnel ends early.

Reported vs real conversionsExample numbers
Reported vs real conversions (example)Real leads: 100 conversions; Autocapture funnel: 58 conversions; Named event: 99 conversions038771005899Real leadsAutocapture funnelNamed eventconversions

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

Test your conversion in the live events view
  1. Open the live view

    In PostHog, open Activity (live events). In Heap, use Live or the Events view. Keep it open in one tab.

  2. 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.

  3. Look for the success event

    You should see an event that clearly marks the conversion, not just a $autocapture click or a pageview. If you only see clicks, the conversion is missing.

  4. 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.

  5. 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.

PostHog: send a named event after a successful submitjavascript
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
      });
    }
  });
Heap: send a named event after a successful submitjavascript
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
      });
    }
  });
Add the conversion event by platform
  1. Create a trigger

    Add a Custom Event trigger (for example generate_lead pushed to the dataLayer) or a Page View trigger limited to your thank-you URL.

  2. 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.

  3. Preview and publish

    Use Preview mode, complete the form, and confirm the tag fires once before you publish.

Funnel data before and after

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

Confirmation checklist
  • 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.

Autocapture or named event?
NeedAutocaptureNamed event
Explore what visitors clickGood fitNot needed
Count leads or ordersUnreliableUse this
Survive a redesignOften breaksStays stable
Script-sent or iframe formsOften missedWorks 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.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.