Most. Help

Keitaro Macros: The S2S Postback and Sub ID Reference

Published Sep 14, 20266 min readIntermediate
Hand-drawn reference card covered in curly-brace placeholders, an orange arrow mapping each placeholder into a template URL, with a small sub ID drawer of numbered tags
What you'll learn
  • Which identifiers exist and which one carries the click ID
  • How revenue, cost, and profit placeholders differ
  • How status mappings rename statuses per destination
  • The encoding and currency rules that keep substituted URLs intact
Intermediate

Keitaro Macros: The S2S Postback and Sub ID Reference

As a vocabulary, Keitaro macros drive every S2S postback: each URL you configure is a template, and at send time the tracker substitutes placeholders - {external_id}, {conversion_revenue}, {status} - with the actual values of the conversion. Used deliberately, they turn one postback row into a complete, self-describing delivery; used carelessly, they produce empty parameters and unmatched conversions. This reference collects the documented macros in working groups, plus the sub ID fields and the encoding rules that keep everything intact. The full setup procedure lives in the S2S postback setup guide; here it is table-first.

All rows below follow Keitaro's placeholders documentation (S2S postback placeholders).

Identifiers

MacroMeaning
{subid}The subid
{external_id}External ID passed in from the traffic source - the click ID carrier
{tid}Transaction ID
{visitor_code}Unique visitor code

The click ID carrier deserves the emphasis: an empty {external_id} in a sent postback means the source never passed its parameter, and no configuration below the click can repair it.

Money: Revenue, Cost, Profit

MacroMeaning
{revenue}Conversion revenue
{revenue:currency,percent}Revenue in a chosen currency at a percent, e.g. {revenue:USD,70} (converted)
{conversion_revenue}Revenue of the conversion
{conversion_cost}Cost attributed to the conversion
{conversion_profit}Profit of the conversion, cost deducted
{profit}Profit value - revenue minus cost
{cost}Click cost

Monetary macros accept a currency parameter that converts from the tracker's currency: {conversion_revenue:eur} sends the value converted to euros.

Statuses - and Renaming Them per Destination

MacroMeaning
{status}Conversion status
{status:mapping}Status with a mapping, e.g. {status:lead=0 sale=1 rejected=2}; custom mappings like {status: lead=install sale=bill rejected=trash} are supported

The mapping form is how one tracker vocabulary feeds many destinations: your records keep lead and sale, while the destination sees install or bill.

Timestamps

MacroMeaning
{date:format,timezone}Click date - UTC by default, e.g. {_date:Y-m-d H:i:s,Europe/Kyiv}
{conversion_time:format,timezone}Conversion date/time, e.g. {_conversion_time:Y-m-d H:i:s,Europe/Kyiv}

Campaigns, Offers, Sources

MacroMeaning
{campaign_id} (alias keitaro_campaign_id)Campaign ID
{campaign_name} (alias keitaro_campaign_name)Campaign name
{campaign_alias}Campaign alias
{ad_campaign_id}Ad campaign ID
{creative_id}Creative ID
{landing_id}Landing ID
{offer_id}ID of the offer
{offer_name}Name of the offer (works with the Before click selection in multioffers)
{offer_value:NAME}Pulls a parameter from an offer's additional Values settings
{stream_id}Flow ID
{parent_campaign_id}Previous campaign via Send to campaign
{ts_id}ID of the traffic source
{traffic_source_name}Name of the traffic source
{affiliate_network_name}Affiliate network name
{sub_id_1} - {sub_id_30}The thirty sub ID parameters
{source}Site (formerly called source)

The sub ID fields deserve their own note: on the incoming postback side, the same sub_id_1..sub_id_30 are documented as "extra data to update the click record" (postback URL) - which is exactly why they are the natural home for offer labels in offer rotation tracking.

Geo, Device, Network

MacroMeaning
{country} (alias country_code)Country code
{country:lang} (alias country_name)Country name in the given language
{region:lang} (alias region_name)Region name; empty lang returns the region code
{city}City name
{isp}ISP
{ip}IP address
{browser} / {browser_version}Browser name and version
{os} / {os_version}Operating system and version
{device_model}Model of the device
{device_type:lang}Type of the device
{language}ISO 639-1 language code
{user_agent} (aliases ua, useragent)Browser user agent
{connection_type:lang}Connection type
{is_bot}Yields 1 for bots
{is_using_proxy}Flags 1 for proxies

Other Placeholders

MacroMeaning
{keyword:charset}Keyword with encoding, e.g. {keyword:UTF-8}
{search_engine} (alias se)Value of the se parameter
{referrer} (alias referer)Referrer
{destination}Landing URL, offer URL, flow redirect URL, or flow text
{current_domain}Current tracker campaign domain
{random:min,max}Random number within the range
{sample:val1,val2,valN}One value at random
{from_file:file}Loads content from the file var/macros/file

Usage Rules: Encoding and Currencies

Two documented rules prevent most broken postback URLs:

  1. Encoding. Placeholder values are encoded by default; prefix the macro with an underscore for raw output - {_text} style - when the destination needs the unescaped value.
  2. Currency conversion. Monetary macros accept a currency parameter converting from the tracker's currency: {conversion_revenue:eur}.

And the acceptance test stays the same as everywhere in the cluster: one real conversion through the chain, then the S2S log (logs) showing every placeholder resolved to a non-empty value. The failure signatures and their fixes are in the setup guide.

Keitaro Macros: Frequently Asked Questions

Frequently asked questions

Sources

Sources

Macros on autopilot
  • Verify each mapped URL: Pixel Activator fires free test events the moment placeholders change.
  • Templates kept honest: Most delivers every conversion with its full placeholder set resolved.
Was this guide helpful?
Author
Most Team
Справочная служба

Официальные руководства и глоссарий для платформы Most и Активатора пикселей.

Topic
Affiliate Conversion Tracking: The Complete Guide
Main article of the topic
Related articles

Related guides

Affiliate Conversion Tracking: The Complete Guide

The entry point to our affiliate tracking cluster: how a conversion that lands on someone else's offer travels through a postback, a tracker, and a Conversions API call, and where each specific failure has its own deep-dive guide.

16 min

Tracker Migration Without Losing Conversions

Changing trackers is easy; changing them mid-flight is not. Every click already sent to the old tracker expects its postback at the old address, and every platform window keeps running. This guide lays out the migration order that loses nothing: parallel running, postback continuity, cutover sequencing, and the checks that close each stage.

7 min

Voluum S2S Tracking: The Postback Contour From Click to Platform

Voluum's S2S contour is one loop: a token rides the click to the offer, and the affiliate network returns it in a postback whose cid parameter carries the value back home. This guide walks the loop - token propagation, the postback URL, platform integrations - and the verification that proves every conversion completes the circuit.

5 min

RedTrack Conversions API: One Conversion, Several Platforms

One click, several ad platforms that deserve to hear about its conversion. RedTrack's CAPI integrations make that a configuration job rather than a coding one: the clickid token matches conversions through S2S postbacks, and each platform integration maps those conversions into its own events. This guide walks the multi-platform setup with the documented fields, matching rules, and dedup pitfalls.

6 min