Deferred deeplinks in Adapty Attribution

Deferred deeplinks allow you to pass custom data to your app when users install it after clicking your ads. For example, you can navigate them to a specific location in your app right after they install and launch it.

Important

Starting from Adapty SDK version 4.1, Adapty Attribution is disabled by default. The onInstallationDetailsSuccess callback fires only after you enable Adapty Attribution when activating the SDK.

Here’s how it works:

  1. When a user clicks your ad, Adapty saves the click data.
  2. When Adapty registers the install event, it gets deferred data from the click.
  3. After the user installs your app, and it launches for the first time, Adapty retrieves the stored data and your app receives the custom parameters, allowing you to react to different values in the app code.

Your app only receives deferred data when Adapty matches the install to the click. If a user who already has your app clicks your ad, the app receives no new deferred data.

On iOS, Adapty only matches the install to the click if both come from the same IP address range. For example, Adapty doesn’t match a click on Wi-Fi to a first launch on cellular, so your app receives no deferred data.

Adapty supports the following deferred data parameters:

  • ios_deferred_data
  • android_deferred_data
  • deferred_data_sub[1-10]

To add deferred data parameters, append them to your link in your campaign settings:

  1. If your campaign runs on Meta Ads or TikTok, find your tracking link in Integrations > Meta Ads or TikTok Ads. If your campaign targets a different platform, open Integrations > Custom. Then copy the link you want to use.
ua-lnk.webp
  1. In your ad platform (Meta, TikTok, Google Ads, etc.), paste the link into the ad destination URL field, then append the deferred data parameters to it as extra query parameters — each prefixed with &. For example, to send iOS users to a ‘Welcome’ screen after install, add &ios_deferred_data=welcome. The final destination URL will look like this:
https://api-ua.adapty.io/api/v1/attribution/c/YOUR_CODE?campaign_id=__CAMPAIGN_ID__&adset_id=__AID__&ad_id=__CID__&campaign_name=__CAMPAIGN_NAME__&adset_name=__AID_NAME__&ad_name=__CID_NAME__&redirect_url=__APP_LINK__&ios_deferred_data=welcome
  1. Respond to the parameters in your app code. The SDK passes them in the payload property of the installation details:
    • iOS: Read them from payload.dictionary.
    • Android: Read them from payload.dataMap.
    • React Native and Flutter: payload is a JSON string, so parse it first.

For example, here is how you can handle installations where ios_deferred_data is welcome:

Adapty.delegate = self

nonisolated func onInstallationDetailsSuccess(_ details: AdaptyInstallationDetails) {
    guard
        let deeplink = details.payload?.dictionary?["ios_deferred_data"] as? String,
        deeplink == "welcome"
    else { return }

    DispatchQueue.main.async {
        print("Navigate to welcome screen")
        // navigate to your screen here
    }
}