Browse the help center

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.

How-to network manager Account → Advertisers → advertiser → campaign → banner → Third-Party tracking codes

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 wantSetWhere
A verification vendor to count every impression of one creative, worldwideOne Global row with the vendor’s tagthe banner
Different agency pixels for German and British traffic, and a plain pixel for the restA Germany row, a United Kingdom row and a Global rowthe banner
A partner to see every ad a slot serves, whoever the advertiser isOne Global rowthe placement
A beacon on every request to a slot, filled or not — for example to audit a publisher’s reported trafficA Global row, plus Fire when no ad is served switched onthe placement
The vendor tag on an HTML Code creativeOne Global row on the banner — and not the same tag pasted inside the creative’s HTML as well, or it fires twicethe 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.

  1. 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.

  2. 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.

  3. 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.

    Add tracking code dialog with Country set to Global and a verification pixel in the code editor

  4. 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.

  5. Add a row per country you need. Global is the fallback for every country that has no row of its own.

    Third-Party tracking codes card on a banner, showing the Global row, the Germany row and the top of the United Kingdom row at the foot of the scrolling grid

  6. 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.

  7. 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.

  8. 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.

    Third-Party tracking codes card on a placement, with a Global and a France row and Fire when no ad is served switched on, its note open

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 servingBanner snippetPlacement snippet
Local File / External File creativeAppended after the creativeAppended at the end of the response
Template creativeAppended after the creativeAppended at the end of the response
HTML Code creativeAppended after the creative’s codeAppended at the end of the response
OpenRTB (DSP) creativeAppended to the winning bid’s markupAppended at the end of the response
Native creativeNot appendedNot appended
Video creative / VAST or VMAP responseNot appendedNot appended
No ad matched (empty response)Not appendedOnly 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?

SymptomCheckWhere
The vendor’s URL shows as visible text next to the adYou pasted a bare URL. The field takes markup — the whole <img> or <script> tagthe row’s code in the card
The pixel fires once, the vendor counts two per impressionThe same tag is in the creative’s HTML and in the cardthe HTML Code creative’s Code and the card
Nothing fires on a video creativeBanner snippets are not appended to video / VAST / VMAP; placement snippets are not eitheruse the VAST tracking card’s event pixels
Nothing fires on a native creativeNative responses carry neither snippet—
Nothing fires on unfilled requestsFire when no ad is served is off; a passback is not a filled responsethe switch under the placement grid
Nothing fires for some visitorsTheir 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 firesMatching is exact by the request’s country, never by the site’s or placement’s; US fires for US traffic onlythe row’s country
The card is missing on a placementIt 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-onlythe placement type; Admin → Users & access
The card is missing on a bannerThe banner is not saved yet, or the role lacks Banner Third-Party Tracking Codesave first; Admin → Users & access
Add says Can’t save with no reasonThe banner’s uploaded file is missing from storagere-upload the creative
The placement snippet never reaches a redirect slotAlways redirect returns a bare URLthe placement’s Ad Tags & API settings; use a server-side tracker
The vendor’s cache-buster is always the same valueA rnd= you invented is not filled input $$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/hrefmake the snippet a single tag with src/href first
The creative went back to Pending after you edited a pixelExpected: any banner snippet change resets moderationre-approve the creative

Reference

Fields

FieldWhat it doesNotes
CountryWhich country’s traffic gets this snippetGlobal (stored as *) is the fallback. One row per country — re-adding a country overwrites its row
Tracking codeThe HTML/JS snippetRequired; 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 tooOff 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-code operations delete every row, as the switch does; enable-tracking-code on a banner or placement whose card is already on changes nothing and keeps its codes. An unknown or deleted banner or placement is a 404; a role without the banner or placement permission gets a 403 naming it — never a bare success. A banner create or update without the permission leaves thirdTrackingCode[…] unapplied, listed in ignoredFields.
  • …/edit.do changes the row’s code and its country: sending another two-letter country moves the row there (400 if the entity already has a code for that country). The Global row is edited with country=* and id=0. Both …/add.do (single and batch) and …/edit.do take * or a country from the country list — ZZ is a 400 naming country, and on add.do gb is stored as UK.
  • The same setting sent with a banner — thirdTrackingCode[<key>] on banner/create.do or update.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 in ignoredFields while the rest of the banner is saved.
  • The no-fill switch is GET / POST /rest-api/tracking-code/placement/fire-without-ad.do (id, and enabled on the POST) — see Linking, status, tracking codes and ad tags via API.

Related pages

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.