PHP logging

EventLogging::logEvent( 'ExternalGuidance', 18903973, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"ExternalGuidance": 18903973
			}
		}
	}
}

JavaScript logging

mw.track( 'event.ExternalGuidance', { /* ... */ } );

Schema:ExternalGuidance

From Meta, a Wikimedia project coordination wiki
Revision 18903973
Jump to navigation Jump to search
description"Schema for logging events in the ExternalGuidance extension."
properties
action
type"string"
description"What the user caused or did."
enum
"init"
"specialpage"
"createpage"
"createpage-translate"
"editpage"
"mtinfo"
"edit-original"
requiredtrue
service
type"string"
description"The name of the external service."
requiredtrue
source_language
type"string"
description"Language code of original article"
requiredtrue
target_language
type"string"
description"Language code of the language into which the page was translated. This is required for all actions, because there may be several target languages."
requiredtrue
title
type"string"
description"Page title."
requiredtrue
session_token
type"string"
description"Session token that survives across pages (mw.user.sessionId()), but not browser restarts, used in deterministic user bucketing. This will only be set for client-side (JavaScript-generated) events, for server-side events the value will be an empty string."