Browse the help center

Track impressions of a partner's ad code (sticker, banner, pop script)

Count impressions of a third-party ad code in Epom — wrap the code in an HTML Code banner, give a partner an impression pixel URL, add an extra third-party tracker to your banner, or fire only when the partner's ad really rendered — with the cache-buster rules and a fix-it checklist.

How-to network manager Account → Advertisers → campaign → HTML Code banner; Account → Publishers → Click-through placement → Show tracking URLs

What it is and why

A partner gives you their ad code — a sticker, a catfish, a banner script, a pop — and you want Epom to count its impressions, ideally only the ones that really rendered. Epom can do that four ways: serve the code itself inside an HTML Code banner, hand the partner an impression pixel URL to fire, add an extra tracker to a banner you already serve, or detect the render on the page and fire only then. The choice depends on who serves the ad and how exact the count has to be.

Example. A sports site runs a partner’s sticker code on 40,000 article views a day. Wrapped in an HTML Code banner (option 1) Epom reports about 40,000 impressions — every time the code was delivered — while the partner reports 31,000, because an ad blocker or a no-fill on their side hides it on roughly a quarter of pages. Adding the render observer (option 4) brings Epom’s count down to what actually appeared, and the two sides reconcile to within a few percent.

Typical scenarios

The partner gives youDoEpom counts
A sticker or catfish script to put on the pageOption 1 — wrap it in an HTML Code banner on a Non-standard placement, serve it with the Universal JS tag, Without WrapperEvery delivery of the code
Nothing — they serve the ad and can fire a pixel for youOption 2 — a Click-through placement; give them its Impression URLEvery time their side fires the pixel
Their verification pixel to add to an ad you already serveOption 3 — paste it into the banner’s Third-Party tracking codes card, Global row, $$RANDOM$$ as cache-busterUnchanged; the partner now counts alongside you
A script, and the numbers must match their render countOption 1 plus option 4 — an observer in the same banner that fires an impression URL when the partner’s element appears, and gives up after 3 secondsOnly impressions where the partner’s ad appeared

Step by step

The main path is option 1: Epom serves the partner’s code, so Epom counts every time it serves it. Options 2–4 follow.

Option 1 — wrap the partner’s code in an HTML Code banner

  1. Go to Account → Advertisers → advertiser → campaign → New banner and pick the type HTML Code. Pick the placement type of the slot: a sticker or catfish that positions itself on the page belongs on a Non-standard Placement.

  2. Paste the partner’s code into Code. Keep their click macros; if they accept a click URL, put $$CLICK_REDIRECT_URL$$ in front of their landing page so Epom counts clicks too — see Fix click tracking on third-party ad tags.

    HTML Code banner with the partner's sticker script in the Code field

  3. Create a placement for the slot and link the banner.

  4. On the placement, open Ad Tags & API → Settings → Ad wrapper and choose Without Wrapper for a code that positions itself on the page (sticker, catfish, pop): it is then written straight into the page and can reach the page layout. In a frame it can only draw inside the frame.

  5. Put the placement’s Universal JS tag on the page instead of the partner’s code.

Epom adds a small impression script to the markup it delivers, and the impression is counted when that script runs in the browser — that is, when the partner’s code has been delivered to the page, not when the partner’s own ad has finished loading. If the partner’s code then shows nothing (no fill on their side, an ad blocker), Epom still has an impression. Option 4 closes that gap.

Option 2 — give the partner an Epom impression pixel URL

When the partner serves the ad themselves and can fire a pixel for you:

  1. Create a Click-through Placement on the site.

  2. Link any image banner (Local File or External File) to it. The banner is only there to carry the IDs; tracking URLs are generated for image and video banners only.

  3. Open the placement’s Ad Tags & API → Show tracking URLs. Each linked banner has an Impression URL (…/impression.gif?…, shown encrypted on a placement with a serving domain), a Click URL and two click-through URLs.

    Show tracking URLs with the Impression URL and Click URL of a linked banner

  4. Give the partner the Impression URL to fire as a 1×1 image when their ad renders, and the click-through URL as their click destination.

The impression URL carries a hash of the banner, placement and campaign, so it cannot be re-pointed at another banner. Full field list: Click-through placements.

Option 3 — add an extra third-party impression tracker to your banner

The other direction: your banner should also fire the partner’s or a verification vendor’s pixel. Use the Third-Party tracking codes card on the banner (or on the placement, to cover every banner it serves) and paste the vendor’s snippet, for example:

<img src="https://verify.example/imp?camp=42&cb=$$RANDOM$$" width="1" height="1" alt="">

The card takes an HTML snippet, not a bare URL, and one snippet per country plus a Global fallback — see Third-party tracking codes. It is applied to image, HTML Code, template and OpenRTB banners; video banners use the VAST event tracking pixels of the VAST tracking card instead.

Option 4 — detect that the partner’s ad actually rendered

To track only the impressions where the partner’s ad really appeared — a sticker or banner in a wrapped third-party tag can be delivered and still never render — let the page detect the render and fire a pixel when the ad shows up. Wrap the partner’s code (option 1) and add a small observer after it in the same HTML Code banner. The example fires an option-2 impression URL when an element matching the partner’s container appears, and gives up after 3 seconds:

