Bug 986095 - Part 2: Track sharing article from Reader viewer r=rnewman
authorMark Finkle <mfinkle@mozilla.com>
Thu, 01 May 2014 22:09:37 -0400
changeset 181741 c7ba6c5851c96abb128e25d87d86025fec1a4458
parent 181740 1885c2bb0cc0a44043a3e590dd2f66bc2b19009e
child 181742 d0f12137f270caae05c4c1ef3521f237e1850bb0
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersrnewman
bugs986095
milestone32.0a1
Bug 986095 - Part 2: Track sharing article from Reader viewer r=rnewman
mobile/android/chrome/content/aboutReader.js
--- a/mobile/android/chrome/content/aboutReader.js
+++ b/mobile/android/chrome/content/aboutReader.js
@@ -317,16 +317,20 @@ AboutReader.prototype = {
     if (!this._article)
       return;
 
     gChromeWin.sendMessageToJava({
       type: "Reader:Share",
       url: this._article.url,
       title: this._article.title
     });
+
+    // Create a relative timestamp for telemetry
+    let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
+    UITelemetry.addEvent("share.1", "list", uptime);
   },
 
   _setFontSize: function Reader_setFontSize(newFontSize) {
     let bodyClasses = this._doc.body.classList;
 
     if (this._fontSize > 0)
       bodyClasses.remove("font-size" + this._fontSize);