PHP logging
EventLogging::logEvent( 'CodeMirrorUsage', 21143799, $event );
extension.json setup for JavaScript logging
{
"attributes": {
"EventLogging": {
"Schemas": {
"CodeMirrorUsage": 21143799
}
}
}
}
JavaScript logging
mw.track( 'event.CodeMirrorUsage', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
| description | "Tracks usage statistics for Extension:CodeMirror." |
|---|
| properties | | editor | | type | "string" |
|---|
| enum | | "wikitext-2017" |
| "wikitext" |
|
|---|
| required | true |
|---|
| description | "The editor interface through which the user is using syntax highlighting." |
|---|
|
|---|
| enabled | | type | "boolean" |
|---|
| required | true |
|---|
| description | "True if syntax highlighting is enabled." |
|---|
|
|---|
| toggled | | type | "boolean" |
|---|
| required | true |
|---|
| description | "True if the toggle was used to enable/disable syntax highlighting." |
|---|
|
|---|
| session_token | | type | "string" |
|---|
| required | true |
|---|
| description | "The user's session token." |
|---|
|
|---|
| user_id | | type | "integer" |
|---|
| required | true |
|---|
| description | "The user's id (0 if logged out)." |
|---|
|
|---|
| user_edit_count_bucket | | type | "string" |
|---|
| required | false |
|---|
| description | "Reduced granularity edit count, safe to keep in the sanitized stream. This is optional, and will not be present for anonymous users." |
|---|
| enum | | "0 edits" |
| "1-4 edits" |
| "5-99 edits" |
| "100-999 edits" |
| "1000+ edits" |
|
|---|
|
|---|
| edit_start_ts_ms | | type | "integer" |
|---|
| required | true |
|---|
| description | "Timestamp when the editor was first launched." |
|---|
|
|---|
|
|---|