basicsdynamic linkstutorial

What Is a Dynamic Link? Understanding Smart URLs

LinkShark TeamDecember 28, 2025

What Is a Dynamic Link? Understanding Smart URLs

Dynamic links are smart URLs that adapt based on context. Here's everything you need to know.

Definition

A dynamic link is a URL that can change its behavior based on:

  • User's device (iOS, Android, desktop)
  • Whether an app is installed
  • User location or preferences
  • Time or campaign parameters

How They Work

1. User clicks a dynamic link
2. Link service detects device and context
3. User is routed to the optimal destination
4. Analytics are captured automatically

Example Flow

User on iPhone with app installed:

Click link → App opens → Navigate to content

User on iPhone without app:

Click link → App Store → Install → App opens → Navigate to content

User on desktop:

Click link → Website opens → View content

Static vs Dynamic Links

| Feature | Static Links | Dynamic Links | | --------------- | -------------------- | --------------------- | | Destination | One fixed URL | Context-aware routing | | Tracking | No built-in tracking | Built-in analytics | | Updates | Can't change | Update anytime | | Device handling | Same for all | Optimized per device | | App fallback | None | Automatic |

Use Cases

1. App Marketing

Send users to your app if installed, App Store/Play Store if not.

const appLink = await linkshark.createLink({
  ios: {
    appStoreId: "123456789",
    deepLink: "myapp://home",
  },
  android: {
    packageName: "com.myapp",
    deepLink: "myapp://home",
  },
});

2. Cross-Platform Campaigns

One link works everywhere — email, social, print.

Single LinkShark URL →
  - iOS users → iOS app or App Store
  - Android users → Android app or Play Store
  - Desktop users → Website
  - Other → Mobile website

3. Personalization

Customize destinations based on user segments.

const personalizedLink = await linkshark.createLink({
  data: {
    userId: "user_123",
    promoCode: "SUMMER20",
  },
  // User-specific data passed to app
});

4. A/B Testing

Route users to different experiences without changing the link.

// 50/50 split test
const testLink = await linkshark.createLink({
  variants: [
    { url: "https://mysite.com/landing-a", weight: 50 },
    { url: "https://mysite.com/landing-b", weight: 50 },
  ],
});

5. QR Code Campaigns

Create dynamic QR codes that can be updated after printing.

Printed QR code → Dynamic link →
  Original: Spring sale page
  Updated: Summer sale page (no reprint needed!)

Deferred Deep Linking

One of the most powerful features: passing context through app install.

The Magic

1. User clicks link with data: { productId: '123' }
2. User doesn't have app → Goes to App Store
3. User installs app
4. User opens app → LinkShark passes { productId: '123' }
5. App navigates to product #123

Why It Matters

Without deferred deep linking, users lose context when they install an app. With it, you can:

  • Take new users to the exact content they wanted
  • Credit referrers even after app install
  • Pass promo codes through the install flow
  • Create seamless onboarding experiences

Analytics

Dynamic links capture rich analytics:

  • Click counts
  • Unique clicks
  • Device breakdown
  • Geographic data
  • Time trends
  • Conversion events

Creating Dynamic Links

With LinkShark Dashboard

  1. Log in to LinkShark
  2. Click "Create Link"
  3. Configure your destinations
  4. Copy your link

With LinkShark API

import LinkShark from "@linkshark/sdk";

const link = await linkshark.createLink({
  title: "Summer Sale",
  description: "Save 30% on all items",
  ios: {
    deepLink: "myapp://sale/summer",
    fallbackUrl: "https://myapp.com/sale",
  },
  android: {
    deepLink: "myapp://sale/summer",
    fallbackUrl: "https://myapp.com/sale",
  },
  web: "https://myapp.com/sale",
  analytics: {
    campaign: "summer_sale_2026",
    channel: "email",
  },
});

console.log(link.shortUrl); // https://link.myapp.com/abc123

Best Practices

  1. Always set fallbacks: Handle users without your app
  2. Use meaningful slugs: link.site/summer-sale vs link.site/a1b2c3
  3. Track campaigns: Add UTM parameters or campaign tags
  4. Test on all devices: Verify iOS, Android, and web flows
  5. Monitor analytics: Watch for issues and opportunities

Conclusion

Dynamic links are essential for modern mobile marketing. They bridge the gap between web and app, creating seamless user experiences.

Create your first dynamic link

Ready to get started?

Create smart links and QR codes that drive results.

Start Free Trial