Log in

Deep link settings

MyTracker supports regular and deferred links of the different types: URL Schemes and Universal Links, App URL Schemas, and App Links.

To use deep links, in general, you need the following:

  1. Implement deep links in your app (see the doc for Android and iOS below).
  2. Configure MyTracker SDK to support deep links (for iOS, Android, and Unity).
  3. Publish your app.
  4. Check settings in the MyTracker interface (see below).

To enable deep links for Android, MyTracker supports technologies:

  • Android App Links, see the Android documentation
  • App URL Schema, that involves:
    • Choose a URL scheme for your app
    • Provide the necessary URL scheme support in your app

Select the URL scheme

Selecting an app URL scheme is the first step in deep link implementation.

Final deep links will be similar to your usual http/https links (URI); the only difference is that the http/https scheme will be replaced with a scheme set by the app. Here are some examples: youla://link/to/offer (youla scheme is used), tamtam://chat/chatname (tamtam scheme is used).

Scheme selection tips:

  • Your scheme must be one word in Roman letters
  • Whenever possible, select the unique scheme
  • Use the same scheme for all platforms

Provide the necessary URL scheme support in your app

To make sure that when a deep link is followed the control function is turned over to your app, the app needs to support an intent filter for your selected scheme. For more details on intent filters and their implementation, refer to platform-specific documentation.

Here is an example of intent filtering for an app with mybestapp scheme:

<activity ... >
    <intent-filter>
        <!-- VIEW action displays content to user -->
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="mybestapp" />
        <!-- DEFAULT category is necessary to handle implicit intents -->
        <category android:name="android.intent.category.DEFAULT" />
        <!-- BROWSABLE category is necessary to open links from websites -->
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>
</activity>

Integrate it with MyTracker SDK

The final step is to fine-tune MyTracker SDK integration. Add handleDeeplink method call to onCreate and onNewIntent methods for each app activity that supports deep links. For more details on deep link integration, refer to MyTracker SDK for Android

To enable deep links for iOS, MyTracker supports technologies:

  • URL Schemes (Apple does not recommend using it, see the iOS documentation)
  • Universal Links, that involves:
    • Select a domain for Universal App Links and appropriate AASA (Apple App Site Association) settings
    • Set up support for domain association

For more information about Universal App Links see the iOS documentation

Overview

The general workflow for deep links in combination with MyTracker tracking links on iOS devices is as follows:

  • Preparation
    • Create two third-level domains for each app in MyTracker using the relevant app's name. Two domains are needed to meet Universal Links specifications
    • Once these domains are created, MyTracker will automatically place an AASA file using the data transmitted by the user (Team ID)
    • Then, the app developer should associate the domains created by MyTracker with your app and modify the app as needed
  • Usage
    • Create a tracking link with appropriate deep link settings
    • After clicking on this link, the user will be redirected to a domain created during app setup
    • Seeing that the domain is associated with an app, iOS will suggest opening it in that app
    • If the user agrees, the link will be opened within the app and processed by MyTracker SDK. Otherwise, the user will be redirected to the app page in the App Store

Select a domain for Universal App Links and select appropriate AASA (Apple App Site Association) settings

To enable Universal Links, you need to create and set up a third-level domain on MyTracker servers.

In the List of available apps, select the app you need and click   to open the app properties editing page:

Only account Owners can configure deep link settings

Under Deep link settings on the app page, specify the name of a third-level domain, where MyTracker will place an AASA file, as well as your app's Apple Team ID. Apple Team ID can be found in Apple Developer account https://developer.apple.com/account, under Membership.

Optionally, you may create a CNAME record on your domain and specify the third-level domain you created in MyTracker as destination. Then you can specify that CNAME in deep link settings to make sure that this is the name used in all links.

Apple Team ID in the Developer account:

Associated domain support

