Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun login(
- provider: String?,
- email: String?,
- name: String?,
- phone: String?
- ) {
- if (email != null) {
- mixPanelAPI.identify(email)
- mixPanelAPI.people.identify(email)
- } else if (phone != null) {
- mixPanelAPI.identify(phone)
- mixPanelAPI.people.identify(phone)
- }
- val personProperties = JSONObject()
- personProperties.put("\$email", email)
- personProperties.put("\$name", name)
- personProperties.put("\$phone", phone)
- mixPanelAPI.people.set(personProperties)
- mpProperties.put("provider", provider)
- mixPanelAPI.track(EVENTS_TRACKING_LOGIN, mpProperties)
- clearPropertiesObjects()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement