-
Notifications
You must be signed in to change notification settings - Fork 19
feat(posthog): update PostHog integration with environment variables and consent handling #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export interface Interview { | ||
| id: string | ||
| scheduledAt: string | ||
| duration: number | ||
| type: 'phone' | 'video' | 'in_person' | 'panel' | 'technical' | 'take_home' | ||
| status: 'scheduled' | 'completed' | 'cancelled' | 'no_show' | ||
| title: string | ||
| candidateFirstName?: string | ||
| candidateLastName?: string | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,10 @@ export default defineNuxtConfig({ | |
| publicKey: process.env.POSTHOG_PUBLIC_KEY || '', | ||
| host: process.env.POSTHOG_HOST || 'https://eu.i.posthog.com', | ||
| clientConfig: { | ||
| // ── Reverse proxy: route PostHog through reqcore.com to bypass ad blockers ── | ||
| // Requests to /ingest/** are proxied by Nitro to eu.i.posthog.com | ||
| api_host: '/ingest', | ||
| ui_host: 'https://eu.posthog.com', | ||
| // ── Privacy: disable invasive features ── | ||
| autocapture: false, | ||
| disable_session_recording: true, | ||
|
|
@@ -117,11 +121,8 @@ export default defineNuxtConfig({ | |
|
|
||
| runtimeConfig: { | ||
| public: { | ||
| /** PostHog public key and host for server-side event capture */ | ||
| posthog: { | ||
| publicKey: process.env.POSTHOG_PUBLIC_KEY || '', | ||
| host: process.env.POSTHOG_HOST || 'https://eu.i.posthog.com', | ||
| }, | ||
| // PostHog runtimeConfig is managed by @posthog/nuxt via posthogConfig above. | ||
| // Override at runtime with NUXT_PUBLIC_POSTHOG_PUBLIC_KEY / NUXT_PUBLIC_POSTHOG_HOST. | ||
| /** When set, the dashboard shows a read-only demo banner for this org slug */ | ||
| demoOrgSlug: process.env.DEMO_ORG_SLUG || (isRailwayPreview ? 'reqcore-demo' : ''), | ||
| /** Public live-demo account email used to prefill sign-in */ | ||
|
|
@@ -202,6 +203,12 @@ export default defineNuxtConfig({ | |
| // Route rules — prerender/ISR for public pages | ||
| // ───────────────────────────────────────────── | ||
| routeRules: { | ||
| // ── PostHog reverse proxy — bypasses ad blockers by routing through reqcore.com ── | ||
| // NOTE: Targets are hardcoded to the EU data center (eu.i.posthog.com). | ||
| // If you use the US data center, set POSTHOG_HOST=https://us.i.posthog.com | ||
| // and update these two proxy targets to us-assets.i.posthog.com / us.i.posthog.com. | ||
| '/ingest/static/**': { proxy: 'https://eu-assets.i.posthog.com/static/**' }, | ||
| '/ingest/**': { proxy: 'https://eu.i.posthog.com/**' }, | ||
|
Comment on lines
+206
to
+211
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded EU proxy endpoints may conflict with US data center configuration. The proxy routes are hardcoded to EU endpoints ( Consider documenting this limitation or making the proxy targets configurable if US support is needed. 🤖 Prompt for AI Agents |
||
| '/': { prerender: true }, | ||
| '/roadmap': { prerender: true }, | ||
| '/blog': { prerender: true }, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.