Third-party tracking codes
Attach a verification vendor's or partner's impression tag to a banner or a placement, per country plus a Global fallback, and have the ad server append it to every ad it serves — step by step, with the caveats, a fix-it checklist and the field and API reference.
What it is and why
The Third-Party tracking codes card holds an HTML or JavaScript snippet from someone else — a verification vendor’s impression tag, an agency pixel, a partner network’s beacon — and the ad server appends it to the markup it serves, so the third party counts the same impressions Epom does. You store one snippet per country plus a Global one that covers every country without its own row. The card sits on a banner (the snippet travels with that creative) and on a placement (the snippet goes out with everything the slot serves), and both can land in the same served ad.
Example. An agency buys 500,000 impressions of the Autumn Sale 300×250 creative and
wants its own verification vendor to count them. You paste the vendor’s
<img src="https://verify.example/imp?camp=42&cb=$$RANDOM$$"> tag into the banner’s Global
row. From then on every impression of that creative, on every placement, also fires the
vendor’s pixel with a fresh cache-buster, and the two counts can be reconciled at the end of
the flight.
Note: older material calls this feature “Tracking Pixels”. It is the same card and the same storage — the interface labels it Third-Party tracking codes, on the card header and on the feature rail alike.
Typical scenarios
| You want | Set | Where |
|---|---|---|
| A verification vendor to count every impression of one creative, worldwide | One Global row with the vendor’s tag | the banner |
| Different agency pixels for German and British traffic, and a plain pixel for the rest | A Germany row, a United Kingdom row and a Global row | the banner |
| A partner to see every ad a slot serves, whoever the advertiser is | One Global row | the placement |
| A beacon on every request to a slot, filled or not — for example to audit a publisher’s reported traffic | A Global row, plus Fire when no ad is served switched on | the placement |
| The vendor tag on an HTML Code creative | One Global row on the banner — and not the same tag pasted inside the creative’s HTML as well, or it fires twice | the banner |
The country is the ad request’s geo-resolved country, matched exactly and then falling back to Global; there is no region or continent matching.
Step by step
The path below is a banner. On a placement the card, the dialog and the grid are identical — only the entity and the endpoints differ.
-
Open the entity that should carry the snippet and scroll to Third-Party tracking codes:
- Account → Advertisers → advertiser → campaign → banner — the snippet travels with this creative wherever it serves.
- Account → Publishers → site → zone → placement — applies to everything this placement serves. The card exists only on placement types that get an invocation code (an ad tag) — Site, Mobile site and Non-standard site; native, video and the other placement types have no tag to carry the snippet, so they have no card.
The entity must already be saved: the create form renders only Basic information, and the feature cards appear after the first save.
-
Switch the card on. The switch flips at once and rolls back if the server refuses. Turning it on creates an empty holder — the grid stays empty until you add a row.
-
Click Add. A dialog opens with two fields: Country, a searchable select pre-set to Global, and Tracking code, a code editor. Save stays disabled while the editor is empty.

-
Paste the snippet — the whole
<img>,<script>or<iframe>tag, not a bare URL — and click Save. A Done toast confirms it and the grid reloads. The row shows the snippet read-only and syntax-highlighted, and the resolved country name; the Global row reads Global. -
Add a row per country you need. Global is the fallback for every country that has no row of its own.

-
To change a row, select it and click Edit, or double-click it. The same dialog opens with the row’s country and code; the grid column itself is read-only.
-
To remove rows, tick them and click Delete — the button counts your selection, for example Delete (2) — then confirm Delete 2 record(s)?. Selection is multiple, so the Global row and country rows can go in one call.
-
On a placement only: to send the snippet on unfilled requests as well, switch on Fire when no ad is served under the grid. Left off, the snippet goes out only on a response that was filled with a creative.

