--- title: "Form Tracking" slug: "mapp-intelligence-ios-sdk-v5-form-tracking" updated: 2026-04-30T11:49:05Z published: 2026-04-30T11:49:05Z canonical: "docs.mapp.com/mapp-intelligence-ios-sdk-v5-form-tracking" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Form Tracking 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(_:)`. Before you start, complete the [Quickstart](/v1/docs/mapp-intelligence-ios-sdk-v5-quickstart) so the SDK is initialized. --- ## Method | Method | Description | | --- | --- | | `formTracking(_ formParams: MIFormParameters)` | Records a form interaction (focus / submit / cancel) using the configured `MIFormParameters`. | --- ## MIFormParameters | Property | Description | | --- | --- | | `formName` | Name of the form, used in reporting. | | `fieldIds` | Array of field IDs (`NSNumber`) that should be reported. | | `renameFields` | Dictionary mapping field IDs to display names. | | `changeFieldsValue` | Dictionary mapping field IDs to alternative reported values. | | `anonymousSpecificFields` | Field IDs whose values should be anonymised when sent. | | `fullContentSpecificFields` | Field IDs whose full content may be sent (overrides global anonymisation). | | `confirmButton` | `BOOL`: `true` when the user submitted via the confirm button, `false` when they abandoned or cancelled. | | `anonymous` | `NSNumber` (boolean): if `true`, all field values are reported anonymously. | | `pathAnalysis` | Field IDs to include in path analysis (focus order). | --- ## MIFormField Use `MIFormField` to describe individual fields when you need to report their content explicitly: ```swift MIFormField(name: "email", andContent: "user@example.com", andID: 1, andWithAnonymus: false, andFocus: true) ``` --- ## Examples ### Track a form submission Build an `MIFormParameters` with the form name, field IDs, and submission state, then call `formTracking(_:)`. **Swift** ```swift 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) ``` **Objective-C** ```objectivec 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 = true` when the user successfully submitted the form. - Set `confirmButton = false` when the user abandoned or cancelled. > [!NOTE] > To anonymise sensitive fields (passwords, payment data), list their IDs in `anonymousSpecificFields` or set `anonymous = true` for the whole form. --- ## Related - [Quickstart](/v1/docs/mapp-intelligence-ios-sdk-v5-quickstart) - [Object Oriented Tracking](/v1/docs/mapp-intelligence-ios-sdk-v5-object-oriented-tracking) - [Pages](/v1/docs/mapp-intelligence-ios-sdk-v5-pages) - [Anonymous Tracking](/v1/docs/mapp-intelligence-ios-sdk-v5-anonymous-tracking)