Deep Links
A deep link is a hyperlink that launches a mobile app and, optionally, delivers specific content within the app. Deep links are often used to measure the performance of advertisement campaigns or promotional emails that link users to your app.
Supported Platforms
The following platforms support deep link tracking:
How it Works
When your app is launched from a deep link, the Tealium library adds the URL to the data layer as the attribute deep_link_url
.
The deep link’s query parameters are added to the data layer with attribute names in the format deep_link_param_<param name>
.
For example, https://example.com/?campaign_code=SUMMER
becomes:
deep_link_url = "https://example.com/?campaign_code=SUMMER"
deep_link_param_campaign_code = "SUMMER"
Deep link data layer attributes are only stored for the session.
Configuration
Android Kotlin
Deep link tracking is automatically enabled in Tealium for Android (Kotlin).
Disable automatic tracking of deep links by setting the deepLinkTrackingEnabled
property to false
.
Swift v2.x
Deep link tracking is automatically enabled in Tealium for iOS (Swift v2.x).
Swift v1.x
Tealium for iOS (Swift v1.x) requires a single line of code to be added to your app’s AppDelegate
class to enable deep linking.
func application(_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
tealium?.handleDeepLink(url)
return true
}
Data Layer
The following properties are added to your data layer when your app is launched from a deep link:
Event Attribute | Type | Description | Example |
---|---|---|---|
deep_link_url |
String |
Full URL of the deep link that launched the app including query parameters | https://example.com/?campaign_code=SUMMER |
deep_link_param_X |
String |
Each query parameter gets its own data layer entry, where X is the name of the parameter, such as deep_link_param_campaign_code |
SUMMER |