Skip to main content

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/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

Configure Apptrove Panel

  1. Log in to the Apptrove Panel
  2. Go to Unilink Management > Create Template
  3. 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

ParameterTypeDescriptionRequired
templateIdstringUnilink template ID from the Apptrove panelYes
linkstringBase/fallback URL used in browsers and previewsYes
domainUriPrefixstringYour verified/branded dynamic link domainYes
deepLinkValuestringApp route/value to navigate after resolvingNo

Platform Fallbacks

ParameterDescription
androidRedirectPlay Store URL for Android users without app
iosRedirectApp Store URL for iOS users without app
desktopRedirectFallback URL for desktop browsers

Attribution Parameters

ParameterDescription
channelMarketing channel
media_sourceTraffic source
campaignCampaign name
p1 - p5Custom parameters

Social Meta

ParameterDescription
titleLink preview title
descriptionLink preview description
imageLinkPreview image URL

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

IssueSolution
Link creation failsVerify template ID is correct
Empty URL returnedEnsure SDK is initialized
Parameters missingCheck parameter names match panel configuration

For further assistance, contact support at support@trackier.com.