Track IDs and Track Domain are normally configured once at SDK initialization. The iOS SDK also supports changing them at runtime — for example, when your app is offered in multiple countries and each language or region is analyzed in a separate Mapp Intelligence account.
Important: Switching accounts at runtime affects entry and exit pages in your analyses and may increase the number of bounces. Consult with your customer success manager before using this feature in production.
Available since iOS SDK version 5.0.3.
Method
Method | Description |
|---|---|
| Replaces the active Track ID(s) and Track Domain at runtime. |
Example
MappIntelligence.shared()?.setIdsAndDomain(
[987654321098765],
onTrackdomain: "https://other-trackdomain.com"
)[[MappIntelligence shared]
setIdsAndDomain:@[@987654321098765]
onTrackdomain:@"https://other-trackdomain.com"];Limitations
This method changes the Track ID and Track Domain only for the current session. To keep the change for future app launches, pass the same values to
initWithConfiguration(...)on next start. See Initialize the SDK.A short delay between the call and the new settings becoming active is possible.
We do not recommend calling this with the same Track ID that is already active.
Do not call this method more than once every 5 seconds. Frequent calls can cause unwanted SDK behavior.
Related pages: Initialize the SDK, Retrieve Active Global Configuration.