Integration with Yandex Ads SDK

If you have Yandex Mobile Ads SDK version 7.6.0 or higher, you can use the analytical capabilities of AppMetrica without separately initializing the AppMetrica SDK. You can also access the automatically collected ad interaction events.

Key features:

  1. Automatic tracking of basic events: installations, session starts and ends, deeplinks, in-app purchases.

    Event tracking will start automatically when you initialize the Yandex Mobile Ads SDK in the app. To do this, activate the integration in the AppMetrica interface. You don't need to update the app code.

  2. Automatic tracking of Yandex Mobile Ads SDK interaction events: ad requests, responses, impressions, clicks.

    Apps synchronized with the Yandex Mobile Ads SDK will automatically send data to AppMetrica.

    If you manually initialize the AppMetrica SDK in your app, data will start flowing automatically, as long as the Yandex Mobile Ads SDK is also initialized and synchronization with Yandex Mobile Ads is enabled in the AppMetrica settings.

If you are using AppMetrica in the app

  1. Update the Yandex Mobile Ads SDK to version 7.6.0 or higher.

  2. Go to Settings and add the connection with the Yandex Mobile Ads app under Syncing the Ads SDK.

  3. New data on the interaction with Yandex Mobile Ads SDK will appear in the Events report within a few minutes. These events don't count towards the event limits.

If necessary, you can disable data collection using the method setAppAdAnalyticsReporting for Android and method setAppAdAnalyticsReportingEnabled for iOS in the Yandex Mobile Ads SDK configuration or remove the connection in the synchronization settings.

If you haven't used AppMetrica before

Activate integration when registering in the AppMetrica interface.

  1. Update the Yandex Mobile Ads SDK to version 7.6.0 or higher.

  2. Make sure that you have completed the app ownership verification process.

  3. Register in AppMetrica with the same Yandex ID you used to register your app in Yandex Mobile Ads.

    At step 1, you'll see a notification telling you that you can connect the Yandex Ads SDK. If you don't see it, check if you're using a different username or if the app wasn't verified.

  4. At step 3 (Syncing the Ads SDK), specify from which apps with Ads SDK you want to send statistics to AppMetrica.

    We recommend selecting all platforms (for example, iOS and Android) for your app. You can add more apps at step 5.

  5. Once you've registered, AppMetrica will start collecting statistics within a few minutes. You don't need to update the app code.

  6. If you want to send additional data to AppMetrica, such as custom events, use the corresponding methods. You don't need to initialize AppMetrica to do this.

  7. If you want to use the advanced configuration capabilities of AppMetrica, initialize AppMetrica manually using the API Key specified in the SettingsMain section.

Yandex Mobile Ads SDK automatic events

Available events and their parameters:

  • ad_request: Ad request from an app.

    • ad_type: Ad type, such as banner, interstitial, native, or rewarded.
    • block_id: Ad space ID.
    • sdk_version: Yandex Mobile Ads SDK version.
  • ad_attempt: Successful ad request to the ad network.

    • ad_type: Ad type, such as banner, interstitial, native, or rewarded.
    • block_id: Ad space ID.
    • sdk_version: Yandex Mobile Ads SDK version.
    • ad_network: Ad network that provides ads.
  • ad_filled_request: Ad request that resulted in ad selection.

    • ad_type: Ad type, such as banner, interstitial, native, or rewarded.
    • block_id: Ad space ID.
    • sdk_version: Yandex Mobile Ads SDK version.
    • ad_network: Ad network that provides ads.
    • banner_id: Banner ID.
  • ad_impression: Ad impression.

    • ad_type: Ad type, such as banner, interstitial, native, or rewarded.
    • block_id: Ad space ID.
    • sdk_version: Yandex Mobile Ads SDK version.
    • ad_network: Ad network that provides ads.
    • banner_id: Banner ID.
    • ad_revenue: Revenue for ad impressions in the advertising network's currency.
    • currency: Advertising network's currency.
    • precision: The accuracy of ad_revenue value. Acceptable values: publisher_defined, which is a value based on the CPM threshold from the mediation interface, and estimated, which is a value based on automated strategies.
  • ad_click: Click on an ad.

    • ad_type: Ad type, such as banner, interstitial, native, or rewarded.
    • block_id: Ad space ID.
    • sdk_version: Yandex Mobile Ads SDK version.
    • ad_network: Ad network that provides ads.
    • banner_id: Banner ID.
  • ad_reward: Accrual of rewards for viewing "rewarded" ads.

    • ad_type: Ad type, such as banner, interstitial, native, or rewarded.
    • block_id: Ad space ID.
    • sdk_version: Yandex Mobile Ads SDK version.
    • ad_network: Ad network that provides ads.

Learn more