From 62786cb25ded116c3655ae52a75c849cf2266247 Mon Sep 17 00:00:00 2001 From: Jari Aarniala Date: Thu, 5 Dec 2019 21:20:32 +0200 Subject: [PATCH] Add IP address geolocation flag to engage call (#656) --- src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java | 2 +- src/main/java/com/mixpanel/android/util/MPConstants.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java b/src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java index 199a2d167..0827d6d20 100644 --- a/src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java +++ b/src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java @@ -379,7 +379,7 @@ public String getPeopleEndpoint() { } public void setMixpanelPeopleEndpoint() { - setPeopleEndpoint(MPConstants.URL.PEOPLE); + setPeopleEndpoint(MPConstants.URL.PEOPLE + (getUseIpAddressForGeolocation() ? "1" : "0")); } public void setPeopleEndpoint(String peopleEndpoint) { diff --git a/src/main/java/com/mixpanel/android/util/MPConstants.java b/src/main/java/com/mixpanel/android/util/MPConstants.java index 2bf793091..d6634b274 100644 --- a/src/main/java/com/mixpanel/android/util/MPConstants.java +++ b/src/main/java/com/mixpanel/android/util/MPConstants.java @@ -8,7 +8,7 @@ public class MPConstants { public static class URL { public static final String DECIDE = "https://decide.mixpanel.com/decide"; public static final String EVENT = "https://api.mixpanel.com/track?ip="; - public static final String PEOPLE = "https://api.mixpanel.com/engage"; + public static final String PEOPLE = "https://api.mixpanel.com/engage?ip="; public static final String GROUPS = "https://api.mixpanel.com/groups"; public static final String SWITCHBOARD = "wss://switchboard.mixpanel.com/connect/"; }