fix: update PostHog configuration for improved tracking

- Changed PostHog API host to a secure URL to enhance data ingestion.
- Updated default date for event tracking to reflect a new timeline.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-03-11 23:18:09 -07:00
parent c74553219e
commit 9f17d834f6
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