Use this page to instrument the authentication flow in your iOS app — login, logout, and registration. The SDK does not provide dedicated authentication APIs; instead, you use action events for the moments themselves and user categories to attach the user identity once login succeeds.
What to track
Moment | How to track |
|---|---|
Login successful |
|
Login failed |
|
Logout |
|
Registration |
|
Example: track a successful login
let user = MIUserCategories(customProperties: nil)
user.customerId = "user-12345"
let action = MIActionEvent(name: "Login")
action.userCategories = user
MappIntelligence.shared()?.trackAction(action)MIUserCategories *user = [[MIUserCategories alloc] initWithCustomProperties:nil];
user.customerId = @"user-12345";
MIActionEvent *action = [[MIActionEvent alloc] initWithName:@"Login"];
action.userCategories = user;
[[MappIntelligence shared] trackAction:action];Example: track logout
MappIntelligence.shared()?.trackAction(MIActionEvent(name: "Logout"))[[MappIntelligence shared] trackAction:[[MIActionEvent alloc] initWithName:@"Logout"]];Privacy notes
Only attach
MIUserCategoriesafter the user has consented to analytics tracking.If Anonymous Tracking is enabled, do not include personally identifiable user data in
MIUserCategories.Use
customerIdas a stable, internal identifier — not the user's email.
Related: Events, Users, User Matching, Anonymous Tracking.