-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
Posthog Re-writes
Currently, when using PostHog analytics with Minflify, a significant amount of data is lost due to ad blockers. Many ad blockers prevent requests to known analytics domains (including PostHog’s default endpoints).
A common solution in frameworks like Next.js or Vercel deployments is to use reverse proxy re-writes so that analytics traffic is sent through the application’s domain (e.g. /ingest → https://app.posthog.com/ingest). This prevents requests from being blocked and ensures much more accurate analytics.
Feature Request:
Please support infrastructure-level rewrites (similar to next.config.js rewrites in Next.js) that allow developers to:
- Configure a path on their app domain (e.g. /posthog/collect)
- Proxy that path to PostHog’s ingestion endpoint
- Ensure the request headers/body are preserved
Why this matters:
- Without rewrites, PostHog loses a large percentage of analytics data due to ad blocking.
- This makes it very difficult for teams to rely on PostHog for product analytics when hosting on Minflify.
- Other hosting platforms (e.g. Vercel, Netlify with custom rewrites) already support this pattern.
Here is an example of how Posthog handles this with Vercel.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels