# Placeholders
# How to use placeholders
Placeholders are helpful when you need to substitute something in the text, HTML code, or URL to a dynamic value.
Example:
<a href="{offer:1}">Get the Offer!</a>
When Keitaro sees {offer:1} it runs a small code that generates an offer URL, then replaces {offer:1} to the URL.
# Placeholder list
| Placeholder | Description | 
|---|---|
| {offer} | Generates offer URL. You can specify offer ID {offer:ID} | 
| {subid} | Subid | 
| {external_id} | External ID that received from the traffic source | 
| {tid} | Transaction ID | 
| {revenue} | Payout value from conversion | 
| {ad_campaign_id} | Ad campaign ID | 
| {browser_version} | Browser version | 
| {browser} | Browser name | 
| {city} | City name | 
| {connection_type:lang} | Connection type | 
| {cost} | Cost of the click | 
| {current_domain} | Current tracker campaign domain | 
| {creative_id} | Creative ID | 
| {date:format} | Date (UTC by default. Use {_date:Y-m-d H:i:s} to transfer as 2022-07-27 10:46:25) | 
| {device_model} | Device model | 
| {device_type:lang} | Device type | 
| {destination} | Destination (Landing URL, Offer URL, flow redirect URL or flow text) | 
| {from_file:file} | Load content from the file %%var/macros/file%% | 
| {ip} | IPv4 address | 
| {is_bot} | Returns 1if it's a bot | 
| {is_using_proxy} | Returns 1if it's proxy | 
| {isp} | ISP | 
| {keyword:charset} | Keyword or query | 
| {landing_id} | Landing ID | 
| {language} | Language code (ISO 639-1) | 
| {offer_id} | Offer ID | 
| {os_version} | Version of the Operating System | 
| {os} | Operating System | 
| {parent_campaign_id} | Previous campaign (on using "Send to campaign") | 
| {profit} | Profit value ( revenue - cost) | 
| {random:min,max} | Random number between 'min' and 'max' | 
| {sample:val1,val2,valN} | Returns randomly selected value | 
| {source} | Site (previously named as source) | 
| {stream_id} | Flow ID | 
| {sub_id_1 - sub_id_30} | Additional sub_id parameters | 
| {traffic_source_name} | Name of the traffic source | 
| {ts_id} | ID of the traffic source | 
| {visitor_code} | Unique visitor code | 
| {campaign_id} | Campaign ID | 
| {campaign_name} | Campaign name | 
| {country} | Country code | 
| {country:lang} | Country in the language specified in lang. The ability to display the country in the specified language depends on the geo base used in the tracker. | 
| {operator:lang} | Mobile operator (outdated) | 
| {referrer} | Referrer | 
| {region:lang} | Region name (leave langempty to get region code) | 
| {search_engine} | Search engine | 
| {user_agent} | Browser's user agent | 
| {conversion_cost} | Cost from conversion | 
| {conversion_revenue} | Revenue from conversion | 
| {conversion_profit} | Profit from conversion | 
| {conversion_time: format} | Use {conversion_time:Y-m-d H:i:s}to transfer as 2022-07-27 10:46:25 | 
| {status} | Conversion status | 
| {offer_name} | Offer name. Works with the offer selection function Before click. See multioffers. | 
| {offer_value:NAME} | Returns the contents of the parameter from the additional settings of the offer — Values. See multioffers. | 
| {affiliate_network_name} | Name of the affiliate network | 
| {campaign_alias} | Campaign's alias | 
TIP
All the aliases of campaign parameters are available as placeholders.
# Creating custom placeholder
Read on page Creating New Placeholder.
# Placeholder FAQ
Why the result contains +, %D0, %B0, etc.?
All the values are URL encoded. To avoid that, add _ before placeholder name.
Example:
{_city}
How to get incoming UTM labels?
For example, that is campaign URL:
https://yourdomain.com/campaign?utm_source=123&utm_term=444
Placeholders with the same names are available to use:
https://landing.com/?utm_source={utm_source}&utm_term={utm_term}
Read more details on Passing Traffic Source Parameters page.
How to put random number or string?
Use {random} placeholder:
{random:10,1000}
Or {sample} ({_sample} without encoding):
{_sample: one, two, three}
