Dynamic Link
Dynamic links allow you to direct users to specific in-app content, track campaign performance, and handle platform-specific redirects (e.g., Play Store, iOS, desktop). With the Trackier Ios SDK, you can create dynamic links programmatically, embedding attribution and deep link parameters to enhance user acquisition and engagement.
Overview
Dynamic links provide a flexible way to route users based on their platform and context:
- Purpose: Generate links for campaigns, deep linking to specific app content (e.g., NewMainActivity).
- Use Case: Create a link like
https://vistmarket.shop/78R2J2
that directs users to a product page with parameters (productid=jeans
) and tracks campaign data (campaign=my_campaign
).
Key Features:
- Deep link to in-app destinations
- Attribution parameters for tracking
- Platform-specific redirects (Android, iOS, desktop)
- Social media previews for sharing
Example Link:
- Generated:
https://vistmarket.shop/78R2J2?param1=value1&campaign=my_campaign
- Redirects to:
https://apptrove.com?utm_redirect=sdk_link
or Play Store Or Ios app store if app not installed
Configure Trackier Panel
- Log in to the Trackier Panel
- Go to Dynamic Links > Create Template
- Set:
- Template ID: 78R2J2
- Setup Template
- Save and note the template ID (Required for Dynamic Link)
- Create Layout (Optional)
- Add a button to trigger dynamic link creation in your activity
Implementation
Dart Example
DynamicLink.dart
private func didTapCreateDynamicLink() {
let dynamicLink = DynamicLink.Builder()
.setTemplateId("PQBdiM")
.setLink("https://trackier58.u9ilnk.me?dlv=product")
.setDomainUriPrefix("trackier58.u9ilnk.me")
.setDeepLinkValue("productios")
.setAndroidParameters(
AndroidParameters.Builder()
.setRedirectLink("https://play.google.com/store/apps/details?id=com.trackier.vistmarket")
.build()
)
.setSDKParameters(["param1": "value1", "param2": "value2"])
.setAttributionParameters(
channel: "my_channel",
campaign: "my_campaign",
mediaSource: "at_invite",
p1: "param1_value",
p2: "dfjsdfsdf",
p3: "sdfsdfsdf"
)
.setIosParameters(
IosParameters.Builder()
.setRedirectLink("https://apps.apple.com/us/app/naughts-n-crosses/id1560127886")
.build()
)
.setDesktopParameters(
DesktopParameters.Builder()
.setRedirectLink("https://www.vistmarket.com")
.build()
)
.setSocialMetaTagParameters(
SocialMetaTagParameters.Builder()
.setTitle("New Offer Buy 1 Get 2 Free")
.setDescription("New Deal is live now just Open Vist market and purchase any product and get 2 product free")
.setImageLink("https://storage.googleapis.com/static.trackier.io/images/test-data/downloaded_images/bluetooth_speaker.jpg")
.build()
)
.build()
if #available(iOS 13.0, *) {
TrackierSDK.createDynamicLink(dynamicLink: dynamicLink, onSuccess: { [weak self] link in
DispatchQueue.main.async {
self?.dynamicLinkResultLabel.text = "Dynamic Link: \(link)"
}
print("Dynamic Link: \(link)")
}, onFailure: { [weak self] error in
DispatchQueue.main.async {
self?.dynamicLinkResultLabel.text = "Failed: \(error)"
}
print("Failed to create dynamic link: \(error)")
})
} else {
dynamicLinkResultLabel.text = "iOS 13+ required"
}
}