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  and   in the   object, and may be inspected via the browser's JavaScript console.

Both are also sent to the server via the call to. (However, if a status is erroneously set after that call occurs, only the previous status is registered server-side.)

and   are also condensed into a single field, , 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.

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 codes
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  indicates   status with   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   or. 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  reason  is set in the status code.

Please see for the most up-to-date codes.

Reasons
Note: Many reasons are legacy and not in use with current banners, though not actually deprecated. For any codes whose meanings are not explained here, please see the in-banner JavaScript that sets them.