Universal Links support

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

Note. Starting from iOS 12.3.1 and higher, the redirect service won't be able to redirect a user to a deeplink. To make sure deeplinks work properly, use an app‑to‑app tracking link (see Using a direct Universal Link).
  1. Setting up Universal Links
  2. Preparing your app
  3. Configuring your app
  4. Using a direct Universal Link
  5. Testing

Setting up Universal Links

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 your app's Bundle ID and App Prefix.

    How to get the Bundle ID
    You can find the Bundle ID in the Apple developer console, in Organization Profile → Account Summary. In Xcode, you can find it in Target → General.
    How to get the 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, click your name in the upper-right corner of the window and choose View Account → Developer 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 (application 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 application ID:

  1. Go to Identifiers → App 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 Capabilities, enable the Associated Domains option.
  3. In Domains, enter the Universal Link generated by AppMetrica.

Using a direct Universal Link

A direct Universal Link has the following format:

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

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.
Advantages
Maximum coverage of sources where the Universal Link can be published. Direct links aren't confined to browsers – they also work from mobile app ads (app-to-app advertising).
Disadvantages
Statistics might be incomplete: if the app is installed, the direct link opens it without going through the redirect service. This click-through isn't registered in AppMetrica. Since this doesn't affect statistics on new users, the data loss is inconsequential. If the app isn't installed, AppMetrica registers a click-through to the App Store using the direct Universal Link.

Testing

Now your app is fully configured and you can use Universal Links. While the application included Universal Links, when referring to the domain of the view applinks:<app_id>.redirect.appmetrica.yandex.com, will navigate directly to the app.

Note. To test how the Universal Link works, you must use a real device. 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.