Proxying Impressions Through Your Server


Proxying impressions is only available through the Decision API


You can proxy Kevel impression counts through your own server. This allows you to:

  • Control the domains used for ad serving
  • Customize the format of impression tracking pixels
  • Minimize reporting discrepancies due to Ad Blockers


These proxying instructions are applicable to Custom Events too - like tracking Likes, Social Shares, etc. You'll want to use the url found in the events object of the Response.

Understanding the Impression Pixel

An Kevel impression pixel consists of:

  • i.gif: The dimensionless pixel that counts the impression when fired.
  • e=: A base64 encoded shim unique to the impression.
  • s=: A signature value to verify that the encoded shim is legitimate.

A complete pixel URL looks like:


The number in is your account's network ID.

In a Decision API response, the impression pixel URL is returned as the impressionUrl parameter.

To record an impression, a browser or script must GET the impression URL.

  "adId": 111,
  "creativeId": 222,
  "flightId": 333,
  "campaignId": 444,
  "clickUrl": "",
  "impressionUrl": "",
  "events": [
        { id: 12,
          url: ""
        { id: 13,
          url: ""
        { id: 14,
          url: ""

Creating a Proxy Server

A server for proxying impressions must be able to:

  • Ingest the ImpressionUrl from a Decision API response
  • Create a new impression URL using the domain of your web property
  • GET a Kevel impression URL using shim and signature data from the "native" URL

The server that renders an ad on a page then renders the new "native" impression URL.

Finally, when a user's browser hits the new impression URL, the proxy server will count the impression using the Kevel impression URL format.

Here's an example of how the process works:

  • When a user views a page, makes a server-to-server Decision request to get an ad
  • As part of the process of rendering an ad, the proxy server ingests the ImpressionUrl from the Decision response and creates a new impression pixel that looks like this (for example):
  • The server writes the new impression URL to the page with the ad contents
  • A user's browser GETs the new impression pixel
  • The proxy server uses the e=value and s=value passed on the new impression pixel to create a pixel in the Kevel format
  • The proxy server hits the Kevel impression pixel. Kevel counts the impression