Associated domain support is set up in two stages:

  • First, go to your account at the Apple Developer Centre and turn on associated domain support for your app:

    Configuring Associated Domains after saving:

  • Turn on associated domain support in your Xcode project:
    • Go to the Capabilities tab
    • Under Associated Domains, turn on associated domain support
    • Add the domains you need, prefixed with applinks:. MyTracker will create two third-level domains that are required to meet universal link specifications; you will need to add both of these domains to your XCode. Example: for an app with a third-level domain that looks like myapp:
      • applinks:[SELECTED DOMAIN].mytrk.link, for example: applinks:myapp.mytrk.link
      • applinks:[SELECTED DOMAIN]-alternate.mytrk.link, for example: applinks:myapp-alternate.mytrk.link
    • If you use a CNAME record with MyTracker domains, add it to the list
    • Make sure that the entitlement file for the added domains has been included in your project build

Set up support for Universal Links and integration with MyTracker SDK

If associated domains have been configured correctly, clicking a link that contains an associated domain will launch your app and call the application:continueUserActivity:restorationHandler method in AppDelegate. This method needs to be supported in the app through call redirection to MyTracker library.

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler
{
    return [MRMyTracker continueUserActivity:userActivity restorationHandler:restorationHandler];
}

Then, you need to implement a delegate for MyTracker to transmit the deep link value specified at the time of tracking link creation or that of the original deep link, if the app was launched without using MyTracker’s tracking links.

#pragma mark - MRMyTrackerAttributionDelegate
- (void)didReceiveAttribution:(MRMyTrackerAttribution *)attribution
{
    NSString *deeplink = attribution.deeplink;

    // Processing the deep link
    // ...
}

For more details on deep link support, refer to MyTracker SDK for iOS

MyTracker settings

MyTracker provides two options for setting up deep links:

  • The Use a deep link if the app is installed option to select the deep link mode;
  • The Deferred deep link window field to specify the period during which a deferred deep link works.

You can specify all settings when creating a tracking link, thus immediately designating the link mode: a regular or deferred deep link or smart link.

Regular deep links are suited to retargeting when you are sure that most of the audience has already installed your app.

To use a regular deep link in the tracking link:

  1. Choose a deep link scheme and configure SDK as described above for iOS and Android platforms.
  2. Publish the app.
  3. Add a deep link to the tracking link and turn on the Use a deep link if the app is installed option.

As a result, existing users who click the link will be redirected to the specific app content. But the deep link does not work for new users who will be redirected to the store (see exception — a smart link).

Deferred deep links are suited to campaigns focused on getting new users.

To use a deferred deep link in the tracking link:

  1. Choose a deep link scheme and configure SDK as described above for iOS and Android platforms.
  2. Publish the app.
  3. Add a deep link to the tracking link and leave the Use a deep link if the app is installed option off.
  4. If needed, click Additional settings to configure Deferred deep link window.

As a result, new users who click the link will be redirected to the store and then, after app installs, to the specific app content. But the deep link does not work for existing users who will be redirected to the store (see exception — a smart link).

Deferred deep link window is the period during which a deep link works. This is a time interval following a click on ads, for which a user can be sent to specific content in the app.

The thing is when a new user clicks on the deep link, they should install your app before funneling deeper into it. If a user completes installation and runs the app outside this interval, a deep link will not work.

By default Deferred deep link window is 3 hours. You can change the window for the entire project and for separate tracking links. For more details, refer to Project, Regular и Smart tracking link.

Minimum value of the deferred deep link window — 1 hour, maximum — 24 hours.

Smart links are suited to attract any audience because they can combine two types of deep links. It allows using the deferred deep link for new users and the regular deep link for existing users.

To use deep links in the smart tracking link:

  1. Choose a deep link scheme and configure SDK as described above for iOS and Android platforms.
  2. Publish the app.
  3. Add a deep link to the tracking link and turn on the Use a deep link if the app is installed option.
  4. If needed, click Additional settings to configure Deferred deep link window.

Results:

  • new users will be sent to the store and after the app install to the specific app content;
  • existing users will be sent directly to the specific app content.

For details, see the Deep links section

Was this article helpful?