Users

Prev Next

Identifying users (or customers) is important to improve the analysis of user behavior in your app, e.g. to identify returning visitors. It is also possible to further categorize customers to improve Intelligence results. Please note that this information can contain information regulated by data privacy laws.

Recommendation

Transmit hashed personal data should not be evaluated in terms of content (e.g. with the SHA256 hash). If you would like to collect this data for analytical reasons, we suggest that you transmit the data in encrypted form (see How to Implement Server-Side Encryption in Mapp Intelligence).

Parameter Constants

User categories must be specified within the MIUserCategories() object.

Parameter

Description

Where to configure (Mapp Q3 > Configuration > ...)

Where to analyze

customerId

Used to identify a user. We highly recommend using MD5 or SHA methods if you pass e-mail addresses.

-

Datatype Text: URM - User Relationship Management > Visitor Id

customCategories

Used to enrich customer information with additional data.

Categories > User Categories > New Category

Datatype Text: URM - User Relationship Management

firstName

First name

-

lastName

Surname

-

newsletterSubscribed

Tracks if the user subscribed to a newsletter

-

birthday

Date of birth. Necessary format:

int day, int month, int year

-

emailAddress

Email address

-

emailReceiverId

Email receiver ID

-

phoneNumber

Phone number

-

street

Street

-

streetNumber

Street number

-

zipCode

Zip code

-

city

City

-

country

Country

-

gender

Gender. Enum with the following options:

  • unknown

  • male

  • female

-

Methods for Users

User data can be tracked in both page and event requests.

Example iOS

Please note that custom parameters are optional in the request.

  1. Define all event information you want to track:

    let userCategories = MIUserCategories()
    userCategories.customCategories = [20:"userParam1"]
    userCategories.birthday = MIBirthday(day: 12, month: 1, year: 1993)
    userCategories.city = "Paris"
    userCategories.country = "France"
    userCategories.customerId = "CustomerID"
    userCategories.gender = .female
     
    let event = MIActionEvent(name: "TestAction")
    event.userCategories = userCategories
  2. Call the trackAction method

    MappIntelligence.shared()?.trackAction(event);

Full Code Example

@IBAction func trackCustomAction(_ sender: Any) {
 
        let eventParameters = MIEventParameters(parameters:  [20:"ck20Param1"])
         
        //user properties
        let userCategories = MIUserCategories()
        userCategories.customCategories = [20:"userParam1"]
        userCategories.birthday = MIBirthday(day: 12, month: 1, year: 1993)
        userCategories.city = "Paris"
        userCategories.country = "France"
        userCategories.customerId = "CustomerID"
        userCategories.gender = .female
         
        //sessionproperties
        let sessionParameters = MISessionParameters(parameters: [10: "sessionParam1"])
         
        let event = MIActionEvent(name: "TestAction")
        event.eventParameters = eventParameters
        event.userCategories = userCategories
        event.sessionParameters = sessionParameters
 
        MappIntelligence.shared()?.trackAction(event)
}
  1. Define all event information you want to track:

    MIUserCategories* userCategories = [[MIUserCategories alloc] init];
    [userCategories setCustomCategories: [@{@20: @"userParam1"} copy]];
    [userCategories setCity:@"Paris"];
    [userCategories setCountry:@"France"];
    [userCategories setCustomerId:@"CustomerID"];
    [userCategories setGender: female];
     
    MIActionEvent* event = [[MIActionEvent alloc] initWithName:@"TestAction"];
    [event setUserCategories:userCategories];
  2. Call the trackAction method

    [[MappIntelligence shared] trackAction:event];

Full Code Example

-(void) testAction {
    MIEventParameters* eventParameters = [[MIEventParameters alloc] initWithParameters:[@{@20: @[@"ck20Param1"]} copy]];
     
    MIUserCategories* userCategories = [[MIUserCategories alloc] init];
    [userCategories setCustomCategories: [@{@20: @"userParam1"} copy]];
    [userCategories setCity:@"Paris"];
    [userCategories setCountry:@"France"];
    [userCategories setCustomerId:@"CustomerID"];
    [userCategories setGender: female];
     
    MISessionParameters* sessionParameters = [[MISessionParameters alloc] initWithParameters:[@{@10: @"sessionParam1"} copy]];
     
    MIActionEvent* event = [[MIActionEvent alloc] initWithName:@"TestAction"];
    [event setEventParameters:eventParameters];
    [event setUserCategories:userCategories];
    [event setSessionParameters:sessionParameters];
     
    [[MappIntelligence shared] trackAction:event];
     
}