Smart Link Personalization
Route different visitors to different destinations from the same short link, based on location, device, traffic source, or behavioral segment.
Tip
Personalization runs at the edge with zero latency impact — visitors are routed before the page loads.
Key concepts
| Concept | What it means |
|---|---|
| Personalization rule | A named set of conditions and a variant destination. When conditions match, the visitor goes to the variant instead of the default |
| Routing rule | Link-level rules set directly on a link (see Advanced Link Controls). Personalization rules operate at the handle level |
| Condition | What the platform checks: country, device, source, campaign, or segment |
| Variant | The alternative destination URL served when conditions match |
| Route preview | A dry-run endpoint that shows which destination would be chosen for a given set of conditions |
| Segment | A visitor classification (e.g., returning, vip, engaged_prospect) derived from signals or assigned manually |
How personalization works
The platform evaluates rules in this order:
Link-level routing rules
Rules set via
routingRuleson the link are checked first, in priority order.Handle-level personalization rules
Checked next if no link-level rule matched.
Default destination
The link's base
destinationUrlis used if no rules match.
Note
Link-level rules always take precedence over handle-level personalization rules.
Available conditions
| Condition | Type | Example | What it checks |
|---|---|---|---|
countryIn | String[] | ["US", "GB", "CA"] | Visitor's country (from IP geolocation) |
deviceIn | String[] | ["MOBILE", "TABLET"] | Visitor's device type |
sourceIn | String[] | ["email", "social"] | Traffic source / referrer category |
campaignIn | String[] | ["spring-launch"] | Active campaign context |
segmentIn | String[] | ["vip", "returning"] | Visitor segment membership |
Note
Conditions within a rule are AND-ed. If you set both countryIn: ["US"] and deviceIn: ["MOBILE"], the visitor must be in the US and on a mobile device for the rule to match.
Create personalization rules
Open personalization
Go to
https://app.{PUBLIC_DOMAIN}, navigate to your handle, and open Personalization (or Campaigns).Create a rule
Click Create Rule and give it a name (e.g.,
us-mobile-variant).Set conditions
Choose the conditions: country, device, source, campaign, or segment.
Set the variant
Enter the variant destination URL.
Save and preview
Save and enable the rule. Use Route Preview to verify the rule fires correctly with sample inputs.
Monitor
Check Analytics with
groupBy=segmentto see how each segment performs.
Create or update a personalization rule
Request
curl -sS -X PUT "https://api.10x.in/v2/handles/{handle}/personalization-rules/{ruleId}" \
-H "Authorization: Bearer <access-token>" \
-H "Content-Type: application/json" \
-d '{"enabled": true, "when": {"countryIn": ["US"], "deviceIn": ["MOBILE"]}, "variant": {"destinationUrl": "https://example.com/us-mobile"}}'Body
{
"enabled": true,
"when": {
"countryIn": ["US"],
"deviceIn": ["MOBILE"]
},
"variant": {
"destinationUrl": "https://example.com/us-mobile"
}
}Returns 200 with the full rule object.
Preview a routing decision
Test which destination would be chosen for a visitor with specific attributes:
Request
curl -sS -X POST "https://api.10x.in/v2/handles/{handle}/links/{slug}/route-preview" \
-H "Authorization: Bearer <access-token>" \
-H "Content-Type: application/json" \
-d '{"country": "US", "device": "MOBILE", "source": "email", "campaign": "spring-launch"}'Body
{
"country": "US",
"device": "MOBILE",
"source": "email",
"campaign": "spring-launch"
}Returns the matched rule, the destination URL that would be used, and the evaluation path.
View segment analytics
curl -sS "https://api.10x.in/v2/handles/{handle}/analytics?groupBy=segment" \
-H "Authorization: Bearer <access-token>"
Returns click and conversion metrics broken down by visitor segment.
Filter by campaign
curl -sS "https://api.10x.in/v2/handles/{handle}/analytics?groupBy=segment&campaignId=spring-launch" \
-H "Authorization: Bearer <access-token>"Required auth
| Auth mode | Use case |
|---|---|
CREATOR-level JWT or above | Create and manage personalization rules |
PAT with personalization.* scope | Automation |
| None (visitor-side) | Edge personalization uses cookies and IP-based geolocation |
Example: geo-targeting workflow
Goal: Route US visitors to a US landing page and everyone else to a global page.
Create the link
Create a link with the global page as the default destination:
Request
curl -sS -X PUT "https://api.10x.in/v2/handles/{handle}/links/product" \ -H "Authorization: Bearer <access-token>" \ -H "Content-Type: application/json" \ -d '{"destinationUrl": "https://example.com/global", "title": "Product Page"}'Body
{ "destinationUrl": "https://example.com/global", "title": "Product Page" }Add the US variant
Create a personalization rule for US visitors:
Request
curl -sS -X PUT "https://api.10x.in/v2/handles/{handle}/personalization-rules/us-variant" \ -H "Authorization: Bearer <access-token>" \ -H "Content-Type: application/json" \ -d '{"enabled": true, "when": {"countryIn": ["US"]}, "variant": {"destinationUrl": "https://example.com/us"}}'Body
{ "enabled": true, "when": { "countryIn": ["US"] }, "variant": { "destinationUrl": "https://example.com/us" } }Verify with route preview
Test with a US visitor — expected destination:
https://example.com/us.Test with a non-US visitor (
"country": "DE") — expected destination:https://example.com/global(default).
Common errors
| Code | Error | Cause |
|---|---|---|
| 400 | invalid_rule_conditions | Condition uses an unsupported field or empty array |
| 400 | invalid_destination_url | Variant destination is not a valid HTTP(S) URL |
| 404 | not_found | Rule or link does not exist |
| 403 | insufficient_role | Caller does not have CREATOR or higher role |
Personalization layers at a glance
| Layer | Where to configure | Scope | Guide |
|---|---|---|---|
| Link routing rules | routingRules on each link | Per-link | Advanced Link Controls |
| Handle personalization rules | personalization-rules/{ruleId} | Per-handle | This guide |
| Campaign targeting | Campaign with segment conditions | Per-campaign | Campaign Funnel Workflow |
| Chain signal rules | Signal-driven rules with behavioral triggers | Cross-session | Chain Signals and Prefetch |
| Vector embeddings | Content-aware auto-reranking | Per-handle, automatic | Vector Embedding Targeting |