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:
-
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.
-
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
-
Update the Yandex Mobile Ads SDK to version 7.6.0 or higher.
-
Go to Settings and add the connection with the Yandex Mobile Ads app under Syncing the Ads SDK.
-
Use the same Yandex ID you used to register your app in Yandex Mobile Ads.
-
Make sure that you have completed the app ownership verification process.
-
-
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.
-
Update the Yandex Mobile Ads SDK to version 7.6.0 or higher.
-
Make sure that you have completed the app ownership verification process.
-
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.
-
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.
-
Once you've registered, AppMetrica will start collecting statistics within a few minutes. You don't need to update the app code.
-
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.
-
If you want to use the advanced configuration capabilities of AppMetrica, initialize AppMetrica manually using the API Key specified in the Settings → Main section.
Yandex Mobile Ads SDK automatic events
Available events and their parameters:
-
ad_request
: Ad request from an app.ad_type
: Ad type, such asbanner
,interstitial
,native
, orrewarded
.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 asbanner
,interstitial
,native
, orrewarded
.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 asbanner
,interstitial
,native
, orrewarded
.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 asbanner
,interstitial
,native
, orrewarded
.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 ofad_revenue
value. Acceptable values:publisher_defined
, which is a value based on the CPM threshold from the mediation interface, andestimated
, which is a value based on automated strategies.
-
ad_click
: Click on an ad.ad_type
: Ad type, such asbanner
,interstitial
,native
, orrewarded
.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 asbanner
,interstitial
,native
, orrewarded
.block_id
: Ad space ID.sdk_version
: Yandex Mobile Ads SDK version.ad_network
: Ad network that provides ads.
Learn more
- How do I use the advanced configuration features of the AppMetrica SDK?
- Should I make any changes to the integration if I'm already using the AppMetrica SDK in the app?
- How do I disable Yandex Ads SDK automatic events?
- How to initialize the AppMetrica SDK using logic that's different from the Yandex Mobile Ads SDK initialization?