Merge pull request #873 from MODSetter/dev

fix: update PostHog configuration for improved tracking
This commit is contained in:
Rohan Verma 2026-03-11 23:18:53 -07:00 committed by GitHub
commit 8a09614b3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 23 deletions

View file

@ -5,9 +5,9 @@ function initPostHog() {
if (!process.env.NEXT_PUBLIC_POSTHOG_KEY) return;
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
api_host: "/ingest",
api_host: "https://assets.surfsense.com",
ui_host: "https://us.posthog.com",
defaults: "2025-11-30",
defaults: "2026-01-30",
capture_pageview: "history_change",
capture_pageleave: true,
before_send: (event) => {

View file

@ -52,27 +52,6 @@ const nextConfig: NextConfig = {
return config;
},
// PostHog reverse proxy configuration
// This helps bypass ad blockers by routing requests through your domain
async rewrites() {
return [
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
{
source: "/ingest/decide",
destination: "https://us.i.posthog.com/decide",
},
];
},
// Required for PostHog reverse proxy to work correctly
skipTrailingSlashRedirect: true,
};
// Wrap the config with MDX and next-intl plugins