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 Apptrove .NET MAUI 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.
- Use Case: Create a link like
https://vistmarket.shop/78R2J2that 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
Configure Apptrove Panel
- Log in to the Apptrove Panel
- Go to Unilink Management > Create Template
- Setup Template
- Save and note the template ID (Required for Dynamic Link)
Implementation
// Creates a short, shareable dynamic link with attribution and platform fallbacks.
var url = await AppTroveSDK.CreateDynamicLink(
// Set the template ID for the link (Get this id from Panel)
templateId: "wy23Px",
// Base/fallback URL used in browsers and link previews.
link: "https://trackier58.u9ilnk.me",
// Your verified/branded dynamic link domain.
domainUriPrefix: "trackier58.u9ilnk.me",
// In-app route/value used to navigate within your app.
deepLinkValue: "CakeActivity",
// Where Android users go if the app isn't installed (Play Store URL).
androidRedirect: "https://play.google.com/store/apps/details?id=com.trackier.vistmarket",
// Handle your own logic based on these SDK parameters after deep link resolution.
sdkParameters: new Dictionary<string, string>
{
{ "product_id", "chocochip" },
{ "quantity", "2" }
},
// Attribution parameters for tracking user actions or events.
attributionParameters: new Dictionary<string, string>
{
{ "channel", "my_channel" },
{ "media_source", "at_invite" },
{ "campaign", "sanu" }
},
// Where iOS users go if the app isn't installed.
iosRedirect: "https://www.example.com/ios",
// Desktop browser fallback.
desktopRedirect: "https://trackier.com",
// Social meta for rich previews on social platforms (Open Graph).
socialMeta: new Dictionary<string, string>
{
{ "title", "Your Title" },
{ "description", "Your Description" },
{ "imageLink", "https://www.example.com/image.jpg" }
}
);
Console.WriteLine($"Deep Link URL: {url}");
Configuration Parameters
Basic Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
templateId | string | Unilink template ID from the Apptrove panel | Yes |
link | string | Base/fallback URL used in browsers and previews | Yes |
domainUriPrefix | string | Your verified/branded dynamic link domain | Yes |
deepLinkValue | string | App route/value to navigate after resolving | No |
Platform Fallbacks
| Parameter | Description |
|---|---|
androidRedirect | Play Store URL for Android users without app |
iosRedirect | App Store URL for iOS users without app |
desktopRedirect | Fallback URL for desktop browsers |
Attribution Parameters
| Parameter | Description |
|---|---|
channel | Marketing channel |
media_source | Traffic source |
campaign | Campaign name |
p1 - p5 | Custom parameters |
Social Meta
| Parameter | Description |
|---|---|
title | Link preview title |
description | Link preview description |
imageLink | Preview image URL |
Resolve Dynamic Link
To resolve a short link and get original parameters:
var result = await AppTroveSDK.ResolveDeeplinkUrl("https://trackier58.u9ilnk.me/d/NKmWH9E7b1");
foreach (var param in result)
{
Console.WriteLine($"{param.Key}: {param.Value}");
}
Troubleshooting
| Issue | Solution |
|---|---|
| Link creation fails | Verify template ID is correct |
| Empty URL returned | Ensure SDK is initialized |
| Parameters missing | Check parameter names match panel configuration |
For further assistance, contact support at support@trackier.com.