Dev.to
7/23/2026

Active players looked real until we asked which sessions counted
Short summary
A solo developer discovered their active-player metric of 64 was inflated because Vercel preview deploys shared the same PostHog project key, creating new anonymous identities on each preview hostname. The fix involved tagging every event with an analytics_environment property (production, preview, local, e2e) and applying dashboard filters rather than silencing non-production init. The key lesson: the missing dimension wasn't another metric but an environment dimension that separated real users from internal traffic.
- •Preview deploy traffic inflated active-player counts because preview hostnames got fresh PostHog identities
- •Fix: tag every event with analytics_environment and filter dashboards instead of skipping init
- •The missing dimension was runtime context, not another metric
Generated with AI, which can make mistakes.
Is this a good recommendation for you?


