basicsdynamic linkstutorial

What Is a Dynamic Link? Understanding Smart URLs

Codelloy TeamDecember 28, 2025

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 → Open app

User on desktop:

Click link → Website opens → View content
FeatureStatic LinksDynamic Links
DestinationOne fixed URLContext-aware routing
TrackingNo built-in trackingBuilt-in analytics
UpdatesCan't changeUpdate anytime
Device handlingSame for allOptimized per device
App fallbackNoneAutomatic

Use Cases

1. App Marketing

Send users to your app if installed, App Store/Play Store if not. With Codelloy you register your iOS and Android apps once, then attach a deep link for each to the short link; users without the app go to your store listing or a fallback web page you choose. See the Deep Linking Guide.

2. Cross-Platform Campaigns

One link works everywhere — email, social, print.

Single Codelloy 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. Create a link per segment and carry the context in its destination, for example a promo code in the deep-link URL (myapp://promo/SUMMER20).

4. 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.

Codelloy doesn't offer deferred deep linking yet; it's on our roadmap. Today, a Codelloy link sends a user without your app to the fallback configured on the link (a web page or your App Store / Play Store listing), and they open the app normally after installing.

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 → the link service 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 (country, city, region)
  • Referrer sources
  • UTM parameters

With Codelloy Dashboard

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

With Codelloy API

Send a request to the External API. This is the product-link example from our Deep Linking Guide, which also covers registering your apps to get each mobileAppId:

curl -X POST https://api.codelloy.com/link/external/v1/shortenedUrl/save \
  -H "X-API-KEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/product/123",
    "shortCode": "product123",
    "shortLinkName": "Spring sale — product 123",
    "deepLinks": [
      {
        "mobileAppId": "abc123def456",
        "deeplinkUrl": "myapp://product/123",
        "fallbackUrl": "https://example.com/product/123",
        "linkBehaviour": "app",
        "fallbackEnabled": true
      },
      {
        "mobileAppId": "789xyz456ghi",
        "deeplinkUrl": "myapp://product/123",
        "fallbackUrl": "https://example.com/product/123",
        "linkBehaviour": "app",
        "fallbackEnabled": true
      }
    ]
  }'

The response includes a smartLink URL to share.

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