Frequency cookie

EmediateAd uses three cookies to store information on which frequency targeted campaigns a visitor has seen:


eas_gr_fr

Frequency groups


eas_fr

Frequency targeted campaigns


eas_cre_fr

Frequency_targeted creatives


The cookies all use the same format:

<type><id>-<freq>-<expires>:<type><id>-<freq>-<expires>:...

where type=g in the Frequency group cookie, n in the campaign cookie and c in the creative cookie. Expire is unix cachebuster - 1e9. IDs, frequency and expiry are encoded in an emediate variant of base64 encoding.


An example cookie might look like this:

eas_fr	cO-C-RwUhT:cP-B-JwUhT:cB-F-crrpR:

which is decoded to

14-2-327502865:15-1-327502857:1-5-296139484:


Campaign 14 has been seen 2 times and expires at unix time 1327502865 (25/1 2011 08:47:25).


Each frequency cookie can contain up to 200 entries - this means that EmediateAd stores information about up to 200 campaigns, 200 creatives and 200 frequency groups.


New cookie entries are added from the left. Updated cookie entries keep their position in the list.


Example 1

Cookie contains 14-2-<expiry>:15-3-<expiry>

Visitor sees frequency targeted campaign with id 16. The new cookie is

16-1-<expiry>:14-2-<expiry>:15-3-<expiry>

Visitor then sees campaign 14. The new cookie is:

16-1-<expiry>:14-3-<expiry>:15-3-<expiry>

When mod_eas reads the cookie, all entries where the expiry time has already passed are removed:


Example 2

Cookie contains 14-2-<old expiry>:15-3-<expiry>

New cookie is:

15-3-<expiry>

When the cookie is full, the rightmost entry is removed from the list. This is not the entry least recently seen, it is the entry least recently added to the list.


Example 3

Cookie is full, and contains …:14-2-<expiry>:15-3-<expiry>

Visitor sees frequency targeted campaign with id 16. The new cookie is

16-1-<expiry>:…:14-2-<expiry>

Visitor then sees campaign 14. The new cookie is:

16-1-<expiry>:…:14-3-<expiry>

Visitor sees campaign frequency targeted campaign with id 17. The new cookie is:

17-1-<expiry>:16-1-<expiry>:…:

Note that campaign 14 was removed, even though it was viewed very recently.

This removal policy can be very dangerous on a site where most campaigns are booked with a long expiration time. The worst case scenario is Lifetime: Eternal; then no entries will ever be removed because they have expired and only the “remove from the right” case is used.

This will have the appearance of “random” campaigns being removed from the cookie and the frequency capping being implemented very inconsistently.


To prevent the possibility of reaching the limit of the frequency cookie, Emediate recommends all campaigns are booked with a frequency that at the longest covers the campaign period. The use of Lifetime: Eternal; should be limited to very special cases.
Cxense © 2012 | Support