feat: integrate PostHog for analytics tracking and add PostHogProvider component

This commit is contained in:
2025-06-20 03:07:06 +00:00
committed by GitHub
parent 6d6b1baa62
commit e4b239e230
8 changed files with 152 additions and 14 deletions

View File

@@ -46,6 +46,24 @@ const nextConfig = {
},
];
},
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',
},
];
},
// This is required to support PostHog trailing slash API requests
skipTrailingSlashRedirect: true,
};
export default nextConfig;
export default nextConfig;