Jump to content

Schema:CentralNoticeImpression

PHP logging

EventLogging::logEvent( 'CentralNoticeImpression', 19511351, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"CentralNoticeImpression": 19511351
			}
		}
	}
}

JavaScript logging

mw.track( 'event.CentralNoticeImpression', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
Revision 19511351
description"CentralNotice state from pageviews selected to be part of a CentralNotice campaign. Successor to beacon/impressoin and Special:RecordImpression."
properties
anonymous
type"boolean"
requiredtrue
description"Anonymous vs. logged-in user."
project
type"string"
requiredtrue
description"CentralNotice project for the pageview; same as $wgNoticeProject."
db
type"string"
requiredtrue
description"Databse of the wiki; same as $wgDBname."
uselang
type"string"
requiredtrue
description"Interface language of the pageview; same as $wgUserLanguage."
device
type"string"
requiredtrue
description"Device category (as detected by CentralNotice and used for campaign and banner targeting)."
enum
"desktop"
"android"
"iphone"
"ipad"
"unknown"
country
type"string"
requiredtrue
description"Country, as per ext.centralNotice.GeoIP (from Geo cookie)."
region
type"string"
requiredfalse
description"Region, as per ext.centralNotice.GeoIP (from Geo cookie) (may sometimes be empty)."
debug
type"boolean"
requiredtrue
description"Whether pageview was in debug mode (triggered by the debug URL param)."
randomcampaign
type"number"
requiredtrue
description"Random number used to select a campaign, if multiple campaigns are available for this pageview."
randombanner
type"number"
requiredtrue
description"Random number used to select a banner, if multiple banners within the selected campaign are available for this pageview."
recordImpressionSampleRate
type"number"
requiredfalse
description"Sample rate for calls to beacon/impression."
impressionEventSampleRate
type"number"
requiredtrue
description"Sample rate for calls to send this event."
status
type"string"
requiredtrue
description"Status of CentralNotice processing at the time the event was sent. (See https://www.mediawiki.org/wiki/Extension:CentralNotice/Statuses,_reasons_and_status_codes.)"
statusCode
type"string"
requiredtrue
description"Status code of CentralNotice processing at the time the event was sent. (See https://www.mediawiki.org/wiki/Extension:CentralNotice/Statuses,_reasons_and_status_codes.)"
campaignStatuses
type"string"
requiredtrue
description"JSON-serialized array of objects with data about campaigns chosen during this pageview, including campaigns for which a banner was not shown. Object properties are campaign, statusCode and bannerCount. Note: It is expected that this will eventually be changed from a JSON string to an actual array of objects."
campaignCategory
type"string"
requiredtrue
description"Category of the banners in the campaign, provided they are all in the same category; if not, value will be 'mixed_banner_categories'."
campaign
type"string"
requiredtrue
description"Campaign selected for this pageview."
banner
type"string"
requiredfalse
description"Banner selected for this pageview (if one was selected)."
campaignCategoryUsesLegacy
type"boolean"
requiredtrue
description"Whether this campaign category may use legacy mechanisms (such as cookies)."
bannerCategory
type"string"
requiredfalse
description"Category of the banner selected for this pageview (if one was selected)."
bucket
type"number"
requiredtrue
description"Bucket for this client in this campaign."
bannersNotGuaranteedToDisplay
type"boolean"
requiredfalse
description"true if the banner was flagged to possibly not display, even if injected into the page."
bannerCanceledReason
type"string"
requiredfalse
description"Reason the display of the banner was canceled."
result
type"string"
requiredfalse
description"Legacy status field (superceded by status and statusCode)."
reason
type"string"
requiredfalse
description"Legacy field for the reason of the current status."
requestedBanner
type"string"
requiredfalse
description"Name of the banner requested via the mw.centralNotice.requestBanner(). (This property is set only when the requested banner was not available)."
alterFunctionMissing
type"boolean"
requiredfalse
description"true when banners were set as not guaranteed to display, but no alterImpressionData() function was found to provide appropriate data for CentralNotice status."
banner_count
type"number"
requiredfalse
description"Legacy field for counting and limiting impressions."
errorMsg
type"string"
requiredfalse
description"Error message from banner loader error."
testIdentifiers
type"string"
requiredfalse
description"Identifiers for (non-CentralNotice) tests registered for this pageview."
debugInfo
type"string"
requiredfalse
description"Extra information for debugging."