# Placeholders

# How to use placeholders

Placeholder 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>
1

When Keitaro sees {offer:1} it run 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 traffic source
{tid} Transaction ID
{revenue}
{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)
{device_model} Device model
{device_type:lang} Device type
{destination} Destination (Landing URL, Offer URL, flow redirect URL or stream 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 a 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 (when 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}
{sub_id_1}
{sub_id_2}
{sub_id_3}
{sub_id_4}
{sub_id_5}
{sub_id_6}
{sub_id_7}
{sub_id_8}
{sub_id_9}
{sub_id_10}
{sub_id_11}
{sub_id_12}
{sub_id_13}
{sub_id_14}
{sub_id_15}
{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
{original_status} Original status received in postback
{status} Conversion status

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:en}
1
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}
1

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

{_sample: one, two, three}
1