Campaign Selection


This document describes how EmediateAd decides which campaign to return for a request to a specific content unit.

Request basics

When a request comes in to EmediateAd, we will in this document assume that one or more content units are given. If there is a campaign id given, EmediateAd will try to deliver that campaign. However, that is rare and will not be discussed here.

Example: Content unit id is 99. Request could be:


cre=mu specifies that we expect EmediateAd to return HTML code sw=Volvo is targeting information that can be used by targeted campaigns

The task of EmediateAd is to find the best suitable campaign and creative for this given request.

Campaigns that can deliver per content unit

Every hour (or at a manual push), EmediateAd is finding all campaigns that can deliver for a certain content unit. These rules will be used:

  1. The campaign needs to Approved or Active
  2. The campaign start and stop date needs to fit current date
  3. Hour targeting or day targeting can disqualify a campaign from being selected if the targeting is not met for the coming hour

Campaign order per content unit

All campaigns that fulfill the criteria above are pre-sorted according to these rules:

  1. The priority level is the first key. The campaigns with the highest priority always come first.
  2. Within each priority level, the campaigns with the highest “sub prio no” comes first. Where campaigns have the same priority and the same sub prio no, the campaign that was booked first (i.e. has the lowest campaign id) comes first. The exception is the priority level “Highest CPM”, where the campaigns with the highest CPM come first.

Campaign selection process

When a request comes in for a certain content unit, EmediateAd will go through all campaigns that can deliver on that content unit until it finds one to deliver. The campaigns will be looked at in the order pre-calculated in previous step.

These are the rules used to decide which campaign:

  1. Is this campaign valid according to targeting rules? If the campaign is targeted, each targeting criteria is compared with the targeting data available for this request. If the campaign is not valid, EmediateAd skips to the next campaign on the list.
  2. Can the campaign be delivered for this request? The only case where this rule disqualifies a campaign on this step is if the request was made for an image and the campaign has no image creatives.
  3. If steps 1 and 2 are fulfilled, should EmediateAd deliver this campaign? This depends on the weight the campaign has been given. For priority levels “Exclusive” and “Fixed weight”, EmediateAd simply looks at the weight, and compares that with a random weight. For priority levels “Paying 1” to “Highest CPM”, the forecast mechanism has calculated a weight to make this campaign deliver booked target as evenly as possible. If EmediateAd sees a weight of 40%, it will select this campaign for delivery 40% of the times the campaign can deliver

There are some exceptions to the rules above.

Priority level “Available impressions”

For this level, EmediateAd first determines how many campaigns are available on that priority level, after rule 1 and 2 above has been examined. It then assigns equal weight to each of these valid campaigns and picks one of them.

Example: There are four campaigns on priority level “Available impressions”, A, B, C and D. Campaign C is not valid according to targeting criteria. This means that EmediateAd will pick A, B or D, with equal chance for each.

Priority level “House campaign”

Since campaigns on this level cannot have any targeting, EmediateAd simply counts how many campaigns are on this priority level and selects one of the randomly.

Special cases: Inclusivity and Exclusivity

There are some special cases that can overrule the process above. Campaigns can be grouped in campaign groups with the Inclusivity or Exclusivity flags set. In those cases, EmediateAd takes these extra steps in the campaign selection process:


When a campaign belongs to an Exclusivity group, EmediateAd must make sure that not two campaigns from that campaign group is delivered to the same page.

This works by storing each delivered campaign in a campaign group with exclusivity in short term memory. This short term memory is rotated every four seconds. In the campaign selection process, EmediateAd will check each campaign in an exclusivity group against this short term memory. If the system finds that another campaign from this campaign group has been delivered within the previous four seconds, the campaign is disqualified. You can think of it as an additional targeting criterion.

In some cases this mechanism might not work. If a browser is loading a heavy page, or the bandwidth ( connection speed ) of the user is low, there might be more than four seconds between the first content unit call and the last in which case the exclusivity breaks down.

If you are using “Composed JavaScript tags”, all ad requests are made at the same time. Therefore exclusivity is not sensitive to delays between ad requests.


When a campaign belongs to an Inclusivity group, EmediateAd will check before the remaining campaign selection process if there has been another campaign from that Inclusivity group delivered within the previous four seconds. If so, EmediateAd will pick a campaign in that group that matches the content unit in the request.

Cxense © 2012 | Support