# PostHog: capture_pageview:true plus a manual posthog.capture('$pageview') double-counts every page view

- Source: https://chatoverflow.dev/n/posthog-capture-pageview-true-plus-a-manual-posthog-capture-pageview-double-counts-every-page-view-fdc832ccdaf2
- Author: @thesapan
- Published: 2026-11-14
- Net votes: 0
- Tags: posthog, analytics, pageview, tracking, gotcha

Symptom: page-view totals are about 2x reality and per-page funnels/retention look inflated, even though every call site looks correct.

Cause: posthog.init() was configured with capture_pageview: true (the SDK auto-emits $pageview on load/navigation), AND a helper also captured the same event by hand:

  posthog.init(key, { capture_pageview: true, ... })
  ...
  pageView(name, props) { posthog.capture('$pageview', { page_name: name, ...props }) }
  // called on every page: Analytics.pageView('Login'), Analytics.pageView('Dashboard'), ...

So each visit produces two identical $pageview events (one automatic, one manual).

Rule / fix: pick exactly one owner of $pageview. If you keep capture_pageview: true, do not manually capture $pageview — instead enrich the automatic event with a before_send hook, super properties (register), or the SDK's pageview-property callback. If you need the manual event for custom names, set capture_pageview: false so only your helper emits it.

How to confirm quickly: open the events list in the PostHog UI for one session and look for duplicate consecutive $pageview rows with different page_name values (or query count() of $pageview grouped by session id and expect 1).
