At a Glance: This article helps you understand the implementation of Dynamic Unilink on Apptrove to seamlessly redirect users to the right in-app content.
What are Dynamic Unilinks?
Dynamic Unilinking allows you to create links that automatically adjust based on user behavior and device type. Unlike traditional deep linking, which requires predefined links for different scenarios, dynamic unilinks intelligently route users to the appropriate destination without manual setup.
This means a single link can guide users to the right destination—whether it’s the app store for new users or directly into the app for existing users. This streamlined approach replaces the old manual link management via Unilink, reducing setup time and potential errors.
Use Cases for Dynamic Unilinks
Dynamic unilink enhances user engagement by providing seamless navigation experiences. Some key use cases include:
User Acquisition Campaigns: Direct new users to the correct app store for installation while deep linking existing users to specific in-app content.
Re-engagement Campaigns: Bring back inactive users by linking them to personalized offers or features inside the app.
Referral Programs: Ensure referred users land on the exact content or promotion intended, improving conversion rates.
Social Media and Email Marketing: Share deep links that take users directly to relevant app sections instead of just the homepage.
Personalized User Journeys: Enhance user experience by guiding them to tailored content based on behavior and preferences.
Advantages Over Manual Link Management
The previous Unilink system required manual configuration, which could be time-consuming and prone to errors. Here are some advantages of dynamic unilinks over the older method:
Efficiency: Automatically adjust the link behavior based on the user's context, reducing manual intervention.
Accuracy: Minimizes human errors during link setup, ensuring users are directed to the correct content every time.
Enhanced User Experience: Provides a smoother, more personalized navigation experience, leading to higher user engagement.
Easy Updates: Changes to link behavior can be implemented quickly without having to manually update each link.
How to Implement Dynamic Unilinks
Implementing dynamic unilink is straightforward with the Apptrove SDK.
Follow these steps to integrate the feature:
Step 1: Create a Unilink Template
Go to your "Dashboard" and choose "Unilink Management"
Click on the Add New Template, and you will be given the option to choose and create your template based on your requirements. This template is used to configure the desired link behavior.
Navigate to the Unilink template creation page on Apptrove and set up your template.
Once the template is configured, a unique template ID will be generated.
Step 2: Update Your SDK Implementation
Ensure that the generated template ID is integrated into your SDK. The feature will not work without it.
Replace the parameter with the dynamic values according to your needs.
Code Implementation
private fun createDynamicLink(context: Context) {
// Build the dynamic link parameters
val dynamicLink = DynamicLink.Builder()
.setTemplateId("78R2J2") // Set the template ID for the link
.setLink(Uri.parse("https://apptrove.com?utm_redirect=sdk_link")) // The base link
.setDomainUriPrefix("vistmarket.shop") // Domain prefix for the link
.setDeepLinkValue("NewMainActivity") // Deep link destination within the app
// Additional SDK parameters
.setSDKParameters(mapOf("param1" to "value1", "param2" to "value2"))
// Attribution parameters for tracking
.setAttributionParameters(
channel = "my_channel",
campaign = "my_campaign",
mediaSource = "at_invite",
p1 = "param1_value",
p2 = "param2_value",
p3 = "param3_value",
p4 = "param4_value"
p5 = "param5_value"
)
// Android-specific parameters
.setAndroidParameters(
AndroidParameters.Builder()
.setRedirectLink("https://play.google.com?id=com.trackier.vistmarket")
.build()
)
// iOS-specific parameters
.setIosParameters(
IosParameters.Builder()
.setRedirectLink("https://www.example.com/ios")
.build()
)
// Desktop-specific parameters
.setDesktopParameters(
DesktopParameters.Builder()
.setRedirectLink("https://www.example.com/desktop")
.build()
)
// Social media preview settings
.setSocialMetaTagParameters(
SocialMetaTagParameters.Builder()
.setTitle("New Offer: Buy 1 Get 2 Free")
.setDescription("New deal is live now.")
.setImageLink("https://bluetooth_speaker.jpg")
.build()
)
.build()
// Call the SDK to create the dynamic link
TrackierSDK.createDynamicLink(dynamicLink,
onSuccess = { dynamicLinkUrl ->
// If performing any additional tasks, use Coroutine to avoid ANR issues
// Log success messages
Log.d("DynamicLinkSuccess", dynamicLink.toString())
},
onFailure = { errorMessage ->
// Log error messages
// If performing any additional tasks, use Coroutine to avoid ANR issues
Log.d("DynamicLinkError", errorMessage)
}
)
}
Ensure that the SDK integration is tested thoroughly to verify that links are correctly deep linking to the intended destinations
Step 3: Generate the link to shared in-app
Once the implementation is finished, you can now share the link via the in-app sharing functionality, and it will dynamically create the link ready to be used.
Pro Tip:
The dynamic link generated through the SDK will not be visible within the Unilink template. Ensure you reference the correct template ID in your SDK implementation for proper functionality.
Broaden Your Knowledge:
We are delighted to have assembled a world-class team of experienced professionals who are ready to take care of your queries and answer any questions you may have.
Feel free to reach out to us at any time by emailing us at support@apptrove.com or by using the in-platform chat feature. We'd love to hear from you!