{ "url": "/ingest/i/v0/e/?_=1717162970946&compression=gzip-js&ip=1&retry_count=1&ver=1.136.2", "statusCode": 500, "statusMessage": "", "message": "fetch failed", "stack": ""}
posthog.client.ts
export default defineNuxtPlugin(() => { const runtimeConfig = useRuntimeConfig() const posthogClient = posthog.init(runtimeConfig.public.posthogPublicKey, { api_host: '/ingest', ui_host: 'https://eu.posthog.com', capture_pageview: false, loaded: (posthog) => { if (import.meta.env.MODE === 'development') posthog.debug() }, })})
nuxt.config.ts
export default defineNuxtConfig({ routeRules: { '/ingest/static/**': { proxy: 'https://eu-assets.i.posthog.com/static/**', }, '/ingest/**': { proxy: 'https://eu.i.posthog.com/**', }, },})