mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-27 17:00:37 +00:00
Record canonical special page names in virtual pageviews
When analyzing event data special pages are a bit unique. They are the same across all wikis, but the name is typically localized to the wiki itself. The localization is relatively constant, but can change in ways that the canonical special page names do not. Simplify analyzing virtualpageviews from special pages by recording the canonical name of the page, rather than the localized name. Changes the VirtualPageViews event submission to provide wgCanonicalSpecialPageName when appropriate. Bug: T375387 Change-Id: Ia344d8d60058082fdf0715281d732e5c1f90a38a
This commit is contained in:
parent
d6b589f50b
commit
a3af7c91b5
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map.json
vendored
BIN
resources/dist/index.js.map.json
vendored
Binary file not shown.
|
@ -26,7 +26,9 @@ export default function pageviews(
|
|||
/* eslint-disable camelcase */
|
||||
source_page_id: page.id,
|
||||
source_namespace: page.namespaceId,
|
||||
source_title: mw.Title.newFromText( page.title ).getPrefixedDb(),
|
||||
source_title: page.namespaceId === -1 ?
|
||||
mw.config.get( 'wgCanonicalSpecialPageName' ) :
|
||||
mw.Title.newFromText( page.title ).getPrefixedDb(),
|
||||
source_url: page.url,
|
||||
page_id: pageview.page_id,
|
||||
page_namespace: pageview.page_namespace,
|
||||
|
|
Loading…
Reference in a new issue