Direct links for iOS
Universal links are a specific deeplinking protocol available for iOS version 9 and above. Please note that universal links are constructed differently than the custom scheme URL workflows used in previous versions of iOS and on other mobile platforms. While Adjust will handle most of the logic required for universal link functionality with direct links, implementation of this feature does require development within your app.

Once you've properly configured your app to support Adjust tracking for universal links, determine which setup is appropriate for your next campaign and create your URL accordingly.

Setup and Testing Instructions

Integrate universal links

In your Adjust dashboard 

  1. Navigate to your app and select your app options caret (^)
  2. Activate universal links: Select All Settings > (Settings) Platforms > Universal Link
  3. Enter your app's iOS BUNDLE ID (as assigned by the Apple App Store)
  4. Enter your APP PREFIX (as listed within your Apple Developer Account Summary) 
  5. Enter your APP SCHEME (as determined by your app development team)
After all fields have been filled, a short universal link will appear in your universal linking module: http://z9pm.adj.st

Submit this short universal link to your app developer to continue the integration process.
 

1. Navigate to your app and select your app options caret (^)

2a. Select All Settings

2b. Select Platforms

2c. Select Universal Link

3. Enter your app's iOS BUNDLE ID (as assigned by the Apple App Store)

4. Enter your APP PREFIX (as listed within your Apple Developer Account Summary) 

5. Enter your APP SCHEME (as determined by your app development team)

 

Developer Instructions

  1. In your app, insert your short universal link (including the applinks: prefix), e.g., applinks:z9pm.adj.st, in the com.apple.developer.associated-domains entitlement
  2. In your app, implement the continueUserActivity method
    • This is a very simple method to catch the universal links. Details and sample code can be found in the Adjust iOS SDK README.
Once you've completed the steps above, you're ready to test your universal link integration.

Test universal link integration

Confirm that integration is complete by following the steps below.

Instructions

  1. Create a test webpage that you can easily edit and access from your mobile device. This can be done on a local webserver or via CMS.
  2. Add your direct link and/or your Adjust tracker URL with appended deeplink parameter to your test webpage
  3. Add your base direct link, as generated within the Adjust dashboard, to the test webpage
  4. You can use TestFlight to load the new build of the app or install a debug version of the app with xCode. In either case, open your test webpage in the Safari browser.
  5. Click on the direct link and/or your tracker URL with the appended deeplink parameter. Once the new app build has been installed, both links should automatically deeplink into your app.
