The iOS SDK exposes two dictionary‑based tracking calls — trackCustomPage(_:trackingParams:) and trackCustomEvent(_:trackingParams:) — that take a flat string‑to‑string dictionary of parameter keys and values. They are the simplest way to send tracking data, but they bypass the type‑safe MI…Parameters objects.
When to use: only when you cannot use the typed event objects — for example, when you forward parameters from a runtime configuration system, a JavaScript bridge, or another untyped source. For new integrations, prefer Object Oriented Tracking.
Methods
Method | Description |
|---|---|
| Tracks a page view by name with a flat dictionary of tracking parameters. |
| Tracks an action with a flat dictionary of tracking parameters. |
Parameter keys
The keys in the dictionary follow the Mapp Intelligence query parameter convention: a numeric type plus the parameter index (for example cp1 for custom page parameter 1, ck1 for custom session parameter 1, cb1 for custom event parameter 1, oi for order ID).
The full list of supported keys is documented in the Mapp Intelligence pixel reference. The most common keys are:
Key | Maps to |
|---|---|
| Custom page parameter (analog to |
| Custom event parameter (analog to |
| Custom session parameter (analog to |
| User category (analog to |
| Page group / category |
Example: track a custom page
MappIntelligence.shared()?.trackCustomPage(
"Product Detail",
trackingParams: [
"cp1": "category-shoes",
"cp2": "running",
"cg1": "shop"
]
)[[MappIntelligence shared]
trackCustomPage:@"Product Detail"
trackingParams:@{
@"cp1": @"category-shoes",
@"cp2": @"running",
@"cg1": @"shop"
}];Example: track a custom event
MappIntelligence.shared()?.trackCustomEvent(
"AddToCart",
trackingParams: [
"cb1": "size-42",
"cb2": "color-black"
]
)[[MappIntelligence shared]
trackCustomEvent:@"AddToCart"
trackingParams:@{
@"cb1": @"size-42",
@"cb2": @"color-black"
}];Trade‑offs vs object oriented tracking
Aspect | Query parameter (this page) | Object oriented |
|---|---|---|
Type safety | None — keys and values are strings. | Compiler‑checked properties on |
Discoverability | Requires reading the pixel parameter reference. | Autocomplete in Xcode. |
Use case | Forwarding parameters from runtime / scripting layers. | All native tracking in the app code. |
Related: Object Oriented Tracking, Pages, Events.