Deferred deeplinks support

A deferred deeplink is used to transfer parameters to the application at the first start. These parameters can be used to perform actions in the application (to open specific application screen, to display certain content, etc.) depending on the source that led the user.

Unlike usual deeplinks, deferred deeplinks work only at the first application launch.

Note. Deferred deeplinks work only on Android devices.

How deferred deeplinks work

The following scheme shows the deferred deeplinks workflow:

  • A user clicks on the tracking link which contains the parameters of the deferred deeplink.
  • The tracking URL directs the user to the application store.
  • The user downloads the application.
  • After the first application start, the deferred deeplink parameters are sent to the application. You should perform a request to get the parameters.

Error descriptions

The DeferredDeeplinkListener and DeferredDeeplinkParametersListener interfaces contain descriptions of errors that may occur when making the request:


The parameters or deferred deeplink can't be obtained since they can only be requested at the initial application start.

The first launch of the application is the session of the process (runtime environment, virtual machine) during which the user first requests the parameters. If the deeplink is present at the time of the request, the listener is invoked synchronously in the same thread. At the next start of the process, the library no longer sees the deferred deeplink and the NOT_A_FIRST_LAUNCH error is returned.

Depending on the interface, the error means the following:
  • If the DeferredDeeplinkListener interface is used: couldn't find the deferred deeplink. This may happen if the referrer didn't contain the appmetrica_deep_link parameter.
  • If the DeferredDeeplinkParametersListener interface is used: the deferred deeplink doesn't contain valid parameters.

    The PARSE_ERROR error is returned if one of the following conditions is not met:

    • INSTALL_REFERRER must contain the appmetrica_deep_link parameter.
    • The appmetrica_deep_link parameter value must contain the valid URI.
    • There must be at least one query parameter in the deeplink URI.

    Example of a valid deferred deeplink: sampleapp://samplepath?sampleparam1=samplevalue1.

    Attention. The maximum number of characters that can be transferred in the deferred deeplink parameters is 7475.