Customers
Identifying customers or users 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.
Parameter Constants
URM 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 > URM - Custom Visitor Id |
customCategories | Used to enrich customer information with additional data. | Categories > URM 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:
| - |
Methods for Customers
Customer data can be tracked in both page and event requests.
Example iOS
Please note that custom parameters are optional in the request.
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
JAVACall the trackAction method
MappIntelligence.shared()?.trackAction(event);
JAVA
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)
}
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];
JAVACall the trackAction method
[[MappIntelligence shared] trackAction:event];
JAVA
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];
}