Duplicate initialization doubles every event. Pageview counts inflate, conversion rates halve against truth, session counts get split across two cookies, and funnel steps show impossible transitions because the same user is being tracked as two identities. Once bad data is in GA4 or PostHog you cannot retroactively deduplicate it — every historical report based on that period is permanently corrupted. A/B test significance calculations lie. Board metrics lie.
Medium because duplicate events corrupt historical data irreversibly but do not break user-facing functionality.
Consolidate every posthog.init(), gtag('config', ...), or mixpanel.init() call into a single provider at src/components/analytics-provider.tsx mounted once in the root layout. Delete every per-page initialization. Multiple providers tracking different surfaces (Vercel Analytics plus PostHog) are fine; two instances of the same provider are not. Grep the repo for every init call before shipping the fix.
marketing-analytics.core-analytics.single-analytics-instancemediumgtag('config', ...) calls with different measurement IDs (could be legitimate GTM + direct GA4 — check if both are actually needed)init() called in multiple components@vercel/analytics AND a full analytics suite like GA4 without intentional dual-tracking setupposthog.init() or gtag('config', ...) appears in more than 1 component file — even if one file is "unused" it still represents a risk of duplicate initialization.script-present failed)."PostHog posthog.init() called in both AnalyticsProvider.tsx and in 3 individual page components — this creates duplicate events and inflated session counts"src/components/analytics-provider.tsx at the top of your component tree. Remove any per-page initialization calls. If you intentionally use multiple analytics tools (common — e.g., Vercel Analytics for infrastructure metrics + PostHog for product analytics), ensure each is initialized in exactly one place.