Learn about the deep link tracking feature available in the Android (Kotlin) and iOS (Swift) SDKs.
3 minute read
This guide walks you through the deep link tracking feature available in the RudderStack Android (Kotlin) and iOS (Swift) SDKs.
Overview
Deep links are URLs that navigate users directly to specific content within your app, bypassing the home screen. The RudderStack mobile SDKs support tracking deep link opens, allowing you to:
Capture which deep links bring users into your app
Track query parameters for attribution and analytics
Understand user acquisition sources and campaign performance
The Android (Kotlin) SDK provides automatic deep link tracking, while the iOS (Swift) SDK requires manual API calls to track deep links.
Event structure
When a deep link is tracked, the SDK sends a track event with the event name Deep Link Opened. The event properties include:
Property
Type
Description
url
String
The complete URL string
Query parameters
String
Each query parameter is extracted and added as a separate property
For example, the SDK sends the below event for the deep link https://test.com/_app?id=123&ref=campaign:
{"event":"Deep Link Opened","properties":{"url":"https://test.com/_app?id=123&ref=campaign","id":"123","ref":"campaign"}}
iOS (Swift)
The RudderStack iOS (Swift) SDK provides a manual API to track when users open your app via deep links. You can use the open(url:options:) method to track deep link events:
analytics.open(url:url,options:["source":"email_campaign"])// Without optionsanalytics.open(url:url)
[analyticsopenURL:urloptions:@{@"source":@"email_campaign"}];// Without options
[analyticsopenURL:url];
Custom properties
The iOS (Swift) SDK supports custom options that are merged into the event properties. Any additional options you pass to the open(url:options:) method are included in the event payload.
Universal links
For universal links, implement the appropriate delegate method in your app:
The RudderStack Android (Kotlin) SDK provides automatic deep link tracking, meaning it automatically tracks deep link events when your app is opened via a deep link, without requiring manual API calls.
Deep link tracking is enabled by default in the Android (Kotlin) SDK.
Manage automatic deep link tracking
To enable or disable automatic deep link tracking, set the trackDeepLinks parameter in the Configuration object during SDK initialization:
valconfiguration=Configuration(application=application,writeKey="YOUR_WRITE_KEY",dataPlaneUrl="YOUR_DATA_PLANE_URL",trackDeepLinks=false// Set to true to enable automatic deep link tracking
)valanalytics=Analytics(configuration)
Configurationconfiguration=newConfigurationBuilder(application,"YOUR_WRITE_KEY").dataPlaneUrl("YOUR_DATA_PLANE_URL").trackDeepLinks(false)// Set to true to enable automatic deep link tracking
.build();Analyticsanalytics=newAnalytics(configuration);
Additional properties
The Android SDK captures additional referrer information:
Property
Type
Description
referring_application
String
The URI of the app that opened the deep link (if available)
A sample event payload with referrer information is shown below:
{"event":"Deep Link Opened","properties":{"url":"https://test.com/_app?id=123&ref=campaign","referring_application":"android-app://com.example.referringapp","id":"123","ref":"campaign"}}
Trigger deep links with referrer
To open a deep link from another Android app with proper referrer attribution:
No — deferred deep linking is not supported in either the iOS (Swift) or Android (Kotlin) SDKs.
Deferred deep linking requires a backend service to capture and store the deep link URL when a user clicks it (before the app is installed), then match and deliver that data after installation. This server-side infrastructure is beyond the scope of a client-side SDK.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.