mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
mw.trackSubscriber: Log platform as phone vs. desktop
Change-Id: I71c25f28098c72ed779117da9c243dc3a87e611d
This commit is contained in:
parent
f6a2e3658c
commit
486bc7e6e3
|
@ -115,6 +115,8 @@ ve.init.mw.DesktopArticleTarget.static.compatibility = {
|
|||
}
|
||||
};
|
||||
|
||||
ve.init.mw.DesktopArticleTarget.static.platformType = 'desktop';
|
||||
|
||||
/* Events */
|
||||
|
||||
/**
|
||||
|
|
|
@ -72,6 +72,9 @@ ve.init.mw.MobileArticleTarget.static.toolbarGroups = [
|
|||
|
||||
ve.init.mw.MobileArticleTarget.static.name = 'mobile';
|
||||
|
||||
// FIXME Some of these users will be on tablets, check for this
|
||||
ve.init.mw.MobileArticleTarget.static.platformType = 'phone';
|
||||
|
||||
/* Methods */
|
||||
|
||||
/**
|
||||
|
|
|
@ -245,12 +245,22 @@ ve.init.mw.Target.static.name = 'mwTarget';
|
|||
|
||||
/**
|
||||
* Type of integration. Used by ve.init.mw.trackSubscriber.js for event tracking.
|
||||
*
|
||||
* @static
|
||||
* @property {string}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.init.mw.Target.static.integrationType = 'page';
|
||||
|
||||
/**
|
||||
* Type of platform. Used by ve.init.mw.trackSubscriber.js for event tracking.
|
||||
*
|
||||
* @static
|
||||
* @property {string}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.init.mw.Target.static.platformType = 'other';
|
||||
|
||||
/* Static Methods */
|
||||
|
||||
/**
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
version: 1,
|
||||
action: action,
|
||||
editor: 'visualeditor',
|
||||
platform: 'desktop', // FIXME
|
||||
platform: ve.init && ve.init.target && ve.init.target.constructor.static.platformType || 'other',
|
||||
integration: ve.init && ve.init.target && ve.init.target.constructor.static.integrationType || 'page',
|
||||
'page.id': mw.config.get( 'wgArticleId' ),
|
||||
'page.title': mw.config.get( 'wgPageName' ),
|
||||
|
|
Loading…
Reference in a new issue