Test deep links

Before your marketing team goes live with your deep links in a campaign, it's important to test them. This ensures that:

  • They are set up correctly.
  • They deliver the user to the intended content.
  • Adjust is measuring the deep link campaign.

Before you begin

Here's what you need to do before getting started.

  • Set your Adjust SDK environment to sandbox and log level to verbose.
  • Build and run your app in Xcode.
  • Obtain an example deep link from your marketing team.
    • Example: https://example.com/summer-clothes?promo=beach

Create a test link

To test your deep link implementation, you need to create a test link. To do this:

  1. Log in to Adjust Suite.
  2. Under Campaign Lab, select Custom links.
  3. Select New link.
  4. In the App selection screen, choose the app for which you want to create the link.
  5. In the Link structure screen, add a name for your top-level channel link. Optionally, add campaign, adgroup, and creative sub-levels to set up your link structure.
  6. In the User destinations screen, provide the following information for the deep link to add to your link:
    • iOS app scheme
    • iOS app screen
  7. In the Attribution settings screen, ensure that you set probabilistic modeling to ON under New user:attribution > Clicks.
  8. In the Link review screen, review your choices, and make any changes as necessary.
  9. Select Create link to generate the click URL, QR code, and link token.

Example: https://example.go.link/summer-clothes?promo=beach&adj_t=abc123

Test direct deep linking

You can test the following universal link configurations:

  • Adjust universal links
  • Email redirect and URL shortener universal links

Check universal link domain configuration

Important:
iOS does not open universal links as deep links if you enter them directly into your browser. You need to click the universal link as a hyperlink.

To check your universal link domain configuration, follow these steps.

  1. On your iOS test device, paste your universal link in Apple Notes.
  2. In Apple Notes, long press on the universal link to open an iOS menu. If you see the Open in your app option, iOS was able to successfully make the connection between your app and the domain.

If this option does not appear, check the following issues.

Adjust universal links

Email redirect and URL shortener universal links

Test direct deep linking in the app

You should test direct deep linking both when your app is closed and again when its running in the background on the test device.

App closed

  1. Copy and paste the universal link into Apple Notes.
  2. Tap the home button twice. If your app is open, swipe up on it to close it.
  3. Open Apple Notes.
  4. Click the universal link.

The app should open and display the deep link content. If you don’t see the correct page in the app, check the following:

  • Verify that the path or parameters in the deep link are correct. Check if you have used the ? symbol twice instead of the & symbol.
  • Check if your app handles the deep link properly via the following methods.
    • App does not use scenes - application(_:continue:restorationHandler:) method
    • App uses scenes - scene(_:continue:) method
  • Check if other content in your code is interfering with the deep link.
  • If you have set up a redirect to the universal link, ensure that you have configured the redirect correctly.
  • Check if you have configured the Link Resolution method correctly. Ensure that you have added the email redirect domain or URL shortener domain to resolveUrlSuffixArray.

After selecting the deep link, your app calls the appWillOpen method in the Adjust SDK, and you should see entries similar to the following in your Xcode logs:

2022-09-28 09:19:30.873598+0900 example[1619:241845]  [Adjust]d: Added sdk_click 1
2022-09-28 09:19:30.873782+0900 example[1619:241845]  [Adjust]v: Path:      /sdk_click
2022-09-28 09:19:30.873806+0900 example[1619:241845]  [Adjust]v: ClientSdk: ios4.32.1
2022-09-28 09:19:30.873824+0900 example[1619:241845]  [Adjust]v: Parameters:
[...]
2022-03-15 09:19:30.873956+0900 example[1619:241845]  [Adjust]v: source   deeplink

If you do not see these entries in your Xcode logs, ensure the following:

  • You have set the environment to sandbox and logging to verbose in the Adjust SDK.
    • Verbose logging is indicated by [Adjust]v in your Xcode logs.
  • Your app calls the appWillOpen method in the method that receives the deep link.

App running in background

  1. Copy and paste the universal link into Apple Notes.
  2. Tap the home button.
  3. Open your app with the app icon.
  4. Tap the home button twice and open Apple Notes.
  5. Click the universal link.

The app should display the deep link content. If you don’t see the correct page in the app, check the following:

  • Check if your app handles the deep link properly via the following methods.
    • App does not use scenes - application(_:continue:restorationHandler:) method
    • App uses scenes - scene(_:continue:) method

After selecting the deep link, your app calls the appWillOpen method in the Adjust SDK, and you should see entries similar to the following in your Xcode logs:

2022-09-28 09:19:30.873598+0900 example[1619:241845]  [Adjust]d: Added sdk_click 1
2022-09-28 09:19:30.873782+0900 example[1619:241845]  [Adjust]v: Path:      /sdk_click
2022-09-28 09:19:30.873806+0900 example[1619:241845]  [Adjust]v: ClientSdk: ios4.32.1
2022-09-28 09:19:30.873824+0900 example[1619:241845]  [Adjust]v: Parameters:
[...]
2022-03-15 09:19:30.873956+0900 example[1619:241845]  [Adjust]v: source   deeplink

If you do not see these entries in your Xcode logs, ensure the following:

  • You have set the environment to sandbox and logging to verbose in the Adjust SDK.
    • Verbose logging is indicated by [Adjust]v in your Xcode logs.
  • Your app calls the appWillOpen method in the method that receives the deep link.

Test direct deep linking with a custom URL scheme

You can test direct deep linking with a custom URL scheme when your app is closed or running in the background on the test device.

In Apple Notes, select the universal link. The app should open and display the deep link content.

If the app does not open, check the following:

  • You have configured the URL scheme correctly in Xcode.
  • If you are testing a debug build of the app, verify if you are using the debug or release custom URL scheme.

If you do not see the correct page in the app, check the following:

  • Verify that the path or parameters in the deep link are correct. Check if you have used the ? symbol twice instead of the & symbol.
  • Check if your app handles the deep link properly via the following methods.
    • App does not use scenes - application(_:continue:restorationHandler:) method
    • App uses scenes - scene(_:continue:) method
  • Check if other content in your code is interfering with the deep link.

After selecting the deep link, your app calls the appWillOpen method in the Adjust SDK, and you should see entries similar to the following in your Xcode logs:

2022-09-28 09:19:30.873598+0900 example[1619:241845]  [Adjust]d: Added sdk_click 1
2022-09-28 09:19:30.873782+0900 example[1619:241845]  [Adjust]v: Path:      /sdk_click
2022-09-28 09:19:30.873806+0900 example[1619:241845]  [Adjust]v: ClientSdk: ios4.32.1
2022-09-28 09:19:30.873824+0900 example[1619:241845]  [Adjust]v: Parameters:
[...]
2022-03-15 09:19:30.873956+0900 example[1619:241845]  [Adjust]v: source   deeplink

If you do not see these entries in your Xcode logs, ensure the following:

  • You have set the environment to sandbox and logging to verbose in the Adjust SDK.
    • Verbose logging is indicated by [Adjust]v in your Xcode logs.
  • Your app calls the appWillOpen method in the method that receives the deep link.

Test deferred deep linking

To test deferred deep linking on the test device, follow these steps.

  1. Install your app.
  2. Retrieve the Adjust device identifier (ADID) from your Xcode logs. Example:
2022-09-28 09:19:35.609913+0900 example[1619:241847] [Adjust]v: Response: {"app_token":"2eb2na2w54c3","adid":"4446ab34861b99b78ee374c3bd38a350","timestamp":"2022-09-28T00:19:35.841Z+0000","message":"Attribution found","attribution":{"tracker_token":"abc123","tracker_name":"Organic","network":"Organic"}}
  1. Open the Testing Console, enter the Adjust ADID and select View Device Data. You should see the TrackerName as Organic.
    • If it does not, repeat these steps:
    1. Uninstall the app.
    2. In the Testing Console, click Forget Device.
    3. Install the app.
  2. Uninstall the app.
  3. In the Testing Console, forget your device.
  4. Paste your universal link or custom URL scheme deep link in Apple Notes.
  5. Click on the deep link. This should redirect you to the App Store.
  6. Install your app from a local build. Do not install your app from the store.
  7. Open your app. This app should open and display the deep link content.

If you do not see the correct page in the app, check the following:

  • Check if other content in your code is interfering with the deep link. For example: If your app has onboarding screens or requires user login, but your app does not already handle this before opening the deep link. You might have to implement the adjustDeeplinkResponse method to handle onboarding screens or user login before handling the deep link.
  • Your app code is not handling the incoming deep link properly in the adjustDeeplinkResponse method.
  • Adjust did not attribute your install to the click. In the Testing Console, select View Device Data. The TrackerName field should display your test link. Before you start your test, ensure the following:
    • probabilistic modeling was enabled on your test link.
    • In the Testing Console, the TrackerName was set to Organic.
  • Check your link format. For universal links you can use a link like this: https://example.go.link/summer-clothes?promo=beach&adj_t=abc123
    • For custom URL scheme deep links, you have to build an Adjust link URL. Follow the instructions on how to set up deep links.