Universal Link support

Deeplinks in tracking links don't work for iOS versions higher than 12.3.1. If the user clicks such a link, the system doesn't redirect them to the previously installed app. To redirect the user to an iOS app, use the Universal Link technology to set up transition to the app.

iOS requires a secure connection between an app and its associated domains. In order to establish such a connection, AppMetrica places a file called apple-app-site-association on its domain. The file contains a Bundle ID and App Prefix of the app.

To activate Universal Links for your app, follow these steps in the AppMetrica web interface:

  1. Go to the Applications section.

  2. Select the app and go to Settings.

  3. Open the Main tab and enter the Bundle ID and App Prefix of the app in the appropriate fields.

    How to get Bundle ID

    You can find the Bundle ID in the Apple Developer Console, under Organization ProfileAccount Summary. In Xcode, you can find it under TargetGeneral.

    How to get App Prefix

    You can find the App Prefix in the Apple Developer Console. In most cases, the App Prefix is the same as the Team ID. This ID is also available in the Apple Developer Console (in the Member Center section, click your name in the upper-right corner of the window and choose View AccountDeveloper Account Summary).

  4. Set the Use Universal Link option to On and click Save settings. After this, you will see a link in the Universal Link field that looks like applinks:<app_id>.redirect.appmetrica.yandex.com, where <app_id> is your app's ID in AppMetrica (app ID).

Preparing your app

If your app is already registered in the Apple Developer Center, go to the developer console and enable Associated Domains for the app ID:

  1. Go to IdentifiersApp IDs .
  2. Select the app, then enable the Associated Domains option for the Development and Distribution columns.

Configuring your app

In the Xcode interface, follow these steps:

  1. Select the app target.
  2. In the Capabilities section, enable the Associated Domains option.
  3. In the Domains field, enter the Universal Link generated by AppMetrica.

Using a direct Universal Link

Direct Universal Links have the following format:

https://<application_id>.redirect.appmetrica.yandex.com/?appmetrica_tracking_id=<tracking_id>

A link in this format is automatically generated in the tracker settings after following these instructions, in the App-to-app tracking link field.

Depending on the circumstances, clicking a link like this makes one of the following happen:

  • The app opens, if it is already installed.
  • The app's page in the App Store opens, if the app isn't installed.

Note

If the iOS app is already installed, it will open directly, bypassing our redirect service. This means that the click won't count. In such cases, only opening the app via the link is counted.

A click will also be counted if the application wasn't installed at the click time and the user was redirected to the App Store.

Testing

Your app is now fully configured, and you can use Universal Links. As long as Universal Links are enabled for the app, requesting a domain formatted like applinks:<app_id>.redirect.appmetrica.yandex.com should redirect directly to the app.

Note

You must use a real device to test Universal Links. If the Associated Domain is changed, make sure the app is reinstalled.

If Safari opens instead of the app, reinstall the app. If the problem persists, add a new Associated Domains row in Xcode (so it will change), and then reinstall the app.

Make sure that your link has the same domain as your app.

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support