Skip to content

Commit

Permalink
Update nodejs.md (#1078)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
pmackle and saminmadani authored May 15, 2024
1 parent 96c91b0 commit 9d67976
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/docs/tracking-methods/sdks/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ mixpanel.track('event name', {

The geolocate boolean setting needs to be `true` for Mixpanel to infer the location based on the ip property provided in the event payload.

Note that tracking with Node in an async serverless implementation requires you to wait for the Mixpanel request to complete. The easiest way to do this would be to pass in in a callback as a 3rd parameter into `track` and return a promise that is resolved when the request is sent.

## Storing User Profiles

You can send user profile updates to Mixpanel in addition to sending events.
Expand Down

0 comments on commit 9d67976

Please sign in to comment.