-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: add posthog #718
base: main
Are you sure you want to change the base?
feat: add posthog #718
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
if (typeof window !== 'undefined') { | ||
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY as string, { | ||
// api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST as string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm finding Next.js proxies to be flakey when using rewrites, and I can't seem to get the middleware to hit. Since we don't have the domain in Cloudflare, we can't use a CF worker proxy. @steven-tey maybe you can help me get the middleware to hit and we can follow these https://posthog.com/docs/advanced/proxy/nextjs-middleware
Adding Posthog.
This first PR is adding page views and autocapture and identify. In subsequent PRs we will add tracking for custom events.
Note: this is not using a proxy right now. We will need to add that.
related to https://github.com/dubinc/dub.co/pull/30