Tracking Beacons using the JSON Ad API

Third-Party Tracking Beacons

Some campaigns may include third-party tracking beacons in the ad response. These beacons are provided in the beacons array of the JSON response and are used by advertisers to record impressions.

Example Response

{
  "beacons": [
    {
      "type": "impression",
      "url": "https://example-tracker.com/pixel?id=123"
    },
    {
      "type": "impression",
      "url": "https://another-tracker.com/impression?id=456"
    }
  ]
}

Rendering Requirements

For every beacon where type is impression, your application should render a client-side 1×1 pixel image using the beacon URL as the image source.

These pixels should be added to the page when the ad is rendered so the advertiser's tracking system can record the impression.

Example

<img
  src="https://example-tracker.com/pixel?id=123"
  style="display:none;"
  width="1"
  height="1"
  alt=""
/>

Notes

  • Only render beacons whose type is impression.
  • Beacons should be rendered client-side by the browser.
  • The beacon URL should be used exactly as provided in the API response.
  • Do not modify, proxy, or cache beacon requests.
  • Multiple impression beacons may be returned and all should be rendered.

Can't find what you're looking for?

Send us an email

hello@adbutler.com

Visit the blog

For more ad serving tips, industry news and AdButler insights.