Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.59 KB | None | 0 0
  1.     func trackSignUp(withConsumerId consumerId: String) {
  2.         Mixpanel.mainInstance().identify(distinctId: consumerId)
  3.     }
  4.    
  5.     func updateUserProfile(withConsumerProfile consumerProfile: [String : Any]) {
  6.         if var profile = consumerProfile as? [String:MixpanelType] {
  7.             profile["$name"] = profile.removeValue(forKey: "name")
  8.             profile["$phone"] = profile.removeValue(forKey: "phone")
  9.             profile["$email"] = profile.removeValue(forKey: "email")
  10.            
  11.             Mixpanel.mainInstance().people.set(properties: profile)
  12.         }
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement