androidyandex

How to test Yandex AppMetrica Deferred deeplinks on Android?


I want to test Deferred deeplink on my Android device before release it in Google Play
There is no information on this page how to test. Also there is no available information in the internet, maybe someone know?


Solution

    1. Go to your existing cabinet or create new one
    2. Open Tracking -> Create Tracker, select your Application, choose MediaSource as Google Search, add SmartLink where AppStore is Google Play click save and copy the generated Tracking URL
      As example here you can find a screenshot!
    3. Open Tracking URL via your Android phone and it will redirect you at Google Store. Do not click anything!
    4. Install your app via adb command adb install app.apk. Make sure that your app have the same applicationID as in Google Play id https://play.google.com/store/apps/details?id=applicationID&...
    5. Open your app and your will received what you set in the url in your specified listener. Keep in mind that deferred deeplink can be requested during first launch only!
    YandexMetrica.requestDeferredDeeplink(object : DeferredDeeplinkListener {
        override fun onDeeplinkLoaded(deeplink: String) = Log.d("Deeplink", "deeplink = $deeplink")
        override fun onError(error: DeferredDeeplinkListener.Error, referrer: String?) = Unit
    })