Documentation

Parameters of the tracking URL

The structure and parameters of the AppMetrica tracking URL are described below.

Structure

[schema — https только]://[domain — redirect.appmetrica.yandex.com]/serve/[tracking ID — tracker ID]

Example:

https://redirect.appmetrica.yandex.com/serve/1019409635088005254

Domain variations:

  • redirect.appmetrica.yandex.com — The main domain currently in use.

Possible variations:

  • appmetrika.yandex.com
  • appmetrica.yandex.ru
  • appmetrika.yandex.ru

Tracking URL contains pre-defined parameters that are required for tracking to work. The advertising system (the AppMetrica partner) must transmit specific values via these parameters. To simplify this process, AppMetrica provides macros of various media sources for substituting in parameters. Specify them in the tracking URL when creating the tracker. For example:

AppMetrica stores macros-params corresponding to Partner A:

  • click_id — {transaction_id}
  • google_aid — {GAID}

The resulting Tracking URL for Partner A:

https://redirect.appmetrica.yandex.com/serve/1019409635088005254?click_id={transaction_id}&google_aid={GAID}

The user must provide this tracking URL to Partner A. Tracking will begin automatically.

Parameters

Parameters are divided into categories: required, recommended, and optional. Note that there are additional parameters for S2S calls.

Required

click_id={YOURMACRO}& — Macro for transmitting a unique click ID. Used for deduplication.

Recommended

Parameters for more exact counts of installations.

google_aid={YOURMACRO}& — Google AID, in the format that it was received from the device in.

google_aid_sha1={YOURMACRO}& — SHA1 hash of Google AID.

google_aid_md5={YOURMACRO}& — MD5 hash of Google AID.

ios_ifa={YOURMACRO}& — IFA, in the format that it was received from the device in.

ios_ifa_sha1={YOURMACRO}& — SHA1 hash of IFA.

ios_ifa_md5={YOURMACRO}& — MD5 hash of IFA.

windows_aid = {YOURMACRO} — Windows AID in the format that it was received from the device in.

windows_aid_sha1={YOURMACRO} — SHA1 hash of Windows AID.

windows_aid_md5={YOURMACRO} — MD5 hash of Windows AID.

Parameters for S2S calls

device_ip={YOURMACRO}& — The device's URL-encoded IP address. IPv4 and IPv6 are supported.

device_ua={YOURMACRO}& — The device's URL-encoded User-Agent.

click_timestamp={YOURMACRO}& — UTC timestamp of the click in seconds.

noredirect={YOURMACRO}& — Notifies AppMetrica that the click should be counted without redirection to the app store. The default value is 1.

For more information, see S2S integration.

Optional

Parameters for campaign optimization. The transmitted parameters are displayed in the Traffic sources report in a tree view.

afpub_id={YOURMACRO}& — ID of an affiliated publisher (sub-partner).

site_id={YOURMACRO}& — ID of a specific advertising place.

creative_id={YOURMACRO}& — ID of a specific banner.

Custom parameters

For better campaign optimization, the advertiser and advertising network can transmit additional parameters in the tracking URL.

To transmit custom parameters, add them to the tracking URL when editing it in AppMetrica, and save it. There are multiple ways to transmit values using these parameters:

  • Manually — Enter the parameter value:

    &custom_parameter=value1 and &custom_parameter=value2
  • Automatically — Use macros for automatic substitution on the advertising network's side:

    &example_param={CUSTOM_MACRO}

All parameters listed in the tracking URL will be shown in the Traffic sources report in a tree view.

Examples

You can use these examples for testing — replace the macros with your own. Delete any unnecessary, unsupported, or optional parameters as needed.

Android
https://redirect.appmetrica.yandex.com/serve/600573419754384676?click_id={transaction_id}&google_aid={google_aid}&afpub_id={affiliate_id}&custom_price={payout}
iOS
https://redirect.appmetrica.yandex.com/serve/528515824760210044?click_id={transaction_id}&ios_ifa={ios_ifa}&afpub_id={affiliate_id}&custom_price={payout}

Sending parameters to the postback URL, deeplink, and destination URL

To pass a parameter value from the tracking URL to the postback URL, deeplink, or destination URL, add the parameter name to their URLs in curly brackets: {custom_parameter}. Any parameters can be transmitted this way — custom or pre-defined.

Examples of transmitting parameters:

To the destination URL
For example, for transmitting a custom parameter to the Google Play referrer.
To the postback URL

To add a macro to transmit, edit the postback URL in the tracker settings:

To a deeplink
To add a macro to transmit, edit the deeplink in the tracker settings:

For example, the following parameters are transmitted in the tracking URL:

https://redirect.appmetrica.yandex.com/serve/123456?custom_parameter=value1&another_param=value2

To pass the value1 and value2 parameters to the postback URL, write:

https://endpoint.myadnetwork.com?some_parameter={custom_parameter}&another_param={another_param}