Anonymous Tracking
    • 2 Minutes to read
    • Dark
      Light

    Anonymous Tracking

    • Dark
      Light

    Article summary

    Please note that using this function will significantly decrease data quality. Only use this function if required by your data privacy manager.

    Description

    Anonymous tracking means there will not be an everID generated or stored in the local database. This avoids user recognition in Mapp Intelligence. Optionally, you can suppress any parameter when anonymous tracking is enabled (such as the customer or orderID).

    Tracking users anonymously can impact both session detection (causing session breaks) and user recognition in between sessions. Matching users between the Engage and Intelligence systems will not work when anonymous tracking is active.

    You can choose to enable anonymous tracking in the global configuration. This option means using anonymous tracking by default without offering users the option to opt-in or opt-out. It is also possible to control anonymous tracking during runtime.

    The following functions are not available when anonymous tracking is active:

    • Migrating from Intelligence version 4 to Intelligence version 5 without loss of historical data

    • Getting the everID

    • Setting the everID manually

    • User matching between Mapp Engage and Mapp Intelligence

    If you want to use anonymous tracking when the app first starts, you need to call MappIntelligence.shared()?.anonymousTracking before calling MappIntelligence.shared()?.initWithConfiguration().

    Data

    Property

    Possible Values

    Default

    anonymousTracking

    Boolean. True/false.

    False

    enableAnonymousTracking(suppressParams: [String]?)

    Array

    empty

    setTemporarySessionId(ID: String)

    String

    empty

    Methods

    Method

    Description

    BOOL anonymousTracking

    Enables anonymous tracking without having the option to suppress additional parameters.

    (void) enableAnonymousTracking:(NSArray<NSString *> *_Nullable) suppressParams;

    Enables anonymous tracking with the option to suppress additional parameters when anonymous tracking is enabled.

    (void)setTemporarySessionId:(NSString *)

    Sets the temporary session ID in case anonymous tracking is used.

    Examples

    Anonymous tracking must be called on first position when initialising the SDK.

    Enable Anonymous Tracking Globally

    You need to enable anonymous tracking in the AppDelegate class.

    class AppDelegate: UIResponder, UIApplicationDelegate {
     
        func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
     
            // Override point for customization after application launch.
            
    		MappIntelligence.shared()?.anonymousTracking = true
    		MappIntelligence.shared()?.setTemporarySessionId("user-xyz-123456789")
    		MappIntelligence.shared()?.initWithConfiguration([123451234512345], onTrackdomain: "https://your-trackdomain.net")
    		return true
        }
    }
    [[MappIntelligence shared] setAnonymousTracking: YES];
    [[MappIntelligence shared] setTemporarySessionId: @"user-xyz-123456789"];
    [[MappIntelligence shared] initWithConfiguration: @[@111111111111111, @222222222222222] onTrackdomain:@"https://your-trackdomain.net"];

    Enable Anonymous Tracking on Runtime

    You can enable anonymous tracking via a function in your application:

    @IBAction func toggleAnonimousTracking(_ sender: UISwitch) {
           if (sender.isOn) {
               MappIntelligence.shared()?.enableAnonymousTracking(["cd"]) //enable anonymous tracking and suppress customer visitor ID.
    		   MappIntelligence.shared()?.setTemporarySessionId("user-xyz-123456789") //optional: is used to provide a session-based user ID.
           } else {
               MappIntelligence.shared()?.anonymousTracking = false
           }
       }
    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view.
        if (sender.isOn) {
            [[MappIntelligence shared] enableAnonymousTracking: @[@"cd"]];
    		[[MappIntelligence shared] setTemporarySessionId: @"user-xyz-123456789"];
        } else {
            [[MappIntelligence shared] setAnonymousTracking: false];
        }
    }


    Was this article helpful?

    ESC

    AI Assistant, facilitating knowledge discovery through conversational intelligence