Join our upcoming webinar on June 5, 2025 (Thursday). Register now!

Skip to main content

User profiling for Cocoa apps

User profiling allows you to understand your app users' preferences and behaviors. By integrating Apptics, you can easily track user sign-ups, log-ins, and more while respecting their privacy preferences. This guide will walk you through the steps to set up user tracking and handle privacy consent.

Tracking user activity

Track sign-up

  • Call the below method to track a user activity. You should use the below method after the user is registered and you have the user id. 
Copied+ (void) trackSignUp:(NSString* _Nullable)userID;

or

+ (void) trackSignUp:(NSString* _Nullable)userID groupId:(NSString * _Nullable)groupID;

Track user sign-in

  • Call the below method to track a user when they login to your app.
Copied+ (void) trackLogIn:(NSString* _Nullable)userID;

or

+ (void) trackLogIn:(NSString* _Nullable)userID groupId:(NSString * _Nullable)groupID;

Track existing users

  • Call the below method to track any existing users of your app.
Note: This method can be called on every app launch.
Copied+ (void) setCurrentUser:(NSString * _Nullable)userID;

or

+ (void) setCurrentUser:(NSString * _Nullable)userID groupId:(NSString * _Nullable)groupID;

Track user on sign-out

  • Call the below method during user sign-out to let the framework know. This ensures the user's session is properly closed.
Copied+ (void) trackLogOut:(NSString* _Nullable)userID;

or

+ (void) trackLogOut:(NSString* _Nullable)userID groupId:(NSString * _Nullable)groupID;

Note: Use the method with the `userID` parameter to associate the user with a group or organization ID. All data tracked by the Apptics SDK will then be linked to the specified user ID and group or organization ID.