tags:
- analytics
permalink: what-is-posthog
date created: Saturday, January 13th 2024, 9:02:53 am
date modified: Tuesday, May 13th 2025, 8:13:08 am
PostHog is an open-source product analytics platform that helps you understand your users' behavior and improve your website or application.
Netlify uses bots to deploy builds. These bots fire analytics events that pollute production data. Before analyzing events, filter out events from URLs containing:
localhost
dev.netlify.app
For example, this regex will filter out local host variations.
^(localhost|127\.0\.0\.1)($|:)
When capturing events via library, you may write to "reserved" PostHog events and properties, which start with a $
.
posthog.capture(user_id, "$pageview", {"$current_url": "https://example.com"})