diff --git a/apps/sim/.env.example b/apps/sim/.env.example index fe9514e358..a7d16b31ac 100644 --- a/apps/sim/.env.example +++ b/apps/sim/.env.example @@ -41,3 +41,8 @@ API_ENCRYPTION_KEY=your_api_encryption_key # Use `openssl rand -hex 32` to gener # Admin API (Optional - for self-hosted GitOps) # ADMIN_API_KEY= # Use `openssl rand -hex 32` to generate. Enables admin API for workflow export/import. # Usage: curl -H "x-admin-key: your_key" https://your-instance/api/v1/admin/workspaces + +# Product Analytics - PostHog (Optional) +# NEXT_PUBLIC_POSTHOG_KEY=phc_... # Your PostHog project API key (from posthog.com or self-hosted) +# NEXT_PUBLIC_POSTHOG_ENABLED=true # Set to true to enable analytics. Omit or set to false to disable entirely. + # When disabled: server SDK never initializes, client SDK never loads. diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index e98d268c7b..f84f26d188 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -417,6 +417,14 @@ const nextConfig: NextConfig = { source: '/r/:shortCode', destination: 'https://go.trybeluga.ai/:shortCode', }, + { + source: '/ingest/static/:path*', + destination: 'https://us-assets.i.posthog.com/static/:path*', + }, + { + source: '/ingest/:path*', + destination: 'https://us.i.posthog.com/:path*', + }, ] }, }