If the app does not open, verify that your app integration is correct by clicking on the base direct link (in our example, this is https://z9pm.adj.st) If both links fail, then it is time to revisit our integration instructions.

After you've verified successful implementation, you're ready to track campaigns using Adjust parameters or direct links. Continue reading to find setup instructions for each method.

Tracking campaigns with universal links

Once universal links are activated in your Adjust dashboard and integrated into your app, you are ready to set up Adjust tracking. Adjust URLs will automatically use the universal link protocol to fulfill deeplinks, fall back to the App Store, and defer new app users. You can create Adjust tracker URLs with the Adjust deep_link parameter or construct a direct link to deeplink users into your app. 

Direct links allow iOS to bypass the Adjust servers when the app is installed on the mobile device in use. While this setup supports a wider variety of app environments, it also reduces the amount of attribution data collected at click time.

Review the table (below) to determine which setup is most suited for your next Adjust-tracked campaign.*  
    ContextRecommendation

    Deeplinking with any web view except SFSafariViewControllower

    deep_link parameter

    Deep linking with SFSafariViewController

    direct link

    Chrome

    deep_link parameter

    Facebook

    deep_link parameter

    Gmail

    deep_link parameter

    Inbox

    deep_link parameter

    Mail

    direct link

    Messages

    direct link

    Push notifications

    direct deeplink

    QR 2 app linking

    direct link

    Safari

    deep_link parameter

    Slack

    deep_link parameter

    Viber

    direct link

    WhatsApp

    direct link

      *Universal links are not supported in the following app environments: Facebook Messenger, Pinterest, Telegram, Twitter, and WeChat

      Setup Instructions

      Create direct links

      Note: In order to use direct links you must first integrate universal linking in your app

      In the Adjust dashboard
      1. Find your app's short universal link token: Navigate to your app and select your app's options caret (^), then All Settings > (SETTINGS) Platforms > Universal Linking
        In this example, the short universal link token is: z9pm.adj.st
      2. Identify the Adjust tracker token to be used for campaign tracking (navigate to your app, select your app's options caret (^), then Tracker URLs), or create an Adjust tracker URL for your new campaign. (This token should be the lowest level of segmentation, as defined by your Adjust campaign structure parameters).
        In this example, the tracker token is: klm012
      In your preferred text editor
      1. In a plain text file, add https:// to your short universal link token 
        https://z9pm.adj.st/
      2. Append the Adjust tracker token to the URL with the adjust_t parameter. Remember to begin your query string with a ? 
        https://z9pm.adj.st/?adjust_t=klm012
      3. Add your in-app path, if applicable 
        https://z9pm.adj.st/my/path?adjust_t=klm012
      4. Append additional key-value pairings, if necessary. These will be custom to your app and your campaign. 
        ​https://z9pm.adj.st/my/path?adjust_t=klm012&adjust_campaign=Getaway_Vacation_Campaign_2-0&adjust_adgroup=35-42&adjust_creative=island_sunset

      Pro Tip: To shorten the length of your URL, use truncated versions of the Adjust campaign structure parameters. Adjust recognizes the following parameters for attribution data: 

      Parameter nameData type
      adjust_campaigncampaign level (sublevel 1)
      adj_adgroupadgroup level (sublevel 2)
      adj_creativecreative level (sublevel 3)

       

      Once you have completed the steps above, your tracker URL is ready for use.
       

      1a. Navigate to your app and select your app's options caret (^)

      1b. Select All Settings

      1c. Select Platforms

      1d. Select Universal Linking

      1e. In this example, the short universal link token is: u7f3.adj.st

      2a. Identify the Adjust tracker token to be used for campaign tracking or create an Adjust tracker URL for your new campaign. (This token should be the lowest level of segmentation, as defined by your Adjust campaign structure parameters). To find an existing token, navigate to your app and select your app's options caret (^)...

      2b. ...Then select Tracker URLs

      .

      2c. In this example, the tracker token is: bkrn68

      3. In a plain text file, add https:// to your short universal link token

      4. Append the Adjust tracker token to the URL with the adjust_t parameter. Remember to begin your query string with a ?

      5. Add your in-app path, if applicable

      6. Append additional key-value pairings, if necessary. These will be custom to your app and your campaign.

       

      Cross-platform direct links

      A cross-platform direct link is a fail-safe approach for deeplinking all of your app users with a single Adjust URL. Learn how to create a cross-platform direct link in the steps below.

      Note: Setup instructions depend on how you've configured your apps within the Adjust dashboard

      Create cross-platform direct links for apps configured as single platform in Adjust

      Note: The following instructions contain minimum-length tracker tokens. Always use the entire tracker token as displayed in your Adjust Campaign Wizard.

      In the Adjust dashboard

      1. Extract your iOS app's short universal link token by navigating to your app's All Settings > (SETTINGS) > Platforms > Universal Linking

        In our example, the short universal link token is: 
        z9pm.adj.st
        
      2. Identify the custom URI that you want to include in your tracker URL. This will be a specific location or landing page within your Android app.

        In our example, the custom URI is: 
        ​ myamazingapp://super/exclusive/promotion
        All custom URIs must be encoded to ensure that no data is lost. An encoded URI will appear as follows: 
        myamazingapp%3A%2F%2Fsuper%2Fexclusive%2Fpromotion
        
      3. Identify the Adjust tracker tokens to be used for campaign tracking or create an Adjust tracker URL for your new campaign. More than likely, this will be one tracker token for Android and one tracker token for iOS. To reduce the number of characters in your Adjust tracker URL, you may want to use the lowest sublevel (creative level) tracker URL generated within the Adjust dashboard.
      4. In our example, the tracker tokens are: abc123 and 987xyz
      In your preferred text editor
      1. In a plain text file, add https:// to your short universal link token  
        https://z9pm.adj.st/
      2. Append the Adjust tracker tokens to the URL with the adjust_t parameter, separating each token with a single underscore. Remember to begin your query string with a ?
        https://z9pm.adj.st?adjust_t=abc123_987xyz
      3. Add your in-app path, if applicable
        https://z9pm.adj.st/my/path?adjust_t=abc123_987xyz
      4. Append the adjust_deeplink parameter and the encoded custom URI
        https://z9pm.adj.st/my/path?adjust_t=abc123_987xyz&adjust_deeplink=myamazingapp%3A%2F%2Fsuper%2Fexclusive%2Fpromotion
      5. Append additional key-value pairings, if necessary. These will be custom to your app and your campaign.

      Once you have completed the steps above, your URL is ready to deeplink all of your app's users. 

       

      1a. Navigate to your app and select your app's options caret (^)

      1b. Select All Settings

      1c. Select Select Platforms

      1d. Select Universal Linking

      1e. Find your iOS app's short universal link token. In our example, the short universal link token is u7f3.adj.st

      2a. Identify the custom URI that you want to include in your tracker URL. This will be a specific location or landing page within your Android app. In our example, the custom URI is: myamazingapp://super/exclusive/promotion

      2b. All custom URIs must be encoded to ensure that no data is lost. An encoded URI will appear as follows: myamazingapp%3A%2F%2Fsuper%2Fexclusive%2Fpromotion

      3. Identify the Adjust tracker tokens to be used for campaign tracking or create an Adjust tracker URL for your new campaign. More than likely, this will be one tracker token for Android and one tracker token for iOS. To reduce the number of characters in your Adjust tracker URL, you may want to use the lowest sublevel (creative level) tracker URL generated within the Adjust dashboard.

      4. In a plain text file, add https:// to your short universal link token

      5. Append the Adjust tracker tokens to the URL with the adjust_t parameter, separating each token with a single underscore. Remember to begin your query string with a ?

      6. Add your in-app path, if applicable

      7. Append the adjust_deeplink parameter and the encoded custom URI. (Then append additional key-value pairings, if necessary. These will be custom to your app and your campaign.)

       

      Create cross-platform direct links for apps configured as multi-platform in Adjust

      Note: The following instructions contain minimum-length tracker tokens. Always use the entire tracker token as displayed in your Adjust Campaign Wizard.

      In the Adjust dashboard
      1. Extract your iOS app's short universal link token by navigating to your app's All Settings > (SETTINGS) > Platforms > Universal Linking

        In our example, the short universal link token is: 
        z9pm.adj.st
      2. Identify the custom URI that you want to include in your tracker URL. This will be a specific location or landing page within your app.

        In our example, the custom URI is: 
        myamazingapp://super/exclusive/promotion
        All custom URIs must be encoded to ensure that no data is lost. An encoded URI will appear as follows:
        myamazingapp%3A%2F%2Fsuper%2Fexclusive%2Fpromotion
      3. Identify the Adjust tracker token to be used for campaign tracking or create an Adjust tracker URL for your new campaign. To reduce the number of characters in your Adjust tracker URL, you may want to use the lowest sublevel tracker (creative level) URL generated within the Adjust dashboard.

        In our example, the tracker token is: abc123

      In your preferred text editor

      1. In a plain text file, add https:// to your short universal link token
        https://z9pm.adj.st/
      2. Append the Adjust tracker tokens to the URL with the adjust_t parameter. Remember to begin your query string with a ?
        https://z9pm.adj.st?adjust_t=abc123
      3. Add your in-app path, if applicable
        https://z9pm.adj.st/my/path?adjust_t=abc123
      4. Append the adjust_deeplink parameter and the encoded custom URI
        https://z9pm.adj.st/my/path?adjust_t=abc123&adjust_deeplink=myamazingapp%3A%2F%2Fsuper%2Fexclusive%2Fpromotion
      5. Append additional key-value pairings, if necessary. These will be custom to your app and your campaign

      Once you have completed the steps above, your URL is ready to deeplink all of your app's users.
       

      User-added image User-added image User-added image User-added image User-added image User-added image User-added image User-added image User-added image User-added image User-added image User-added image

      1a. Navigate to your app and select your app's options caret (^)

      1b. Select All Settings

      1c. Select Select Platforms

      1d. Select Universal Linking

      1e. Find your iOS app's short universal link token. In our example, the short universal link token is u7f3.adj.st

      2a. Identify the custom URI that you want to include in your tracker URL. This will be a specific location or landing page within your Android app. In our example, the custom URI is: myamazingapp://super/exclusive/promotion

      2b. All custom URIs must be encoded to ensure that no data is lost. An encoded URI will appear as follows: myamazingapp%3A%2F%2Fsuper%2Fexclusive%2Fpromotion

      3. Identify the Adjust tracker token to be used for campaign tracking or create an Adjust tracker URL for your new campaign. To reduce the number of characters in your Adjust tracker URL, you may want to use the lowest sublevel (creative level) tracker URL generated within the Adjust dashboard.

      4. In a plain text file, add https:// to your short universal link token

      5. Append the Adjust tracker tokens to the URL with the adjust_t parameter, separating each token with a single underscore. Remember to begin your query string with a ?

      6. Add your in-app path, if applicable

      7. Append the adjust_deeplink parameter and the encoded custom URI. (Then, append additional key-value pairings, if necessary. These will be custom to your app and your campaign.)

       

      Javascript Universal Links

      Javascript Universal Links (or JSR Universal Links) solve a known universal link limitation.

      If a user clicks on a link that redirects to a Universal Link in a non-Safari environment, it will not work.

      One of the most common use cases of this limitation is with email campaigns. If a user opens an email in their email app and clicks a universal link that redirects them (either into an app they already have on their device or to the app store if they don’t have the app), either path will work as normal. However, if you use a link shortener or link wrapping and redirect from that link to a universal link, the universal link will fail (by sending all users to the store, even if they have the app on their device).

      Our solution implements a javascript redirect that allows the full chain of links to function as expected. If your campaigns are affected by this issue, here is an example of how to add the JSR universal linking parameter to your tracker link:

      https://app.adjust.com/jsr?url=sulink


      Example (encoded):

      https://app.adjust.com/jsr?url=https%3A%2F%2Fab12.adj.st%2F%3Fadjust_t%3Dabc123

      The above solution is limited to iOS versions 11 and higher. If you want to target users in Safari webview or iOS versions lower than 11, users will be sent to the app store even if they have the app installed.  You can add the following flag to your jsr universal link to resolve this issue: adjust_deeplink_js=1

      Example:

      https://app.adjust.com/jsr?url=https%3A%2F%2F6s45.adj.st%2F%3Fadjust_t%3D1uhwo6%26adjust_deeplink_js%3D1
       

      If the user does not have the app installed, they will see an error pop-up before being redirected to the store (the flow is correct but will include an error message the user can click on).

      On this topic