-
This may be a noob question — I'd like to track our logged-in users in Mixpanel (for things like cohort analysis). The NextAuth Events seem like the perfect way to do this. But for some reason, I can't seem to get it to work. I track plenty of client-side Mixpanel events currently; those work fine. I added the following code to [...nextauth].tsx —
Those console.log calls work great / as expected — in my terminal locally I see the "sign in" log and then the full message print-out. But that mixpanel track event doesn't make it to Mixpanel. I have no idea why. Any ideas? Honestly, I am neither a NextAuth nor Mixpanel expert, so I might be doing something dumb. Any pointers would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
OK nevermind, figured it out, need to use the Node package — https://developer.mixpanel.com/docs/nodejs — confusing because it's all in React / Next.js, but needed the server side library. |
Beta Was this translation helpful? Give feedback.
OK nevermind, figured it out, need to use the Node package — https://developer.mixpanel.com/docs/nodejs — confusing because it's all in React / Next.js, but needed the server side library.