Macros can add dynamic content to URL or texts. There you can use macros:

  • In the field “URL” when stream is switched to scheme “Redirect”
  • In the field “Text” when stream is switched to scheme “Action”
  • In the field “URL” in landing settings
  • In the field “URL” in offer settings
  • In the field “Postback URL” in traffic source settings
  • In the field “URL” in S2S Postbacks (Campaign settings)

How to use macros

A macro looks like {macro_name}, or {_macro_name} to paste raw value.


In case keyword is “test keyword”, the results are: keyword

Some macro has params. Example,

{sample: var1, var2, var3}

You can paste any parameter. Example,

{utm_label1}, {utm_label2}

Macro list

Macro Aliases Description
{ad_campaign_id} Value of parameter 'ad_campaign_id'
{browser_version} Browser version
{browser} Browser name
{city:lang} City
{connection_type:lang} Connection type
{cost} Click cost
{creative_id} Value of parameter 'creative_id'
{date:format} Date in UTC
{device_model} Device model
{device_type:lang} Device type
{destination} Destination (Landing URL, Offer URL, stream redirect URL or stream text)
{external_id} Value of parameter 'external_id'
{from_file:file} Load content from file var/macros/file
{is_bot} 1 or empty
{is_using_proxy} 1 or empty
{isp} ISP
{keyword:charset} Keyword (you can specify charset)
{os_version} OS Version
{os} Operation System
{parent_campaign_id} in case is used action “Send to campaign”)
{profit} Profit (revenue - cost)
{random:min,max} Random number between 'min' and 'max'
{sample:var1,var2,varN} Get random value from list 'var1', 'var2', 'varN'
{source} Source, site
{subid} SubID (unique click code)
{traffic_source_name} Traffic source name
{ts_id} Traffic Source ID
{visitor_id} Internal visitor identificator
{campaign_id} keitaro_campaign_id Campaign ID in Keitaro
{campaign_name} keitaro_campaign_name Campaign name in Keitaro
{country:lang} country_code,country_name Country code or name
{operator:lang} carrier Mobile operator
{referrer} referer Referrer
{region:lang} region_name Region code or name
{search_engine} se Value of parameter 'se'
{user_agent} ua,useragent
{offer} Generates protected offer link. You can specify offer id {offer:ID}

How to use Randomly Multiple Websites with macro {_sample}?


It will randomly take one of the values,,, etc.

How to pass parameters to destination from the traffic source through Keitaro

Add all labels to a campaign URL:

At the streams the values of these labels can be substituted by the same name macros{utm_source}&utm_term={utm_term}

How to add a macro

Read on page Custom Macro Script.