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://ulink.to/product
A link with parameters is dynamic:
https://ulink.to/product?id=12345&ref=sarah&discount=20
The second link tells your app exactly 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://ulink.to/link?param1=value1¶m2=value2
Most flexible option — add as many as you need.
Custom link data
ULink lets you attach structured data to links that gets passed to your app:
{
"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)
Some parameters have special meaning to browsers and platforms. Avoid using action, controller, format, or other reserved words as parameter names — they can cause unexpected behavior.
Accessing parameters in your app
With the ULink 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
While there's no hard limit, 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 complex data, use link metadata (attached to the link in ULink dashboard) rather than cramming everything into the URL.
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 ULink SDK simplifies parameter handling across platforms