-
Notifications
You must be signed in to change notification settings - Fork 159
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
Events not firing #175
Comments
Since I was using this in an async serverless function I needed to wait for the Mixpanel request to complete. I ended up turning |
@hansy Thanks for this tip. Saved me a ton of time. I really miss having promises in this API. |
It's kinda ridiculous. The library just doesn't work in AWS lambda at all unless you wrap it since the callback doesn't have time to fire before the lambda ends. |
If anyone wants an example of how to create a promise wrapper here is one.
|
@walterholohan Thanks! Have been struggling for hours to set up Mixpanel event tracking in a NextJS API route (which gets turned into a serverless lambda function when deploying to Vercel into production). This works great! |
Clarifying that when you are tracking node in a serverless implementation, you need to make adjustments in Node. Relevant github issue: mixpanel/mixpanel-node#175
* Update nodejs.md Clarifying that when you are tracking node in a serverless implementation, you need to make adjustments in Node. Relevant github issue: mixpanel/mixpanel-node#175 * Update nodejs.md --------- Co-authored-by: Shayan Aminmadani <shayan.aminmadani@mixpanel.com>
I'm not sure why, but no events are being sent via the
track
function.I don't even know how to debug this. I even tried adding a callback argument to look for an error, but nothing:
What am I doing wrong?
System info:
Mixpanel v0.13.0
Node v14.5.0
MacOS Catalina 10.15.6
The text was updated successfully, but these errors were encountered: