Macros
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.
Example
http://landing.com/search?q={keyword} http://landing.com/search?q={_keyword}
In case keyword is “test keyword”, the results are:
http://landing.com/search?q=test+keyword http://landing.com/search?q=test 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 |
|
{ip} | ||
{is_bot} | 1 or empty | |
{is_using_proxy} | 1 or empty | |
{isp} | ISP | |
{keyword:charset} | Keyword (you can specify charset) | |
{landing_id} | ||
{language} | ||
{offer_id} | ||
{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' | |
{revenue} | ||
{sample:var1,var2,varN} | Get random value from list 'var1', 'var2', 'varN' | |
{source} | Source, site | |
{stream_id} | ||
{sub_id_10} | ||
{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} | ||
{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 |
How to use Randomly Multiple Websites with macro {_sample}?
http://{_sample:site1.com,site2.com,site3.com/page1.html,siteN.com}
It will randomly take one of the values site1.com, site2.com, site3.ru/page.html, etc.
How to pass parameters to destination from the traffic source through Keitaro
Add all labels to a campaign URL:
http://tds.com/campaign?utm_source=123&utm_term=444
At the streams the values of these labels can be substituted by the same name macros
http://landing.com/?utm_source={utm_source}&utm_term={utm_term}
How to add a macro
Read on page Create a Macro.