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 Cordova 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., product pages).
  • 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
  • Generated: https://vistmarket.shop/78R2J2
  • Redirects to: https://apptrove.com?utm_redirect=sdk_link or Play Store if app not installed

Configure Trackier Panel

  1. Log in to the Trackier Panel
  2. Go to Unilink Management > Create Template
  3. Setup Template
    • Save and note the template ID (Required for Dynamic Link)

Implementation

dynamic-link.js
function createDynamicLink() {
const dynamicLinkConfig = {
templateId: "78R2J2", // Get this ID from Trackier Panel
link: "https://apptrove.com?utm_redirect=sdk_link",
domainUriPrefix: "vistmarket.shop",
deepLinkValue: "product_detail?product_id=123",

// Attribution parameters
attributionParameters: {
channel: "my_channel",
campaign: "my_campaign",
mediaSource: "at_invite",
p1: "param1_value",
p2: "param2_value",
p3: "param3_value",
p4: "param4_value",
p5: "param5_value"
},

// Platform-specific parameters
androidParameters: {
redirectLink: "https://play.google.com/store/apps/details?id=com.trackier.vistmarket"
},
iosParameters: {
redirectLink: "https://apps.apple.com/app/id123456789"
},
desktopParameters: {
redirectLink: "https://www.example.com/desktop"
},

// Social media preview settings
socialMetaTagParameters: {
title: "New Offer: Buy 1 Get 2 Free",
description: "New deal is live now.",
imageLink: "https://bluetooth_speaker.jpg"
}
};

TrackierCordovaPlugin.createDynamicLink(dynamicLinkConfig)
.then(function(dynamicLinkUrl) {
console.log("Dynamic link created:", dynamicLinkUrl);
})
.catch(function(error) {
console.error("Error creating dynamic link:", error);
});
}

Configuration Parameters

Basic Parameters

ParameterTypeDescriptionRequired
templateIdstringYour dynamic link template ID from Trackier PanelYes
linkstringThe base URL for your dynamic linkYes
domainUriPrefixstringYour domain URI prefixYes
deepLinkValuestringCustom deep link value for in-app navigationNo

Platform Parameters

Android Parameters

androidParameters: {
redirectLink: "https://play.google.com/store/apps/details?id=com.example.app"
}

iOS Parameters

iosParameters: {
redirectLink: "https://apps.apple.com/app/id123456789"
}

Desktop Parameters

desktopParameters: {
redirectLink: "https://yourdomain.com/desktop"
}

Social Media Parameters

socialMetaTagParameters: {
title: "Your App Title",
description: "Description for social media sharing",
imageLink: "https://example.com/image.jpg"
}

SDK Parameters

sdkParameters: {
param1: "value1",
param2: "value2",
param3: "value3"
}

Attribution Parameters

attributionParameters: {
channel: "social", // Marketing channel
campaign: "summer_sale", // Campaign name
mediaSource: "facebook", // Media source
p1: "custom_param1", // Custom parameter 1
p2: "custom_param2", // Custom parameter 2
p3: "custom_param3", // Custom parameter 3
p4: "custom_param4", // Custom parameter 4
p5: "custom_param5" // Custom parameter 5
}

Best Practices

Do's

  • Test thoroughly on both Android and iOS platforms
  • Use meaningful deep link values for better user experience
  • Include social media metadata for better sharing experience
  • Set appropriate redirect links for each platform
  • Use SDK parameters for enhanced analytics
  • Handle errors gracefully with proper error handling

Don'ts

  • Don't forget to configure the template in Trackier Panel first
  • Don't use invalid or malformed URLs
  • Don't skip platform-specific configurations
  • Don't ignore error handling
  • Don't hardcode sensitive information in parameters

Troubleshooting

Common Issues & Solutions

IssueSolution
Dynamic link creation failsVerify template ID is correct and exists in Trackier Panel
Invalid template ID errorCheck that the template is properly configured in Trackier Panel
Platform redirects not workingEnsure redirect links are valid and accessible
Social media preview not showingVerify image links are accessible and properly formatted
Deep link not opening appCheck deep link configuration and app URL scheme setup