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 → Open app
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. 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
Creating Dynamic Links
With Codelloy Dashboard
- Log in to Codelloy
- Click "Create Link"
- Configure your destinations
- 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
- Always set fallbacks: Handle users without your app
- Use meaningful slugs:
link.site/summer-salevslink.site/a1b2c3 - Track campaigns: Add UTM parameters or campaign tags
- Test on all devices: Verify iOS, Android, and web flows
- 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.