In mixpanel-node IP is always set to 0 in query parameter and we are not able to change inside the code. Can anyone tell where we can update the IP as 1 by default to track our geo locations.
Best answer by Rishi
Hi Santhosh! Sorry for the delay, I work on the Mixpanel Support team and would be happy to help out here.
For the Mixpanel Node.js SDK to record IP you either need to pass the IP address in as an event property on the event or as a user property when setting a profile. I’ve provided samples of both below. Are you passing in the IP as properties and still not seeing geolocation data reflect in your project?
Event Sample:
mixpanel.track('test event', {
distinct_id: 'unique_id',
ip: '127.0.0.1'});
User Profile Sample:
mixpanel.people.set('unique_id', {
$email: 'email@email.com'
}, {
$ip: '127.0.0.1'
});