Extension:CentralNotice/Statuses, reasons and status codes
CentralNotice registers its current status at certain times during while determining a user's eligibility for a campaign and a banner. It may also register a reason for the status having been set. These data points are set as
reason in the
Both are also sent to the server via the call to
beacon/impression. (However, if a status is erroneously set after that call occurs, only the previous status is registered server-side.)
reason are also condensed into a single field,
status_code, made up of two numbers, separated by a dot. The first number is a code for the status, and the second is a code for reason.
status_code is available as a dimension in the WMF's Druid data store on banner activity, and may be queried via Pivot.
Available statuses, reasons and codesEdit
Following is an overview of currently available statuses and reasons, with their corresponding codes.
To find the meaning of a status code, look up the first number in the Statuses table, and the second number in the Reasons table. For example, code
banner_canceled status with
closed as the reason (i.e., no banner was shown because the user had a cookie indicating that a banner in a campaign with the same category was closed by the user on a previous pageview, within a specified period of time).
Currently the CentralNotice API allows reasons to be attached to statuses
5. Code in banners often provides reasons as strings, and sometimes those strings don't match any reason known to CentralNotice code; in such cases, the
other reason (
0) is set in the status code.
ext.centralNotice.display.state.js for the most up-to-date codes.
||Initial status, set when CentralNotice starts to determine if the user is eligible for a campaign.|
||It has been determined that the user is eligible for a campaign and one has been chosen.|
||Though the user is in a campaign and a banner may be available, it has been determined that a banner should not be shown. Normally, a reason is provided.|
||Though a banner should be shown, none of the banners assigned to the campaign are available for this user, due to the user's device, logged-in status or bucket. In most cases, this code indicates a mistake in campaign configuration. (Note: When this code is set, the |
||A banner has been selected for the user. (The background call to load the banner is made shortly after this status is set.)|
||The banner was loaded and injected into the page, but code in the banner indicated that the banner was not actually displayed to the user. A reason is normally set.|
||The banner was loaded and displayed to the user. (Important catch: If a complex banner hides itself and does not register this correctly with CentralNotice before the call to |
||The banner content was requested from the server, but an HTTP error code was received.|
||CentralNotice does not have a code for the reason provided.|
||On a previous pageview within a specified time period, the user clicked on the close button of a banner in a campaign with the same category, as indicated by a cookie in the user's browser.|
||The user has reached the maximum number of banner impressions for this campaign (or impression diet identifier) within a specified time period. Banners will only be shown again for this campaign once the period has elapsed.|
||The user has not reached the minimum number of pageviews for this campaign (or impression diet identifier) for a banner to be shown.|
||The user did not have the required number of edits to see the banner.|
||A cookie in the user's browser indicates that they donated within the past year.|
||The impression diet feature didn't have a way to store pageview and impression counts in the user's brower.|
||The banner sequence feature didn't have a way to store data in the user's brower.|
||A request was made through the CentralNotice API (usually by the banner sequence feature) for a specific banner, but that banner is not available for this user.|
||Error in the configuration data received by the banner sequence feature.|
||The user is currently on an empty step in a banner sequence.|
||All the steps in a banner sequence have been skipped due to identifiers in the user's browser indicating that they all should be skipped. (May indicate an error in campaign configuration.)|