-
Notifications
You must be signed in to change notification settings - Fork 15
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
Setting a Person's IP address fails unless accompanied with other properties #4
Comments
IP property is not very clear in Mixpanel. I made some research and that's what I found. When you go to user profile in Mixpanel there are two different IP's:
Location can be set in two ways.
JS library by default sets query string parameter Ip can be set by setting Example:
To be able to fix that I'm thinking about having two properties:
|
Thanks for the reply, Aleksandr! This is how I'm trying to accomplish this: When when a user registers, I call: messages.Add(_mixPanelClient.GetPeopleSetMessage(distinctId, new Dictionary<string, object>
{
{ MixpanelProperty.Email, user.Email },
{MixpanelProperty.Ip, HttpContext.Current?.Request.UserHostAddress }
}));
await _mixPanelClient.SendAsync(messages); In all my other messages.Add(_mixPanelClient.GetPeopleSetMessage(user.UserName, new Dictionary<string, object>
{
{MixpanelProperty.Ip, 0 },
{"SomeOtherProperty", "SomeOtherValue" },
{"AnotherProperty", "AnotherValue" }
}));
await _mixPanelClient.SendAsync(messages); Meanwhile, I set a super property with the user's IP address to track the location of individual events: _mixPanelClient.SetSuperProperties(new Dictionary<string, object> { { MixpanelProperty.Ip, HttpContext.Current?.Request.UserHostAddress } }); This appears to be working properly. Is this the correct approach given your description above? Thanks so much for your help! |
I'm trying to update a person's profile with their IP address but find that MixPanel does not recognize the update unless another property is included. This behavior does not happen when using the JavaScript library.
For example, the following has no effect on the user's profile:
Whereas the following WILL update the user's location MixPanel (and create a new foo = bar property)
Whereas with the Javascript library, running mixpanel.people.set("ip", "some.ip.address") will update the user's profile accordingly.
The text was updated successfully, but these errors were encountered: