# Placeholders

# How to use placeholders

Placeholder are helpful when you need to substitute something in the text, HTML code, or URL to a dynamic value.


<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 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 1 if it's a bot
{is_using_proxy} Returns 1 if 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:lang} Country name (leave lang empty to get country code)
{operator:lang} Mobile operator (outdated)
{referrer} Referrer
{region:lang} Region name (leave lang empty 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
{original_status} Original status received in postback
{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.
{previous_status} Previous conversion status
{affiliate_network_name} Name of the affiliate network
{campaign_alias} Campaign's alias


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.


How to get incoming UTM labels?

For example, that is campaign URL:


Placeholders with the same names are available to use:


Read more details on Passing Traffic Source Parameters page.

How to put random number or string?

Use {random} placeholder:


Or {sample} ({_sample} without encoding):

{_sample: one, two, three}