<div id="partner-slot"><!-- partner's code here --></div>
<script>
(function () {
  var slot = document.getElementById('partner-slot');
  var fired = false;
  function fire() {
    if (fired) { return; }
    fired = true;
    new Image().src = 'https://<ad-serving-domain>/impression.gif?...&cb=' + Date.now();
    observer.disconnect();
  }
  var observer = new MutationObserver(function () {
    if (slot.querySelector('iframe, img, .partner-ad')) { fire(); }
  });
  observer.observe(slot, { childList: true, subtree: true });
  setTimeout(function () { observer.disconnect(); }, 3000);
})();
</script>

Adjust the selector to what the partner’s ad inserts. A sticker that attaches itself to document.body instead of its own container needs observe(document.body, …) and a more specific selector. If you also want a count of the times it did not render, fire a second URL — for example a conversion action pixel (…/action.gif?key=<action key>) — from the timeout.

Caveats and exceptions

Who can do this. Network managers and publishers. You need edit access to an advertiser (to create the banner) and to the site where the code runs, plus the permissions of the option you pick: the Code banner content type for options 1 and 4; Click Through Placements and an image banner type (Local File or External File) for option 2; Banner Third-Party Tracking Code or Placement Third-Party Tracking Code for option 3. Options 1 and 4 also need access to the page’s HTML, to replace the partner’s code with the Epom tag. A publisher without advertiser access cannot create the HTML Code banner — ask the network manager, or use option 2 on your own placement.

An extra pixel goes in one place, not two. The banner’s Third-Party tracking codes card works on an HTML Code banner too: its snippet is appended after the partner’s code, macros expanded. Use either the card or a pixel pasted inside the code — the same vendor tag in both fires twice per impression. The placement’s tracking codes apply on top of either.

A tracking code fires per country, not per domain. The card can be limited by country, not by site domain or custom parameter. To fire a tracker on one host only, make two copies of the banner — one targeted at that domain, one excluding it — and put the tracker on the first.

ad-loaded is not a render signal for the partner’s ad. The Universal JS tag fires an ad-loaded event on the slot when Epom has inserted its markup (The JavaScript API). For a wrapped third-party code that moment is “the partner’s code was delivered” — the same moment the impression is counted.

Cache-busters and the rnd parameter.

  • Epom’s own tag and tracking URLs need no cache-buster from you: the Universal JS tag adds a timestamp (t=) to every request, and every impression URL is unique.
  • A rnd= (or cb=, ord=) parameter you add to an Epom URL is ignored by the server — harmless, not required.
  • For third-party pixels inside your codes, use $$RANDOM$$ (a random integer) or $$TIMESTAMP$$ (milliseconds) where the vendor wants its cache-buster, so browsers and CDNs never serve the pixel from cache.

The numbers will not match the partner’s. With option 1 Epom counts delivery of the code; the partner counts their own render or their own view. Option 4 narrows the gap, but timeouts and blockers still differ. See Analytics discrepancies.

Not working?

SymptomCheckWhere
The sticker is invisible, or stuck in a small boxThe default Friendly Frame wrapper: position: fixed sticks to the frame, not the pagethe placement’s Ad Tags & API → Settings → Ad wrapper → Without Wrapper
Epom counts far more than the partnerExpected with option 1: Epom counts delivery, the partner counts renders. Add the option-4 observerthe HTML Code banner
The observer never firesThe selector does not match what the partner inserts; a sticker attached to document.body needs observe(document.body, …)the partner’s rendered markup in the browser’s inspector
No Impression URL for the bannerTracking URLs exist for image and video banners only; link a Local File or External File bannerthe placement’s banner list
The partner’s pixel fires twiceThe same tag is in the creative’s HTML and on the Third-Party tracking codes cardkeep it in one place
Clicks are not counted$$CLICK_REDIRECT_URL$$ is not in front of the landing URLthe banner’s Code; see Fix click tracking on third-party ad tags
You cannot create the HTML Code bannerPublisher role without advertiser access, or the role lacks the Code banner typeask the network manager; or use option 2 on your own placement
The vendor says the pixel is cachedTheir cache-buster slot holds a fixed valueput $$RANDOM$$ or $$TIMESTAMP$$ there

Reference

PieceWhereNotes
HTML Code bannerAccount → Advertisers → campaign → New banner, type HTML CodeNeeds the Code content type permission; $$CLICK_REDIRECT_URL$$ for clicks
Ad wrapperplacement → Ad Tags & API → SettingsWithout Wrapper for self-positioning codes; Friendly Frame is the default
Click-through placement + Show tracking URLsplacement → Ad Tags & APIImpression URL, Click URL and two click-through URLs per linked image or video banner; hash-bound to banner, placement and campaign
Third-Party tracking codes cardbanner or placementPer country + Global; snippet, not URL; needs the banner or placement third-party tracking permission
$$RANDOM$$ / $$TIMESTAMP$$inside your codesCache-busters for third-party pixels; Epom URLs ignore rnd=

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.