--- title: "Query Parameter Tracking (Legacy)" slug: "mapp-intelligence-android-sdk-v5-query-parameter-tracking-legacy" description: "Legacy query parameter tracking in Mapp Intelligence Android SDK v5 for existing implementations that still rely on parameter-based requests." updated: 2026-04-24T10:48:18Z published: 2026-04-24T10:48:18Z canonical: "docs.mapp.com/mapp-intelligence-android-sdk-v5-query-parameter-tracking-legacy" deprecated: true excludeFromSearch: true excludeFromExternalSearch: true --- > ## 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. # Query Parameter Tracking (Legacy) > **Deprecated.** Query parameter tracking has been deprecated. Please switch to object-oriented tracking. This page describes the legacy query-parameter tracking APIs in the Android SDK v5. They are still available for compatibility, but they are not the recommended starting point for new implementations. > [!WARNING] > Important > > For new manual integrations, use [Object Oriented Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-object-oriented-tracking). Use query-parameter tracking only if you already have an implementation based on `TrackingParams`, need a very small compatibility layer, or are maintaining older tracking logic. ## When to use this page - You maintain an existing Android integration that already sends `TrackingParams`. - You need to send a small number of legacy page, event, or media requests without introducing the object-based event model immediately. - You want to understand how predefined parameter constants such as `Param` and `MediaParam` map to the legacy API surface. ## When not to use this page - Do not start a new implementation with this approach if you can use [Object Oriented Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-object-oriented-tracking). - Do not use `trackPage(context, ...)` when automatic page tracking is enabled. In the SDK, this method returns immediately when auto-tracking is active. - If you only need campaign deep-link tracking, prefer the dedicated campaign flow with `trackUrl(...)` and the page [Campaign Tracking via Deep Links](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-campaign-tracking-deep-links). ## Available legacy methods | Method | When to use it | | --- | --- | | `trackPage(context, customPageName, trackingParams)` | Tracks the current Android screen with an optional custom page name and optional legacy parameters. Use this only when automatic tracking is disabled. | | `trackCustomPage(pageName, trackingParams)` | Tracks a custom page name without passing the current `Context`. This can be used alongside automatic tracking, but it creates an additional content ID. | | `trackCustomEvent(eventName, trackingParams)` | Tracks a legacy custom event with optional parameter values. | | `trackMedia(mediaName, trackingParams)` `trackMedia(pageName, mediaName, trackingParams)` | Tracks legacy media requests by sending media-related values inside the parameter map. For new manual implementations, prefer the object-based media event approach documented in [Object Oriented Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-object-oriented-tracking). | ## Working with TrackingParams `TrackingParams` is a map of parameter keys and values. You can use predefined constants such as `Param.INTERNAL_SEARCH`, `Param.MEDIA_CODE`, or `MediaParam.MEDIA_ACTION`, and you can create your own parameter keys with `customParam(ParamType, number)`. ```kotlin val Param.CONTENT_GROUP_1    inline get() = customParam(ParamType.PAGE_CATEGORY, 1) val Param.PAGE_PARAM_10    inline get() = customParam(ParamType.PAGE_PARAM, 10) val trackingParams = TrackingParams().apply {    putAll(        mapOf(            Param.CONTENT_GROUP_1 to "home",            Param.PAGE_PARAM_10 to "promo-banner",            Param.INTERNAL_SEARCH to "running shoes"        )    ) } ``` Use names and IDs that match the configuration in Mapp Intelligence. If you are unsure which parameter family to use, start with the more structured object-based approach instead of expanding a large legacy parameter map. ## Page tracking example Use `trackPage(context, ...)` for manual page tracking when automatic tracking is disabled. Use `trackCustomPage(...)` when you want to send a custom page independently from the current Android screen. ```kotlin val pageParams = TrackingParams().apply {    putAll(        mapOf(            Param.MEDIA_CODE to "email.newsletter.nov2020.thursday",            customParam(ParamType.PAGE_PARAM, 10) to "hero-banner"        )    ) } // Manual page tracking for the current screen Webtrekk.getInstance().trackPage(this, "ProductDetail", pageParams) // Custom page tracking without using the current Activity name Webtrekk.getInstance().trackCustomPage("Campaign Landing Page", pageParams) ``` > [!WARNING] > Important > > `trackCustomPage(...)` can be used alongside automatic tracking, but it creates an additional content ID. Use it deliberately to avoid distorted page reporting. ## Event tracking example ```kotlin val eventParams = TrackingParams().apply {    putAll(        mapOf(            customParam(ParamType.EVENT_PARAM, 15) to "cta-click",            Param.MEDIA_CODE to "spring-sale"        )    ) } Webtrekk.getInstance().trackCustomEvent("Open promotion", eventParams) ``` ## Media tracking example Legacy media tracking uses the same parameter-map approach. Supply media-related values with `MediaParam` keys. For robust new implementations, prefer the object-based media API. ```kotlin val mediaParams = TrackingParams().apply {    putAll(        mapOf(            MediaParam.MEDIA_DURATION to "300",            MediaParam.MEDIA_POSITION to "0",            MediaParam.MEDIA_ACTION to "init"        )    ) } Webtrekk.getInstance().trackMedia("SampleVideo", mediaParams) mediaParams[MediaParam.MEDIA_ACTION] = "play" mediaParams[MediaParam.MEDIA_POSITION] = "30" Webtrekk.getInstance().trackMedia("SampleVideo", mediaParams) ``` The SDK fills missing media duration and position values with `0`, but you should send the real values whenever they are available. Start a media session with `init` or `play`. For seek handling, send the position at the start of the seek action and follow it with `play` or `pause` after the seek is complete. ## Related pages - [Object Oriented Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-object-oriented-tracking) - [Automatic Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-automatic-tracking) - [Configure Global Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-configure-global-tracking) - [Campaign Tracking via Deep Links](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-campaign-tracking-deep-links) ## Related - [Analytics API](/analytics-api.md)