Extension:CentralNotice/Impression diet

The "impression diet" feature makes it simple to limit the number of impressions seen by each reader.

The CentralNotice campaign editor includes a checkbox to enable this: In this example, the campaign will only show 2 banners to any user's browser. Once this has happened, the reader will have a cookie set, testcampaign_diet=2, and this will prevent CentralNotice from displaying any more banners from this campaign.

Parameters
Hide cookie name - If you reuse the same cookie name between campaigns, the count will be cumulative. For example, WMF Fundraising is currently using "centralnotice_bannercount_fr15", which allows us to limit the overall number of fundraising banners seen by any one individual.

Number of initial impressions to skip - Banners will not be shown for a number of pageviews, before we start the count. This can be used to target frequent user, by skipping a large number of pageviews before showing banners.

Maximum impressions - Limit on the number of banners we show.

How long to wait before restarting the cycle - This makes it possible to limit the banner impressions per day, or per month... If the impression limit is set to 1 and the cycle restart time is set to (24 * 60 * 60), we will show each reader at most one banner per day.

Hacks
Note that you can slowly increase the impression limit as a campaign progresses. This is most useful in conjunction with impression statistics, which are not yet easy to access. For example, a survey campaign can be launched with an impression limit of 3, and when responses die down, you can bump the limit up to 4. This causes at least one more impression for each reader who visits the site during your campaign window.