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
iOS
To enable deep links for iOS, MyTracker supports technologies:
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:
From the applications list,
select the necessary row, expand the list of actions
and click Edit 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. The 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 the destination.
Before entering a domain in the CNAME field, contact our support team, provide the registered domain,
and wait for confirmation that we have added your domain to your security certificate (SSL).
Associated domain support
Associated domain support is set up in two stages:
Go to your account at the Apple Developer Centre and turn on associated domain support for your app:
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.
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
// ...
}
In the MyTracker interface, you can choose the deep link when creating a tracking link.
There are 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.
The selected settings determine how the link will work:
regular or deferred deep link or smart link.
After saving a link, you cannot edit the deep link.
But you can create another tracking link with a new deep link, and move the old one to the archive.
You can change the deep link URL
on the Entry points tab on your application page.
The changes will take effect on new tracking links but will not affect previously created links.
Regular deep links
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:
Choose a deep link scheme and configure SDK as described above for iOS and Android platforms.
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
Deferred deep links are suited to campaigns focused on getting new users.
To use a deferred deep link in the tracking link:
Choose a deep link scheme and configure SDK
as described above for iOS and Android platforms.
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
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 tracking links
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:
Choose a deep link scheme and configure SDK
as described above for iOS and Android platforms.