mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
Merge pull request #873 from MODSetter/dev
fix: update PostHog configuration for improved tracking
This commit is contained in:
commit
8a09614b3d
2 changed files with 2 additions and 23 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue