Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/182698

Change subject: Remove sendBeacon experiment
......................................................................

Remove sendBeacon experiment

As I understand it, adequate data has been collected, so this can be
decommissioned.

Change-Id: I8c6057ded2c3ce4fb22c556936838a674fd656f7
---
M WikimediaEvents.php
D modules/ext.wikimediaEvents.sendBeacon.js
2 files changed, 1 insertion(+), 38 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/98/182698/1

diff --git a/WikimediaEvents.php b/WikimediaEvents.php
index 6746c6d..b39dcc2 100644
--- a/WikimediaEvents.php
+++ b/WikimediaEvents.php
@@ -64,11 +64,6 @@
                'schema' => 'Edit',
                'revision' => 10676603,
        ),
-       'schema.SendBeaconReliability' => array(
-               'class' => 'ResourceLoaderSchemaModule',
-               'schema' => 'SendBeaconReliability',
-               'revision' => 10735916,
-       ),
        'ext.wikimediaEvents.ve' => array(
                'scripts'       => 'ext.wikimediaEvents.ve.js',
                'dependencies'  => 'ext.visualEditor.base',
@@ -93,9 +88,7 @@
        // permanently (even if empty, to avoid errors on cached pages), and 
future code
        // meeting this criteria be added to it.
        'ext.wikimediaEvents' => array(
-               'scripts' => array(
-                       'ext.wikimediaEvents.sendBeacon.js',
-               ),
+               'scripts' => array(),
                'localBasePath' => __DIR__ . '/modules',
                'remoteExtPath' => 'WikimediaEvents/modules',
                'targets' => array( 'desktop', 'mobile' ),
diff --git a/modules/ext.wikimediaEvents.sendBeacon.js 
b/modules/ext.wikimediaEvents.sendBeacon.js
deleted file mode 100644
index 57c9724..0000000
--- a/modules/ext.wikimediaEvents.sendBeacon.js
+++ /dev/null
@@ -1,30 +0,0 @@
-( function ( mw, $ ) {
-       var odds, isBeaconAvailable, baseEvent, imgEvent, beaconEvent;
-
-       odds = 0.0001; // 1 in 10,000 chance
-
-       if ( Math.random() < odds ) {
-               mw.loader.using( [ 'mediawiki.user', 
'schema.SendBeaconReliability' ] ).done( function () {
-                       isBeaconAvailable = !!navigator.sendBeacon;
-
-                       baseEvent = {
-                               browserSupportsSendBeacon: isBeaconAvailable,
-                               logId: mw.user.generateRandomSessionId()
-                       };
-
-                       imgEvent = $.extend( { method: 'logEvent' }, baseEvent 
);
-
-                       // We always log via logEvent (to at least get data on 
user agent and whether
-                       // it supports sendBeacon).  If sendBeacon is 
available, we also log via
-                       // logPersistentEvent.  Since logId is the same for 
both events, this allows
-                       // us to determine how common it is to have logEvent 
without
-                       // logPersistentEvent, or vice-versa.
-                       mw.eventLog.logEvent( 'SendBeaconReliability', imgEvent 
);
-
-                       if ( isBeaconAvailable ) {
-                               beaconEvent = $.extend( { method: 
'logPersistentEvent' }, baseEvent );
-                               mw.eventLog.logPersistentEvent( 
'SendBeaconReliability', beaconEvent );
-                       }
-               } );
-       }
-}( mediaWiki, jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/182698
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c6057ded2c3ce4fb22c556936838a674fd656f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to