Clickid and Macros: Full Reference
Clickid and macros are the parameters a tracker substitutes into a link in place of static text, turning the same creative's click into a unique URL for every single visitor. Without them, a postback can't say which click actually led to a deposit, and reporting by geo, sub-source, or click cost never comes together at all. Here's a reference for the most common macros and how to carry them through a PWA witrina without losing them along the way.
What a macro is and how it works
A macro is a placeholder like {clickid} or {sub_id} inside a link template, which the tracker or traffic source swaps for a real value at the moment of the click. From the ad link, that parameter carries into the PWA's address as part of the query string, and from there it needs to survive all the way to the conversion event — otherwise the postback arrives empty and never links back to the original click.
{clickid} — the one macro you can't skip
{clickid} is a unique identifier a tracker like Keitaro assigns on each click, later used to match a conversion postback back to that exact click. Without it, the tracker has no way of knowing which conversion belongs to which click, and optimization by creative, placement, or geo becomes impossible. It's the one macro on this list the whole setup can't function without.
{sub_id}, {geo}, {cost}, and other common parameters
{sub_id} usually carries an extra tag — a specific creative, placement, or ad set — letting you slice reporting finer than just "campaign". {geo} passes the click's country, useful whenever one campaign runs across several markets at once and conversions need splitting by market. {cost} carries the click's actual cost at the moment it happened, which is what micro-bidding and near-real-time ROI math run on, without waiting for a summary report from the ad account.
Carrying macros through a PWA
Macros get substituted by the traffic source at the campaign level, right when the link to the PWA is generated — in APEX, that link comes from the project settings and already carries the right parameters as a query string. The witrina needs to read those parameters on load and store them, alongside the push subscription or locally in the browser, so the same values can ride along with any event or postback fired later in that session.
Common mistakes with macros
The first mistake is a traffic source that doesn't support a given macro, so the link ends up carrying the literal string "{clickid}" instead of a real value — worth catching with a test click before launch, not after. The second is a redirect or link rewrite somewhere in the chain dropping the entire query string, cutting off every parameter before it reaches the witrina. The third is macro names not matching letter-for-letter between the tracker and the traffic source, so the substitution simply never fires.
FAQ
- What happens if the traffic source doesn't support a macro I need?
- It passes through as plain text — literally the string "{clickid}" — instead of a real value, so it's worth checking a source's supported macro list before launch, not after.
- Do I have to pass every macro at once?
- No, but {clickid} is non-negotiable — without it, conversions can't be matched to clicks; {sub_id}, {geo}, and {cost} add reporting depth but aren't required for tracking to function at all.
- Where do I find the macro list for a specific traffic source?
- In that source's own documentation (Facebook, TikTok, Google Ads) and in the campaign settings inside your tracker — supported macros differ from one source to another.
- How does APEX handle these parameters on the witrina side?
- APEX reads the parameters from the link when the PWA opens and stores them with the user's session, so they attach to events automatically and reach the postback without manual work.
Cloaking, anti-bot, push, split tests and your own domains — in one service.
Get started free