Deeplink tracking on Android

Starting with version 4.0 of the Android SDK, app openings with a Deeplink are tracked automatically.

To manually track app openings using a deeplink or deeplink processing in a running app, add changes to the Activity that processes deeplinks. Tracking app opening is necessary for correct tracking of the remarketing campaigns.

Note. To work with deeplinks, configure them in your application.

Use the reportAppOpen() method to track app openings:

public class DeeplinkActivity extends Activity {

    @Override
    protected void onCreate(@Nullable final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);    
        if (savedInstanceState == null) {
            YandexMetrica.reportAppOpen(this);
        }
    }
    @Override
    protected void onNewIntent(final Intent intent) {
        super.onNewIntent(intent);
        YandexMetrica.reportAppOpen(intent);
    }
}
Copied to clipboard
Note. You can add the opening of the app via the deferred deeplink on Android.