The destination URL can carry macros, and the Worker replaces them with the visitor's own signals before redirecting. They work in the Action URL of a redirect rule and in every variant URL of a SmartLink rule, including geo-aware pools. The rule drawer has a row of chips under each URL field — click one to insert it.
{country}
- Two-letter country code — US, DE, BR — or XX when Cloudflare cannot determine it.
{device}
- Either
mobile or desktop. There is no tablet value; an iPad counts as desktop.
{os}
windows, macos, linux, android, ios, or unknown.
{browser}
chrome, firefox, safari, edge, opera, or unknown.
{path}
- The path the visitor requested on your primary domain.
{host}
- The primary domain that received the request.
{clickid}
- Our raw click id, 32 hex characters. It is not the attribution key: a postback that returns it does not match the click. Put it only in a separate field a network asks for — in the parameter your postback source reads, the Worker writes the signed token itself and replaces the macro.
{q.name}
- A parameter of the incoming request, by a name of letters, digits and underscores (a name with a hyphen or a dot is not supported):
{q.clickid} is the value of ?clickid= on the link the visitor came by. URL-encoded, at most 256 characters, empty when the parameter is missing. Its main use is the traffic source’s click id, passed to the network in a second field — see Postbacks → Postback to the Traffic Source.
A macro may appear as often as you need — in the path and again in a tracking parameter — and every occurrence is replaced: https://offer.com/{country}/?geo={country}&d={device} becomes https://offer.com/DE/?geo=DE&d=mobile for a German visitor on a phone.
An unknown macro is left exactly as written. There is no error and no fallback, so a typo like {coutry} travels to your partner literally, inside a URL that looks parameterised. The drawer warns about tokens it does not recognise — do not dismiss that warning.