Form tracking captures user interactions with forms in your iOS app — which fields the user touched, in what order, and whether the form was submitted or abandoned. The SDK exposes form tracking via MIFormParameters, with optional MIFormField details, passed to formTracking(_:).
Method
Method | Description |
|---|---|
| Records a form interaction (focus / submit / cancel) using the configured |
MIFormParameters
Property | Description |
|---|---|
| Name of the form, used in reporting. |
| Array of field IDs ( |
| Dictionary mapping field IDs to display names. |
| Dictionary mapping field IDs to alternative reported values. |
| Field IDs whose values should be anonymised when sent. |
| Field IDs whose full content may be sent (overrides global anonymisation). |
|
|
|
|
| Field IDs to include in path analysis (focus order). |
MIFormField
Use MIFormField to describe individual fields when you need to report their content explicitly:
MIFormField(name: "email", andContent: "user@example.com", andID: 1, andWithAnonymus: false, andFocus: true)Example: track a form submission
let formParams = MIFormParameters(dictionary: [:])
formParams.formName = "Signup"
formParams.fieldIds = [1, 2, 3]
formParams.renameFields = [
1: "email",
2: "firstName",
3: "lastName"
]
formParams.confirmButton = true
formParams.anonymous = false
MappIntelligence.shared()?.formTracking(formParams)MIFormParameters *formParams = [[MIFormParameters alloc] initWithDictionary:@{}];
formParams.formName = @"Signup";
formParams.fieldIds = [@[@1, @2, @3] mutableCopy];
formParams.renameFields = [@{
@1: @"email",
@2: @"firstName",
@3: @"lastName"
} mutableCopy];
formParams.confirmButton = YES;
formParams.anonymous = @NO;
[[MappIntelligence shared] formTracking:formParams];Submit vs cancel
Set
confirmButton = truewhen the user successfully submitted the form.Set
confirmButton = falsewhen the user abandoned or cancelled.
To anonymise sensitive fields (passwords, payment data), list their IDs in
anonymousSpecificFieldsor setanonymous = truefor the whole form.
Related: Object Oriented Tracking, Anonymous Tracking, Pages.