Link Parameters
Parameters let you pass dynamic data through your links — user IDs, campaign codes, product references, and more. This data travels with the user all the way into your app.
What you'll learn
- How to pass data through link parameters
- The difference between query parameters and path variables
- Common parameter patterns for deep linking
Why parameters matter
A link without parameters is static:
https://your-subdomain.shared.ly/product
A link with parameters is dynamic:
https://your-subdomain.shared.ly/product?id=12345&ref=sarah&discount=20
If the link has query passthrough turned on (the Pass URL parameters to your app toggle on dynamic links in the dashboard, or allowQueryPassthrough through the API; off by default), these values are sent to your app, telling it which product to show, who referred the user, and what discount to apply.
Parameters transform links from simple shortcuts into data carriers. Every piece of context you need in your app can travel through the link.
Types of parameters
Query parameters
Added after ? in the URL, separated by &:
https://your-subdomain.shared.ly/link?param1=value1¶m2=value2
Most flexible option, within the limits below (25 keys, 4 KB in total).
Custom Parameters
In the dashboard, you can add key/value pairs under Custom Parameters on a dynamic link (the API accepts parameters on either link type). Values are text:
productId = 12345
referrer = sarah
discount = 20
campaign = summer-launch
This data is available in your app via the SDK, regardless of how the URL looks.
Common parameter patterns
Attribution & Analytics
?utm_source=email&utm_medium=newsletter&utm_campaign=spring2024
Track where users come from for marketing attribution.
Referral Programs
?ref=USER123&bonus=signup
Credit the referrer and apply signup bonuses automatically.
Product Deep Links
?product=SKU-789&variant=blue&size=large
Open directly to a specific product configuration.
User Personalization
?invite_code=ABC123&team_id=456
Join a specific team or apply an invitation automatically.
application(_:continue:) or through our SDK's link handler.Parameter best practices
Keep names short but clear
✓ ref=sarah
✗ referral_user_account_identifier=sarah
URL-encode special characters
✓ title=Hello%20World
✗ title=Hello World
Use consistent naming
Pick a convention and stick with it:
✓ productId, userId, campaignId (camelCase)
✓ product_id, user_id, campaign_id (snake_case)
✗ productId, user_id, CampaignID (mixed)
Ulinkly drops a few reserved names it uses itself: d, debug, ulhop, _qr, _lc, _dbg, and _nodl (plus __proto__, constructor and prototype). Don't use them as your own parameter names.
Accessing parameters in your app
With the Ulinkly SDK, you receive parsed link data when your app opens from a link:
// Conceptual example - see SDK docs for exact API
function handleDeepLink(linkData) {
const productId = linkData.parameters.productId;
const referrer = linkData.parameters.referrer;
// Navigate to the right screen with this data
navigateToProduct(productId, { referrer });
}
The SDK handles:
- URL parsing across platforms
- Deferred link parameter recovery
- Passing structured data to your app
Parameter limits
Parameters passed through to your app are limited to 25 keys, 1,024 characters per value, and 4 KB in total. Keys may use letters, numbers, - and _, up to 64 characters. Keys that break these rules are dropped without an error. Also keep in mind:
- URL length: Some browsers truncate URLs over 2000 characters
- Readability: Very long URLs are hard to debug
- Security: Don't pass sensitive data in URLs (use tokens instead)
For data that doesn't belong in the URL, add it under Custom Parameters on a dynamic link.
Quick recap
- Parameters pass dynamic data through links to your app
- Query parameters are flexible and widely supported
- Use consistent naming and URL-encode special characters
- The Ulinkly SDK simplifies parameter handling across platforms