--- title: "Change Track IDs and Domain at Runtime" slug: "mapp-intelligence-android-sdk-v5-change-track-ids-domain-runtime" description: "Change active Track IDs and the track domain at runtime in Mapp Intelligence Android SDK v5 for multi-account or context-specific tracking." updated: 2026-04-24T10:45:55Z published: 2026-04-24T10:45:55Z canonical: "docs.mapp.com/mapp-intelligence-android-sdk-v5-change-track-ids-domain-runtime" --- > ## 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. # Change Track IDs and Domain at Runtime Use `setIdsAndDomain(...)` to switch the configured track IDs and track domain during the current app session. > [!WARNING] > Important > > Switching accounts at runtime changes where subsequent tracking requests are sent. It is best suited for rare, explicit transitions such as switching between app variants, markets, or account-specific contexts. ## Method | Method | Description | | --- | --- | | `setIdsAndDomain(trackIds: List<String>, trackDomain: String)` | Updates the active track IDs and track domain for the current runtime session. | | `getTrackIds()` `getTrackDomain()` | Returns the currently active runtime values. | ## Kotlin example ```kotlin Webtrekk.getInstance().setIdsAndDomain(    trackIds = listOf("1111111111111111", "2222222222222222"),    trackDomain = "yourtrackdomain.mapp.com" ) ``` ## Persisting the change `setIdsAndDomain(...)` changes the active configuration only for the current runtime session. If you want the same values after the app restarts, initialize the SDK with the same track IDs and domain in your main configuration. ```kotlin val configuration = WebtrekkConfiguration.Builder(trackIds, trackDomain)    .build() ``` ## When to use it - You need to switch between different Intelligence accounts while the app is running. - You explicitly route tracking to different accounts for different app contexts. ## When not to use it - Do not call this method as part of normal page-to-page navigation. - Do not use it as a substitute for the normal SDK initialization flow when your app only has one stable account configuration. Related pages: [Initialize the SDK](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-initialize-sdk), [Configure Global Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-configure-global-tracking), [Retrieve Active Global Configuration](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-retrieve-active-global-configuration).