adjust-icon

Set up deep linking

Deep links are URIs (Uniform Resource Identifiers) that direct users to specific pages within your app. They enhance user experience by guiding them directly to relevant content after they interact with a link.

The Adjust iOS Extension for the Adobe Experience SDK supports two types of deep linking, based on whether the user has already installed your app:

  • Direct deep links: If the user already has your app installed, the link opens the specified page.
  • Deferred deep links: If the user doesn’t have your app installed, the link directs them to the app store to install it. After installation, the app opens the specified page.

You can reattribute your users by sending deep link information to Adjust. When a user engages with a deep link, you can send this data to Adjust to update their attribution information.

  1. First, create an ADJDeeplink instance with your deep link URI. The ADJDeeplink class validates this URI and checks the formatted string to ensure successful processing.

  2. Then, call the processDeeplink function to handle the deep link and pass the information to Adjust.

The ADJDeeplink class constructor requires the following argument:

deeplink: NSURL

The deep link URI that opens your app.

The processDeeplink function requires the following argument:

adjustDeeplink: ADJDeeplink

TheADJDeeplinkinstance you created.

The Adjust iOS Extension for Adobe Experience SDK opens deferred deep links by default. To control this behavior, or perform validation before the deep link is opened, configure the extension to call a function when the app opens via a deferred deep link.

  1. Call setDeferredDeeplinkReceivedBlock on your AdjustAdobeExtensionConfig instance.
  2. Call AdjustAdobeExtension.setConfiguration to set your configuration.

The setDeferredDeeplinkReceivedBlock function requires the following argument:

deeplinkResponseBlock: CallbackDeeplinkResponseBlock

A function that returns abooleanvalue. If it returnsfalse, the extension won't open the deferred deep link.

Tutorial: Create a deferred deep link function

If you followed the integration guide, you've already configured the Adjust Extension to process and open deep links. If you haven't done this, refer to set up deep link handling for instructions.

In this tutorial, you'll learn how to create a callback function that controls deep linking functionality using the setDeferredDeeplinkReceivedBlock method. The function will open the link depending on the following condition:

"If the deep link contains "no_open", the app won't open it."

The result looks like this:

Here's what you need to do:

  1. Inside your App Delegate, find your AdjustAdobeExtensionConfig instantiation. On the next line, call the setDeferredDeeplinkReceivedBlock method with a function block as an argument. This function block receives the deep link as an argument.

  2. Inside the setDeferredDeeplinkReceivedBlock function block, add an if block to check whether the deep link contains the string "no_open". If it does, return false.

  3. Finally, return true to open all deep links that don't contain "no_open".

That's it! When a user opens your app with a deferred deep link, the Adjust Extension will check if the link contains the string "no_open". If it does, the app won't open the deep link.