PHP logging
EventLogging::logEvent( 'WikidataCompletionSearchClicks', 21428771, $event );
extension.json setup for JavaScript logging
{
"attributes": {
"EventLogging": {
"Schemas": {
"WikidataCompletionSearchClicks": 21428771
}
}
}
}
JavaScript logging
mw.track( 'event.WikidataCompletionSearchClicks', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
| description | "Schema to anonymously track clicks from Wikidata completion searches" |
|---|
| properties | | action | | description | "The action performed by a user" |
|---|
| type | "string" |
|---|
| required | true |
|---|
|
|---|
| pageToken | | description | "A random token generated per page load to identify related events" |
|---|
| type | "string" |
|---|
| required | true |
|---|
|
|---|
| searchTerm | | description | "The string the user was searching for" |
|---|
| type | "string" |
|---|
| required | true |
|---|
|
|---|
| language | | description | "Search language" |
|---|
| type | "string" |
|---|
| required | true |
|---|
|
|---|
| searchResults | | description | "Comma-separated list of page IDs that were suggested to the user as an option" |
|---|
| type | "string" |
|---|
| required | true |
|---|
|
|---|
| clickIndex | | description | "The 1-based index of the search result that the user clicked on." |
|---|
| type | "integer" |
|---|
| required | false |
|---|
|
|---|
| clickPage | | description | "The page ID of the search result that the user clicked on." |
|---|
| type | "integer" |
|---|
| required | false |
|---|
|
|---|
| context | | description | "The context for the search, e.g. top, item, property, lexeme, etc." |
|---|
| type | "string" |
|---|
| required | true |
|---|
|
|---|
| searchId | | description | "The ID of the search request" |
|---|
| type | "string" |
|---|
| required | false |
|---|
|
|---|
| bucket | | description | "AB test bucket event is assigned to" |
|---|
| type | "string" |
|---|
| required | false |
|---|
|
|---|
|
|---|