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.
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.
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_LAUNCHerror 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
- If the DeferredDeeplinkParametersListener interface is used: the deferred deeplink doesn't contain valid parameters.
PARSE_ERRORerror is returned if one of the following conditions is not met:
INSTALL_REFERRERmust contain the
appmetrica_deep_linkparameter 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.