Question

Mixpanel is not adding the users in Users

  • 10 February 2021
  • 0 replies
  • 19 views

Badge +1
Hello! I have made the implementation in a native android app following the documentation Android (mixpanel.com) and all the events are sent well and go out in Liveview but when I register/signup a new user using the identify method it is not adding the new user inside “Users”. Next I leave my code to see if I am doing something wrong?

Login event:

public static void sendLoginEvent(MixpanelAPI mixPanel, LoginResponse loginResponse, String loginType) {
JSONObject once = new JSONObject();
JSONObject superProps = new JSONObject();
JSONObject props = new JSONObject();
try {
// IDENTIFY
mixPanel.identify(loginResponse.getData().get(0).getEmail());
// PROFILE
mixPanel.getPeople().set("$name", loginResponse.getData().get(0).getFirstName() + " " + loginResponse.getData().get(0).getLastName());
mixPanel.getPeople().set("$email", loginResponse.getData().get(0).getEmail());
once.put("Primer Inicio de sesion", Utils.getTimestamp());
mixPanel.getPeople().setOnce(once);
mixPanel.getPeople().set("Ultimo Inicio de sesion", Utils.getTimestamp());
mixPanel.getPeople().increment("Lifetime Inicio de sesion", 1);
// SUPER PROPERTY
superProps.put("Tipo de Usuario", "Paciente");
mixPanel.registerSuperProperties(superProps);
// TRACK
props.put("Via", loginType);
mixPanel.track("Inicio de Sesión", props);
} catch (JSONException e) {
e.printStackTrace();
}
}

 

Sign Up event:

public static void sendRegisterEvent(MixpanelAPI mixPanel, String name, String email) {
JSONObject superProps = new JSONObject();
try {
// IDENTIFY
mixPanel.identify(email);
// SUPER PROPERTY
superProps.put("Tipo de Usuario", "Paciente");
mixPanel.registerSuperProperties(superProps);
// TRACK
mixPanel.track("Registro");
// PROFILE
mixPanel.getPeople().set("$name", name);
mixPanel.getPeople().set("$email", email);
mixPanel.getPeople().set("Tipo de Usuario", "Paciente");
} catch (JSONException e) {
e.printStackTrace();
}
}

 

I’ll appreciate your help

Regards


0 replies

Be the first to reply!

Reply


Mixpanel