Caveats and exceptions
Who can do this. Network managers, advertisers and publishers who can edit the entity. The banner card and the placement card are separate permissions — Banner Third-Party Tracking Code and Placement Third-Party Tracking Code — set separately per role, so having one and not the other is normal; your network administrator changes either in Admin → Users & access → User roles & permissions. A read-only grant behaves like none at all: the card does not render and the list endpoint answers empty. A Can view share shows the card with a read-only pill and the snippets, with no Add, Edit or Delete. Exact grants: User roles.
Where the snippet actually fires. The banner snippet is appended after the creative inside the markup pipeline; the placement snippet at the end of the assembled ad response. What is serving decides whether they fire at all:
| What is serving | Banner snippet | Placement snippet |
|---|---|---|
| Local File / External File creative | Appended after the creative | Appended at the end of the response |
| Template creative | Appended after the creative | Appended at the end of the response |
| HTML Code creative | Appended after the creative’s code | Appended at the end of the response |
| OpenRTB (DSP) creative | Appended to the winning bid’s markup | Appended at the end of the response |
| Native creative | Not appended | Not appended |
| Video creative / VAST or VMAP response | Not appended | Not appended |
| No ad matched (empty response) | Not appended | Only when Fire when no ad is served is on for that placement |
A video banner has no banner snippet: use the VAST event tracking pixels of the VAST
tracking card instead. The placement’s codes apply whatever the banner type. The SDK
content endpoints return the same assembled markup — a live /ads-api-v4 response carries the
placement snippet inline, macros already expanded — so they follow the rows above. The older
multi-bid mobile API (/ads-api-v2) is the exception: for image and template creatives it
returns structured fields rather than markup, and the banner snippet is reduced to a single
beacon URL — the first href/src of a leading <a>, <img> or <script> tag. A snippet
that is more than one tag, or whose first attribute is not src/href, yields an empty beacon
and nothing fires. An HTML Code creative is returned as markup there, and its banner snippet
rides inside that markup.
Macros resolve, so use them for the cache-buster. Snippets go through the publisher macro
set before they are served: $$RANDOM$$, $$TIMESTAMP$$, $$BANNER_ID$$,
$$TRANSACTION_ID_STR$$ and the rest resolve exactly as in creative markup, on a no-fill too.
A bare rnd= you invent is not filled in by anything. See the
Macros reference.
Fire when no ad is served — and what counts as “no ad”. A passback does not count as a filled response: a placement that answers with its default code is still an unfilled request for this setting. Until release 154 this was not a setting at all — the snippet reached an unfilled response only when the placement happened to have a default code. Placements that fired that way keep firing (the upgrade switched this on for them); every other placement keeps its behaviour until someone switches it on.
Global covers an unmatched country, not a missing one. If the request reaches the lookup with no country value at all, nothing is emitted — not a country row, not the Global row.
The switch deletes, it does not pause. Switching the card off removes the whole record and every country row with it, after a confirmation. Switching back on starts with an empty grid, so copy the snippets somewhere first if you only want a pause; to stop one country, delete that row instead. Deleting the Global row alone clears only the fallback: the country rows keep firing for their own countries, and other countries now get nothing.
One row per country. Add with a country that already has a row overwrites that row — same Done toast, no second row.
Stored and served exactly as typed. There is no URL check and no HTML sanitising: a
<script> reaches the page untouched, and a typo in the vendor’s tag breaks silently in the
browser. Treat the field as arbitrary code execution on your publishers’ pages and only paste
snippets from a party you trust. A snippet holds at most 100,000 characters; a longer one
is refused with Must be at most 100000 characters.
On a banner, any change resets moderation. Adding, editing or deleting a banner snippet sends an Approved or Rejected creative back to Pending on a network that runs banner moderation, and under moderation-with-deactivation the creative is also switched off until it is approved again. Placement snippets have no such effect.
A missing creative file blocks the card. If a banner’s uploaded file — a local image or video, a native asset, a template file — has gone from storage, the server refuses to touch the banner. Add fails with a bare Can’t save toast, and Delete of the Global row reports success while silently leaving the snippet in place (country rows do get deleted). Re-upload the creative, then try again.
Always redirect returns nothing to append to. On a placement with Always redirect on, the response is a bare URL, so the placement snippet is not served. Use a server-side tracker there.
This is not conversion tracking. These snippets fire with the ad. To notify a partner when a conversion is attributed, use a piggyback; for a fire that does not depend on the browser at all, a server-side tracker. To count a partner’s own ad code, see Track impressions of a partner’s ad code.
Not working?
| Symptom | Check | Where |
|---|---|---|
| The vendor’s URL shows as visible text next to the ad | You pasted a bare URL. The field takes markup — the whole <img> or <script> tag | the row’s code in the card |
| The pixel fires once, the vendor counts two per impression | The same tag is in the creative’s HTML and in the card | the HTML Code creative’s Code and the card |
| Nothing fires on a video creative | Banner snippets are not appended to video / VAST / VMAP; placement snippets are not either | use the VAST tracking card’s event pixels |
| Nothing fires on a native creative | Native responses carry neither snippet | — |
| Nothing fires on unfilled requests | Fire when no ad is served is off; a passback is not a filled response | the switch under the placement grid |
| Nothing fires for some visitors | Their country has no row and there is no Global row; or the request carried no country at all (nothing fires, Global included) | the grid’s Country column |
| A country row never fires | Matching is exact by the request’s country, never by the site’s or placement’s; US fires for US traffic only | the row’s country |
| The card is missing on a placement | It exists only on placement types that get an invocation code — Site, Mobile site and Non-standard site; native, video and the other types have no tag to carry it. Or the role lacks Placement Third-Party Tracking Code, or holds it read-only | the placement type; Admin → Users & access |
| The card is missing on a banner | The banner is not saved yet, or the role lacks Banner Third-Party Tracking Code | save first; Admin → Users & access |
| Add says Can’t save with no reason | The banner’s uploaded file is missing from storage | re-upload the creative |
| The placement snippet never reaches a redirect slot | Always redirect returns a bare URL | the placement’s Ad Tags & API settings; use a server-side tracker |
| The vendor’s cache-buster is always the same value | A rnd= you invented is not filled in | put $$RANDOM$$ or $$TIMESTAMP$$ in the vendor’s slot |
| A tag fires in the SDK’s v2 API but the vendor sees a malformed hit | /ads-api-v2 reduces the snippet to its first src/href | make the snippet a single tag with src/href first |
| The creative went back to Pending after you edited a pixel | Expected: any banner snippet change resets moderation | re-approve the creative |
Reference
Fields
| Field | What it does | Notes |
|---|---|---|
| Country | Which country’s traffic gets this snippet | Global (stored as *) is the fallback. One row per country — re-adding a country overwrites its row |
| Tracking code | The HTML/JS snippet | Required; at most 100,000 characters. Stored verbatim (the column itself holds far more); macros are expanded at serve time |
| Fire when no ad is served (placement only) | Sends the placement snippet on unfilled responses too | Off by default; a passback is not a filled response |
Grid columns: Tracking code (read-only editor) and Country (sortable). The toolbar is Add, Edit, Delete and Refresh; it is absent entirely when you cannot edit the entity.
Over the API
The endpoints live under /rest-api/tracking-code/** and are filed under the Banners tag —
the placement endpoints too. See REST API — Banners,
which also has the batch add and batch global-clear calls that have no UI equivalent.
- The REST
disable-tracking-codeoperations delete every row, as the switch does;enable-tracking-codeon a banner or placement whose card is already on changes nothing and keeps its codes. An unknown or deleted banner or placement is a404; a role without the banner or placement permission gets a403naming it — never a bare success. A banner create or update without the permission leavesthirdTrackingCode[…]unapplied, listed inignoredFields. …/edit.dochanges the row’s code and its country: sending another two-lettercountrymoves the row there (400if the entity already has a code for that country). The Global row is edited withcountry=*andid=0. Both…/add.do(single and batch) and…/edit.dotake*or a country from the country list —ZZis a400namingcountry, and onadd.dogbis stored asUK.- The same setting sent with a banner —
thirdTrackingCode[<key>]onbanner/create.doorupdate.do— takes the key in any case (us→US,gb→UK) and is checked less: two letters suffice, and a key that is not*or two letters is listed inignoredFieldswhile the rest of the banner is saved. - The no-fill switch is
GET/POST /rest-api/tracking-code/placement/fire-without-ad.do(id, andenabledon thePOST) — see Linking, status, tracking codes and ad tags via API.