mw.trackSubscriber: Log platform as phone vs. desktop

Change-Id: I71c25f28098c72ed779117da9c243dc3a87e611d
This commit is contained in:
James D. Forrester 2015-09-02 18:24:48 -07:00 committed by Jforrester
parent f6a2e3658c
commit 486bc7e6e3
4 changed files with 16 additions and 1 deletions

View file

@ -115,6 +115,8 @@ ve.init.mw.DesktopArticleTarget.static.compatibility = {
}
};
ve.init.mw.DesktopArticleTarget.static.platformType = 'desktop';
/* Events */
/**

View file

@ -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 */
/**

View file

@ -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 */
/**

View file

@ -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' ),