Merge "mw.trackSubscriber: Log platform as phone vs. desktop"

This commit is contained in:
jenkins-bot 2015-09-07 16:06:08 +00:00 committed by Gerrit Code Review
commit 31bdb77d63
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' ),