Advanced usage
In this section you can find some advanced things you can do with our Query Parameter API
Variables
Rebrandly provides a set of perticular query parameter values that can be used as variables.
If you place a variable as parameter value this will be replaced with a run-time-computed value when the link is navigated to. Variables can be used both in Presets or while composing the link's destination query string.
The table below indicates or the available variables
Variable | Description |
---|---|
req.client.agent.browser.code | Browser (e.g. firefox ) |
req.client.location.country | Country code (e.g. gb , it ) |
req.client.agent.device.code | Device (e.g. desktop , mobile ) |
req.client.language | Lenguage (e.g. it , en ) |
req.client.agent.os.code | Platform (e.g. macos ) |
req.referral.hostname | Referral: contains the absolute or partial address from which a resource has been requested. (e.g. yoursite.com ) |
req.referral.origin.name | Source (e.g. direct , other ) |
req.timestamp | Timestamp in JSON format (e.g. 2022-11-18T15:12:27Z ) |
These variables values must be enclosed in curly braces when used as parameter value and NOT URL-encoded.
For example, a query parameter like ?country={req.client.location.country}
will replace the country code of the person who clicked navigated the short link.
A variable can also be concatenated to form a value:
?time=clickedAt_{req.timestamp}
Updated 6 months ago