Accounting contextual data

Warning.

This is an archived version of the documentation. Actual documentation for all platforms can be found here.

Note. To make the Mobile Ads SDK take the app context into account, enable the AppMetrica SDK version 3.14.3 and higher.

Contextual data accounting is available as of August 20, 2020.

To make monetization more effective, the Mobile Ads SDK automatically takes into account the app context: interface texts, their topics, and how the user interacts with content. This results in selecting more relevant ads.

At the same time:

  • You can restrict contextual data tracking, for example, in places where users enter confidential information: on payment screens or in personal correspondences.
  • You can completely disable contextual data accounting.
  • The SDK only takes into account depersonalized data and corresponds to the ISO standard.
  1. Requirements for using the function
  2. How to enable contextual data accounting
  3. How to disable contextual data accounting

Requirements for using the function

  1. The function is only available for Android.
  2. The minimum supported version of the AppMetrica SDK is 3.14.3 and higher.
  3. The minimum supported version of the Mobile Ads SDK is Android 2.160 and higher.

How to enable contextual data accounting

To enable automatic accounting of application context data, initialize the AppMetrica SDK library version 3.14.3 and higher.

How to disable contextual data accounting

You can disable automatic accounting for different entities: Application, Activity, or View:

To disable automatic accounting of contextual data for the entire app, in the AndroidManifest.xml file at the application level, add the following code:
<meta-data
    android:name="@string/yandex_ads_context"
    android:value="@string/yandex_ads_context_do_not_parse"/>
Code example:
<application 
    android:name="com.yandex.appmetrica.autotests.agent.AgentApplication"
    ...>
    <meta-data
        android:name="@string/yandex_ads_context"
        android:value="@string/yandex_ads_context_do_not_parse"/>
</application>