Image requests

Notice that when using image requests, only [Image] creatives can be used!

That is because the tag will be a HTML img element with a src= to the ad-request URL - which must return an image.

This means that if a campaign does NOT have an active [Image] creative - it will not be selected.


This document describes how EmediateAd handles image requests. With image requests we refer to the ad tag that uses the format

<a href='http://adserver/eas?cu=X;ty=ct'><img src='http://adserver/eas?cu=X;cre=img'></a>


The image tag is used either as a backup in a tag (for browsers that don't use iframes or javascript), or in mail deliveries where iframes or javascript work poorly.

The challenge of the image tag is that EmediateAd needs to remember which campaign and creative was selected for a given call on a content unit. This information is looked up when the user later clicks on the image.

Example: Tag is:

<a href="http://adserver/eas?cu=X;ty=ct"><img src="http://adserver/eas?cu=X;cre=img"></a>

When the user first requests an image on content unit X, EmediateAd selects campaign A, creative B. When the user later clicks, we need to look up campaign A and creative B from content unit X for this user.

There are a number of ways EmediateAd can handle this.

Upairs in the tag

The most secure way of ensuring that the proper campaign and creative are found when a user clicks is to use upairs in the tag. Upairs is a name-value pair that must be identical in the image src url and the href url.


<a href="http://adserver/eas?cu=X;ty=ct;upair=123123">
<img src="http://adserver/eas?cu=X;cre=img;upair=123123"></a>

The value after upair is a string that is unique per user that sees the tag. The string can be up to 32 characters long, and can contain any characters apart from:

  • semicolon (;)
  • equal sign (=)
  • ampersand (&)
  • double colon (::)
  • question mark (?)

This method is typically used in mail deliveries, since the cookie is a poor way of storing state. A mail client might not share its cookies with the browser, in which case the mail client cookie is used in the image request, and the browser cookie is used in click request.

Each entry (content unit + upair = campaign and creative) is saved for four hours from entry time.

No upair

If no upair is used in the image tag, EmediateAd will on the server store campaign and creative for each content unit together with the unique user id that is stored in the cookie. If no such user id can be found (user has turned off cookies, or the user makes a request to EmediateAd for the first time), the IP address is used in the key.

IP addresses is not an optimal solution since proxy IP addresses might be identical for thousands of users. But it is the best solution possible.

No saved state at all

If the user is clicking in an image tag more than two hours after the image was requested (or if the click is done without fetching the image), EmediateAd has no way of finding out which campaign and creative to select. EmediateAd will then select the last campaign booked to that content unit (in the priority order).

Cxense © 2012 | Support