Object oriented tracking is the recommended approach for new iOS integrations and the successor to Query Parameter Tracking (Legacy). You build a typed event object (page view, action, media, form, …), optionally attach typed parameter objects (page, event, session, user, e‑commerce, campaign), and pass it to the matching track… method on MappIntelligence.shared().
Before you start, complete the Quickstart so the SDK is initialized.
Why object oriented tracking
Type safety: the compiler checks that you set the right fields on the right event.
Composability: attach only the parameter objects you need — page parameters, e‑commerce data, user categories — without losing track of the request shape.
Forward compatibility: new parameters added to the SDK become new properties on the parameter classes, not new query‑string keys you have to remember.
Note: The iOS SDK does not provide implicit auto‑tracking of view controllers (unlike the Android SDK's activity / fragment auto‑tracking). You always trigger tracking explicitly from your app code — typically in
viewDidAppearor a SwiftUIonAppear.
Building blocks
Tracking events
Event class | Use for | Page |
|---|---|---|
| Page / screen views | |
| User actions on a page | |
| Media playback (audio / video) | |
| Form interactions |
Parameter objects
Parameters class | Attach to | Page |
|---|---|---|
|
| |
|
| |
| Any event | |
| Any event | |
| Any event | |
|
| |
|
| |
| Form tracking |
Minimal example: track a page view
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
let pageEvent = MIPageViewEvent(name: "Product Detail")
pageEvent.pageParameters = MIPageParameters(dictionary: [
1: "category-shoes",
2: "running"
])
MappIntelligence.shared()?.trackPage(pageEvent)
}- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
MIPageViewEvent *pageEvent = [[MIPageViewEvent alloc] initWithName:@"Product Detail"];
pageEvent.pageParameters = [[MIPageParameters alloc] initWithDictionary:@{
@1: @"category-shoes",
@2: @"running"
}];
[[MappIntelligence shared] trackPage:pageEvent];
}Where to go next
Track screens — Pages
Track user actions — Events
Track commerce flows — Products and Orders
Track media playback — Media Tracking
Track form interactions — Form Tracking
Related
Query Parameter Tracking (Legacy) — only if you forward parameters from an existing runtime layer that already produces query strings.