Last Comment Bug 652657 - Provide opt-in UI for Telemetry
: Provide opt-in UI for Telemetry
Status: VERIFIED FIXED
Confirmed we are good for Fx7. I have...
: user-doc-needed
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: P1 normal (vote)
: Firefox 7
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on: 667592
Blocks: 585196 659396 667577
  Show dependency treegraph
 
Reported: 2011-04-25 14:28 PDT by (dormant account)
Modified: 2013-12-27 14:21 PST (History)
27 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+
fixed


Attachments
Show notification on first start to opt-in for telemetry reporting (6.99 KB, patch)
2011-05-12 10:19 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
working prompt (4.94 KB, patch)
2011-05-12 16:06 PDT, (dormant account)
limi: ui‑review+
Details | Diff | Review
screenshot (49.61 KB, image/jpeg)
2011-05-12 16:07 PDT, (dormant account)
no flags Details
Show notification on first start to opt-in for telemetry reporting (7.34 KB, patch)
2011-05-16 00:10 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
Screenshot (55.62 KB, image/png)
2011-05-16 00:17 PDT, Mike Hommey [:glandium]
no flags Details
Allow to opt-in for telemetry reporting (11.46 KB, patch)
2011-05-16 00:40 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
Allow to opt-in for telemetry reporting (11.58 KB, patch)
2011-05-17 00:32 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
Allow to opt-in for telemetry reporting (12.65 KB, patch)
2011-05-19 09:01 PDT, Mike Hommey [:glandium]
gavin.sharp: review-
Details | Diff | Review
Allow to opt-in for telemetry reporting (12.35 KB, patch)
2011-06-02 01:25 PDT, Mike Hommey [:glandium]
gavin.sharp: review+
Details | Diff | Review
do not show telemetry notification when about:rights notification is shown (1.25 KB, patch)
2011-06-07 14:39 PDT, (dormant account)
gavin.sharp: review+
Details | Diff | Review
Allow to opt-in for telemetry reporting. (12.86 KB, patch)
2011-06-23 19:21 PDT, Mike Hommey [:glandium]
gavin.sharp: review+
Details | Diff | Review
Allow to opt-in for telemetry reporting. (12.86 KB, patch)
2011-06-23 19:57 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
Allow to opt-in for telemetry reporting. (12.86 KB, patch)
2011-06-23 21:14 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review

Description (dormant account) 2011-04-25 14:28:45 PDT
Need an opt-in UI for telemetry and possibly an equivalent of chrome's about:histograms(ie https://bug649502.bugzilla.mozilla.org/attachment.cgi?id=527360)
Comment 1 (dormant account) 2011-05-06 16:21:41 PDT
There are two ui parts needed here:
a) opt-in UI
I imagine this will be similar to the know-your-rights popup. "Would you like to help improve Firefox performance(see link for more details) by submitting your performance data?"

We need this for Firefox 6 in order to ship telemetry

b) about:telemetry UI
This is a superset of the about:histograms in chrome(and above link), but would also include metadata sent in the Telemetry ping(ie versions, platform, cpu type), current telemetry opt-in status and a button to opt-in/out.
Comment 2 Alex Limi (:limi) — Firefox UX Team 2011-05-06 16:47:08 PDT
Ideally:
- By measuring locally anyway, we can prompt the users that we detect as being slow to submit their data. This has two advantages: 1) we get the data from the users that are detectably slow, 2) we get to tell them "we know something is wrong, if you help us by sending us this data, we can get started on fixing it".

After talking to Taras on IRC, it seems like this isn't feasible until FF7 or thereabouts, so in the meantime:

Temporary solution:
Use infobar that asks the user whether they want to submit their telemetry data (good: easy to ignore if you don't want to deal with it). This should get us a decent amount of data, but of course will be self-selecting and not necessarily representative overall.

We could also pursue the…

Hybrid approach:
Opt people into this as part of the installer (the last screen, where we ask whether to set as default, etc), which only exists on Windows right now. That way, you'd get a wider set of data, but only on that platform. Pursuing a hybrid approach (ie. doing this on Windows, infobar on other platforms) would probably be best, but I'm unsure of how involved that sort of change would be to implement. (CCed Rob Strong for info on this)
Comment 3 Robert Strong [:rstrong] (use needinfo to contact me) 2011-05-09 15:02:25 PDT
(In reply to comment #2)
My response on irc to taras

<rs> This is per profile so using the notification bar makes the most sense. If there were an installer option (there are already too many options in it) it would add a file to the file system Firefox would need to check for since the installer doesn't understand prefs
<rs> Also, the installer option wouldn't handle app updates so you would likely need to ask in that scenario as well
Comment 4 Alex Limi (:limi) — Firefox UX Team 2011-05-10 14:12:18 PDT
OK, makes sense. Ideally, we'd remove the "Know your rights" infobar and make that messaging part of a web page or similar, so we wouldn't have multiple infobars. I'll see what our options are, but don't let this block progress in the meantime. :)
Comment 5 Mike Hommey [:glandium] 2011-05-11 09:41:40 PDT
I have code to handle the additional infobar for telemetry, i'd need to know what we put in it. A small text, a link to a web page and a button to enable ? Two buttons (yes, no) ?
Comment 6 Alex Fowler 2011-05-11 10:17:39 PDT
Would it be helpful to arrange a brief call to discuss?
Comment 7 Mike Hommey [:glandium] 2011-05-11 14:34:35 PDT
(In reply to comment #6)
> Would it be helpful to arrange a brief call to discuss?

It probably would. I'm not available today, though, and am at GMT+2, so it would need to be not too late :)
Comment 8 Alex Limi (:limi) — Firefox UX Team 2011-05-11 16:38:03 PDT
Generally, infobars follow the pattern:

"Would you like to XYZ?  [Enable XYZ] [x]"

…where the close button as well as ignoring the prompt altogether (which infobars are really good at) counts as a "I don't really want to deal with this".

I don't think it needs to be more complicated than that for the Telemetry thing either, my main worry is that we're already showing an infobar on startup ("Know your rights"), and asking it later makes it look like it's related to the site you're viewing at the time. The first page on upgrade is a Mozilla page, which is why we can get away with the "Know your rights" one.
Comment 9 Liz Compton [:liz] 2011-05-12 09:42:35 PDT
Is there any research re whether 2 infobars puts people off? 

Would the telemetry infobar appear with every upgrade or just the first time you install Firefox (like the Know Your Rights infobar)?
Comment 10 Mike Hommey [:glandium] 2011-05-12 10:19:33 PDT
Created attachment 531977 [details] [diff] [review]
Show notification on first start to opt-in for telemetry reporting

Assuming implementing an infobar is the workable short term solution,
here is such an infobar.

Apparently, XUL notifications don't support links in their label text,
so I had to resort to using two buttons.

The infobar thus looks like:
"Would you like to help improve Firefox by submitting your performance data? [More information] [Subscribe] [X]"

I used the same setting as the current "Know your rights" infobar,
meaning it maybe stays too long. It's only shown the very first time
a version of Firefox supporting telemetry is launched.
Comment 11 Mike Hommey [:glandium] 2011-05-12 10:29:18 PDT
Comment on attachment 531977 [details] [diff] [review]
Show notification on first start to opt-in for telemetry reporting

Note that I'm not entirely sure this actually works. The component was tested by editing an omni.jar manually and getting telemetry.properties from a different location than the one set here. My Linux build environment is currently hosed so I haven't built there, and I had a Windows build environment, but only with an old m-c, and there might have been a problem with the existing objdir and/or startup cache. However, the telemetry.properties file is properly installed at the expected location, so I think it should work. I'll test thoroughly when my Linux build environment is up again.
Comment 12 Mike Hommey [:glandium] 2011-05-12 10:47:14 PDT
Ah, I forgot to mention, the patch hardcodes the destination url for the More Information button, and at the moment it's "about:rights".
Comment 13 (dormant account) 2011-05-12 16:06:29 PDT
Created attachment 532065 [details] [diff] [review]
working prompt

This patch actually works
Comment 14 (dormant account) 2011-05-12 16:07:11 PDT
Created attachment 532066 [details]
screenshot

This is what the popup looks like.
Comment 15 Mike Hommey [:glandium] 2011-05-12 22:22:00 PDT
(In reply to comment #13)
> Created attachment 532065 [details] [diff] [review] [review]
> working prompt
> 
> This patch actually works

D'oh, I didn't copy/paste the right version.

Note that the following "return true" shouldn't be needed:
https://bugzilla.mozilla.org/attachment.cgi?oldid=531977&action=interdiff&newid=532065&headers=1#a/browser/components/nsBrowserGlue.js_sec2

(or at least all other infobars callback don't do it)
Comment 16 (dormant account) 2011-05-13 09:35:10 PDT
(In reply to comment #15)
> 
> Note that the following "return true" shouldn't be needed:

if you don't do it the infobar hides, which is bad if the user decides "that's cool, I wanna help"
Comment 17 Mike Hommey [:glandium] 2011-05-13 09:45:00 PDT
(In reply to comment #16)
> if you don't do it the infobar hides, which is bad if the user decides
> "that's cool, I wanna help"

Ah yes, you're right.
Comment 18 Alex Limi (:limi) — Firefox UX Team 2011-05-13 16:25:35 PDT
Comment on attachment 532065 [details] [diff] [review]
working prompt

Looking good, I'd change some minor wordings and buttons:

"More details" should be a link, not a button — to ensure the call to action is the only button.

"Subscribe" should be "Submit"

I'd also tweak the text to be:

"Would you like to improve %S by submitting performance data to Mozilla?"

…this lets the user know that the data goes to Mozilla, not anywhere else, and I removed a few filler words to make it shorter.

ui-r+ with those addressed!
Comment 19 Alex Limi (:limi) — Firefox UX Team 2011-05-13 16:27:31 PDT
(In reply to comment #18)
> "Subscribe" should be "Submit"

If you want something that implies longer-term commitment, "Enable" could work.
Comment 20 (dormant account) 2011-05-13 16:37:42 PDT
(In reply to comment #18)
> Comment on attachment 532065 [details] [diff] [review] [review]
> working prompt
> 
> Looking good, I'd change some minor wordings and buttons:
> 
> "More details" should be a link, not a button — to ensure the call to action
> is the only button.

Currently the widget doesn't let us use links. This might be fixable. Gavin, what do you suggest we do?

Looks like we need a UI to disable this too. Where should that knob go?
Comment 21 Alex Limi (:limi) — Firefox UX Team 2011-05-13 16:58:44 PDT
(In reply to comment #20)
> Looks like we need a UI to disable this too. Where should that knob go?

I'd personally be fine with having this only in about:config, but if it needs to be in Preferences, I'd put it under Advanced → General → System Defaults -> "Submit performance data" as a checkbox under "Submit crash reports".
Comment 22 Justin Dolske [:Dolske] 2011-05-13 18:19:11 PDT
You can put links in by twiddling the DOM of the notification bar. The crashed-plugin bar does this (as the former geolocation bar did, before it became a doorhanger).

See http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#7133

[last few lines of pluginInstanceCrashed()]
Comment 23 Mike Hommey [:glandium] 2011-05-14 00:04:12 PDT
So, in summary, this would look like:
Would you like to improve Firefox by submitting performance data to Mozilla? _More details_      [Enable] [X]

(In reply to comment #22)
> You can put links in by twiddling the DOM of the notification bar. The
> crashed-plugin bar does this (as the former geolocation bar did, before it
> became a doorhanger).

Ah, I knew I had seen notifications with links in the past, but looking at the XUL notification bindings, I wondered if I had been dreaming.
Comment 24 Mike Hommey [:glandium] 2011-05-16 00:10:48 PDT
Created attachment 532565 [details] [diff] [review]
Show notification on first start to opt-in for telemetry reporting

This version replaces the more info button with a "Learn more" link.
When clicking on the link, the infobar disappears on the current tab, a
new tab is opened with the learn more page (about:, at the moment), and
a new infobar is shown displaying the same thing, without the Learn more
link.
Comment 25 Mike Hommey [:glandium] 2011-05-16 00:17:54 PDT
Created attachment 532566 [details]
Screenshot

This is what it looks like (disregard the ugly gtk theme): on the top is what you get after a Firefox startup, on the bottom what you get after clicking on the "Learn more" link. Coming back to the start page tab shows no infobar.
Comment 26 Mike Hommey [:glandium] 2011-05-16 00:40:31 PDT
Created attachment 532574 [details] [diff] [review]
Allow to opt-in for telemetry reporting

This time with the preference checkbox added.
Comment 27 (dormant account) 2011-05-16 15:12:43 PDT
Mike,
I think limi's previous review is enough. We should probably point the link to http://www.mozilla.com/en-US/legal/privacy/firefox.html#telemetry while about:telemetry is being worked on. Then we can land this once the privacy policy is updated.
Comment 28 (dormant account) 2011-05-16 15:20:18 PDT
_shouldPromptTelemetry should check PREF_TELEMETRY_ENABLED in case it gets enabled another way.
Comment 29 Mike Hommey [:glandium] 2011-05-17 00:32:02 PDT
Created attachment 532889 [details] [diff] [review]
Allow to opt-in for telemetry reporting

Used http://www.mozilla.com/legal/privacy/firefox.html#telemetry (without
en-US in the url). I'm not sure we need to hardcode the language in there,
though the telemetry.properties file is going to be l10n'ed.
Comment 30 Benjamin Smedberg [:bsmedberg] 2011-05-18 06:32:54 PDT
Release drivers don't track new features until they are fixed, please renominated when this lands.
Comment 31 (dormant account) 2011-05-18 16:31:04 PDT
Comment on attachment 532889 [details] [diff] [review]
Allow to opt-in for telemetry reporting

To satisfy Sid's privacy feature review(https://wiki.mozilla.org/Privacy/Reviews/Telemetry#Follow-up_Tasks_and_tracking) we need to specify what kinds of data we collect right in the popup. Once we have about:telemetry we can simplify the popup and refer to about:telemetry for a complete list of data collected.
I propose:
telemetryText = Help improve Firefox by automatically reporting memory usage, performance, and responsiveness to Mozilla.

This is paraphrased from the privacy policy, I took out "user interface feature usage" stuff since that's not going to be measured in Firefox 6.
Comment 32 Liz Compton [:liz] 2011-05-18 18:16:41 PDT
Is there a reason it's not in question form any more? That seems better to me. Suggestion: "Would you like to help improve %S by automatically reporting memory usage, performance, and responsiveness to Mozilla?" Will there be a link to the privacy policy since there won't be about:telemetry initially?
Comment 33 (dormant account) 2011-05-18 23:00:08 PDT
(In reply to comment #32)
> Is there a reason it's not in question form any more? That seems better to
> me. Suggestion: "Would you like to help improve %S by automatically
> reporting memory usage, performance, and responsiveness to Mozilla?" Will
> there be a link to the privacy policy since there won't be about:telemetry
> initially?

Your version sounds good to me. Yes there will be a link, see the screenshot.
Comment 34 Axel Hecht [:Pike] 2011-05-19 05:24:03 PDT
Please don't put the link URL into the localized files. Just gonna cause us grief.

For the link, I'm afraid we'd want a pre and a post string for that. For en-US, linking the whole text might work, but I don't think that's gonna work for all locales. It should get some detailed Localization notes then, too.
Comment 35 Mike Hommey [:glandium] 2011-05-19 05:34:07 PDT
(In reply to comment #34)
> Please don't put the link URL into the localized files. Just gonna cause us
> grief.
> 
> For the link, I'm afraid we'd want a pre and a post string for that. For
> en-US, linking the whole text might work, but I don't think that's gonna
> work for all locales. It should get some detailed Localization notes then,
> too.

Looking at the geolocation prompt, which has something similar, there's only one entity (geolocation.learnMore), and the link URL is in prefs and localized using %LOCALE%. (though in our case, the privacy page apparently only exists in english)
Comment 36 Mike Hommey [:glandium] 2011-05-19 09:01:08 PDT
Created attachment 533663 [details] [diff] [review]
Allow to opt-in for telemetry reporting

Updated for comments 32 to 35
Comment 37 Liz Compton [:liz] 2011-05-19 10:58:01 PDT
I don't know whether this is relevant, but when we added the link to the privacy policy to the Firefox download button, Pascal explained how to do it correctly for localization purposes. We're planning to have the privacy policy translated into other languages. If I remember right, the privacy policy link from the download button will go the right language if the PP has been translated into that language, or to English if it hasn't been translated.
Comment 38 Mike Hommey [:glandium] 2011-05-19 11:08:49 PDT
Do you suggest we use %LOCALE% or that we keep going to http://www.mozilla.com/legal/privacy/firefox.html#telemetry ?
Comment 39 (dormant account) 2011-05-19 17:17:10 PDT
Gavin,
Can you review this soon? Would be nice to turn on telemetry over the weekend(assuming the other pieces fall into place).
Comment 40 Mike Hommey [:glandium] 2011-05-20 02:01:24 PDT
Pascal tells me http://www.mozilla.com/legal/privacy/firefox.html#telemetry is good.

During our conversation he brought up something that concerned me as well and that might be worth discussing further: do we really want the opt-in to show up to all our users ? Shouldn't we limit it to, say, nightly+aurora+beta users?
Comment 41 (dormant account) 2011-05-20 09:33:01 PDT
(In reply to comment #40)

> During our conversation he brought up something that concerned me as well
> and that might be worth discussing further: do we really want the opt-in to
> show up to all our users ? Shouldn't we limit it to, say,
> nightly+aurora+beta users?

Yes we want it for all users.
Comment 42 (dormant account) 2011-05-20 17:38:40 PDT
Security review of Telemetry bought up concerns about the infobar. Limi, or other UI people: Do users consider the infobar to be part of the webpage? 

We do not want to make it seem like the webpage is asking users to enable to telemetry.

Also it was suggested to add a pref for telemetry to the privacy panel.
Comment 43 Mike Hommey [:glandium] 2011-05-22 00:46:17 PDT
(In reply to comment #42)
> Also it was suggested to add a pref for telemetry to the privacy panel.

The patch adds a pref checkbox in Advanced>General, under crash reports.
Comment 44 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-05-23 17:29:06 PDT
Comment on attachment 533663 [details] [diff] [review]
Allow to opt-in for telemetry reporting

>diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js

>+const PREF_TELEMETRY_PROMPTED = "toolkit.telemetry.prompted";
>+const PREF_TELEMETRY_ENABLED  = "toolkit.telemetry.enabled";
>+const PREF_TELEMETRY_INFOURL  = "toolkit.telemetry.infoURL";

>+    if (this._shouldPromptTelemetry())
>+      this._showTelemetryNotification();

I think it would be simpler to merge these two (just call showTelemetryNotification unconditionally and have it do the check). Then you can also make the pref names local variables rather than global constants.

>+  _showTelemetryNotification: function BG__showTelemetryNotification() {

>+    var telemetryBundle = Services.strings.createBundle("chrome://browser/locale/telemetry.properties");

You can just put these strings in browser.properties and avoid adding a new bundle.

>+    let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText");
>+    description.appendChild(link);

The default styling for these on Mac (blue link on dark grey background) doesn't work very well. You'll need to style is specifically, by adding a specific class (telemetry-text-link?) and a corresponding style rule in the pinstripe browser.css. You can just copy geolocation-text-link.

>diff --git a/browser/components/preferences/advanced.xul b/browser/components/preferences/advanced.xul

> #ifdef MOZ_CRASHREPORTER
>             <checkbox id="submitCrashesBox" flex="1"
>                       oncommand="gAdvancedPane.updateSubmitCrashes();"
>                       label="&submitCrashes.label;" accesskey="&submitCrashes.accesskey;"/>
> #endif
>+#endif

Technically I think this should be outside of the HAVE_SHELL_SERVICE ifdef, but I guess you don't need to make that change here.

>diff --git a/browser/locales/en-US/chrome/browser/telemetry.properties b/browser/locales/en-US/chrome/browser/telemetry.properties

>+telemetryText = Would you like to help improve %S by automatically reporting memory usage, performance, and responsiveness to Mozilla?

You should probably put this string in a bundle so that you can substitute in vendorShortName from the branding bundle rather than hardcoding "Mozilla".

>+buttonLabel = Enable

"Enable" isn't an answer to the question being asked, which seems a little bit unusual.

>diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js

> // Telemetry test server to be used until the official one is public
> pref("toolkit.telemetry.server", "http://telemetry.allizom.org");

Is this server going to handle the load of reports from nightly users? Is its replacement going to handle the load of all Firefox users? Is this being tracked in bugs?

>+// Information page about telemetry
>+pref("toolkit.telemetry.infoURL", "http://www.mozilla.com/legal/privacy/firefox.html#telemetry");

This pref would be more logically placed in firefox.js

Overall this looks fine, but the first-run experience cost of adding a new notification bar really sucks. Are we actually going to get rid of the about:rights one before this ships? What are the plans for doing this in the future, if this actually is a "temporary solution" (per comment 2)?

I think this is a pretty large feature with broad impact and lots of moving parts, so trying to force it in at the very end of a trunk cycle (i.e. for Firefox 6) seems unwise.
Comment 45 Mike Hommey [:glandium] 2011-05-24 05:19:43 PDT
(In reply to comment #44)
> >+telemetryText = Would you like to help improve %S by automatically reporting memory usage, performance, and responsiveness to Mozilla?
> 
> You should probably put this string in a bundle so that you can substitute
> in vendorShortName from the branding bundle rather than hardcoding "Mozilla".

Mmmmm actually, unless the telemetry server pref is modified, this will still be sent to Mozilla, even if the vendorShortName is different...

> >+buttonLabel = Enable
> 
> "Enable" isn't an answer to the question being asked, which seems a little
> bit unusual.

AIUI, this is going to be changed to opt-out, so that will have to be changed anyways.
Comment 46 (dormant account) 2011-05-24 17:18:44 PDT
> Is this server going to handle the load of reports from nightly users? Is
> its replacement going to handle the load of all Firefox users? Is this being
> tracked in bugs?

https://wiki.mozilla.org/Platform/Features/Telemetry

> I think this is a pretty large feature with broad impact and lots of moving
> parts, so trying to force it in at the very end of a trunk cycle (i.e. for
> Firefox 6) seems unwise.

FF6 was an aspirational target that we missed on a number of fronts (ui, security reviews, etc). Hopefully this can land early in the FF7 cycle.
Comment 47 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-05-25 13:14:20 PDT
(In reply to comment #46)
> > Is this server going to handle the load of reports from nightly users? Is
> > its replacement going to handle the load of all Firefox users? Is this being
> > tracked in bugs?
> 
> https://wiki.mozilla.org/Platform/Features/Telemetry

I don't see any mention of server-side infra on that page, or in the linked bugs (apart possibly from bug 652656, which I can't see).
Comment 48 Jinghua zhang 2011-05-26 17:57:04 PDT
One question:

If this is also an opt-in feature for users, how do you plan to distribute it? 

One idea is since Test Pilot is shipped with Aurora and Beta by default, we can ask users to join Telemetry as "a study", which constantly or periodically send performance data to server. 

(We have a similar study called "A week in the life of a browser", which runs for a year, and send 1-week data back to our server every month. We can make Telemetry send back data every 24 hours, just without daily prompt on submission.)

In that case, users don't have to join more than one platform which ask them to opt in, review, submit or opt out.  

And data will be managed by the same metrics team server and peeps, and these performance data can also be correlated to user behavioral data, which will give us more profound understanding on "why"s. 

It is just an idea. Maybe I am missing something here in the big picture?
Comment 49 Mike Hommey [:glandium] 2011-05-26 23:34:23 PDT
This would make sense to correlate with test pilot, but we also want to collect telemetry from release users.
Comment 50 khagaroth 2011-05-30 13:31:42 PDT
(In reply to comment #45)
> ...
> AIUI, this is going to be changed to opt-out, so that will have to be
> changed anyways.

Wait, you are going to change that to opt-out? I can already see the paranoid crowd going all berserk over this. Although, they will probably complain even if it stays opt-in.
Comment 51 (dormant account) 2011-06-01 10:39:04 PDT
(In reply to comment #47)
> (In reply to comment #46)
> > > Is this server going to handle the load of reports from nightly users? Is
> > > its replacement going to handle the load of all Firefox users? Is this being
> > > tracked in bugs?
> > 
> > https://wiki.mozilla.org/Platform/Features/Telemetry
> 
> I don't see any mention of server-side infra on that page, or in the linked
> bugs (apart possibly from bug 652656, which I can't see).

652656 is privacy policy. bug 655343 is for serverside.
Comment 52 Mike Hommey [:glandium] 2011-06-02 01:25:52 PDT
Created attachment 536837 [details] [diff] [review]
Allow to opt-in for telemetry reporting

Refreshed for review comments. What I didn't change however:
- the submitCrashesBox checkbox is not moved outside of the HAVE_SHELL_SERVICE ifdef
- toolkit.telemetry.infoURL is not moved in firefox.js. It ought to default to about:telemetry later (probably without even a pref by then)

The plan is to get this opt-in for now and make it opt-out later. Not entirely sure how we'll be making it opt-out later, though.
Comment 53 Mike Hommey [:glandium] 2011-06-02 01:32:32 PDT
Pushed to try: http://tbpl.mozilla.org/?tree=Try&rev=75f57aa58e8c (most notably to have mac builds to test the link visibility)
Comment 54 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-02 16:48:53 PDT
Comment on attachment 536837 [details] [diff] [review]
Allow to opt-in for telemetry reporting

>diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js

>+  _showTelemetryNotification: function BG__showTelemetryNotification() {

>+      // Remove the notification on which the user clicked
>+      notification.parentNode.removeCurrentNotification(true);

removeNotification(notification, true)

>diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties

>+telemetryButtonLabel = Yes
>+telemetryButtonAccessKey = Y

I think this notification should include a "No" button, even though it's redundant with the close button. We've seen with the popupnotifications that some users expect to have to explicitly select something, and don't understand that that's equivalent to just closing the notification (or don't notice the close button).

I think we need a concrete action plan to avoid shipping a browser that gives you two notifications bars on first run (whether that means removing about:rights notification, or doing telemetry opt-in differently).
Comment 55 (dormant account) 2011-06-02 17:09:58 PDT
(In reply to comment #54)

> I think we need a concrete action plan to avoid shipping a browser that
> gives you two notifications bars on first run (whether that means removing
> about:rights notification, or doing telemetry opt-in differently).

What if [for now] we only show telemetry opt-in if about:rights isn't shown?
Comment 56 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-02 17:14:14 PDT
Hmm, I guess that would defer showing the telemetry notification until the second run for new users. I suppose that's better, but it's still not ideal.
Comment 57 Liz Compton [:liz] 2011-06-02 17:30:31 PDT
Adding Harvey so he can comment on the idea of not showing about:rights.
Comment 58 Mike Hommey [:glandium] 2011-06-02 17:44:06 PDT
Wasn't there a bug for the replacement of the about:rights prompt with some content on the first page shown ?
Comment 59 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-02 17:48:22 PDT
We should discuss about:rights removals in another bug, this one is big enough :)
Comment 60 Justin Dolske [:Dolske] 2011-06-02 17:50:24 PDT
I'd hate to block this bug on removing about:rights. Also, having this infobar shown on first-run is at least as bad as about:rights... It's the user's first experience with the browser, they're already being overwhelmed with new things, and asking them to make a decision about performance data right then seems ill-timed.

How about we only show this info bar on, say, the 10th launch of Firefox? That avoids both issues. [Also, in the future, we could offer to show users an example of their actual data that would be submitted.]
Comment 61 Mike Hommey [:glandium] 2011-06-02 18:19:18 PDT
How about we only show this info bar for people who are upgrading?
Comment 62 (dormant account) 2011-06-07 14:39:46 PDT
Created attachment 537872 [details] [diff] [review]
do not show telemetry notification when about:rights notification is shown
Comment 63 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-07 16:59:56 PDT
Comment on attachment 537872 [details] [diff] [review]
do not show telemetry notification when about:rights notification is shown

s/;/:/
Comment 65 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-23 15:33:31 PDT
(In reply to comment #64)
> http://hg.mozilla.org/integration/mozilla-inbound/rev/9ad2c67333ba
> http://hg.mozilla.org/integration/mozilla-inbound/rev/865bd171fc46

I backed these out because none of the review comments had been addressed.
Comment 66 Mike Hommey [:glandium] 2011-06-23 19:21:45 PDT
Created attachment 541581 [details] [diff] [review]
Allow to opt-in for telemetry reporting.

Addressed comment 54, and folded both patches. Requesting review because I'm not entirely sure the No button is defined the right way. Not defining an empty callback makes the notification do nothing when pressing the button ; I wonder if there's a better way to make it close than to define an empty callback.
Comment 67 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-23 19:54:15 PDT
Comment on attachment 541581 [details] [diff] [review]
Allow to opt-in for telemetry reporting.

>diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js

>   _onBrowserStartup: function BG__onBrowserStartup() {

>+      // Only show telemetry notification when about;rights notification is not shown.

about:rights

>+  _showTelemetryNotification: function BG__showTelemetryNotification() {

>+    try {
>+      // If the user hasn't already been prompted, ask if they want to
>+      // send telemetry data.
>+      if (Services.prefs.getBoolPref(PREF_TELEMETRY_PROMPTED) ||
>+          Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED))

You actually need to reverse the order of these to have the intended effect (getting _ENABLED will never throw, but _PROMPTED might).
Comment 68 Mike Hommey [:glandium] 2011-06-23 19:57:45 PDT
Created attachment 541583 [details] [diff] [review]
Allow to opt-in for telemetry reporting.

Updated with last review comment
Comment 69 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-06-23 21:00:29 PDT
about;rights is still there - it's the typo that won't die! :)
Comment 70 Mike Hommey [:glandium] 2011-06-23 21:14:54 PDT
Created attachment 541597 [details] [diff] [review]
Allow to opt-in for telemetry reporting.

oops
Comment 71 Dão Gottwald [:dao] 2011-06-23 22:40:07 PDT
(In reply to comment #1)
> There are two ui parts needed here:

> b) about:telemetry UI
> This is a superset of the about:histograms in chrome(and above link), but
> would also include metadata sent in the Telemetry ping(ie versions,
> platform, cpu type), current telemetry opt-in status and a button to
> opt-in/out.

This should be a separate bug.
Comment 73 Marco Bonardo [::mak] 2011-06-25 03:08:40 PDT
http://hg.mozilla.org/mozilla-central/rev/2efc1f37ce92
Comment 74 AndreiD[QA] 2011-07-13 06:42:47 PDT
Verified Fixed on:
-> Windows: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110712 Firefox/8.0a1
-> Linux: Mozilla/5.0 (X11; Linux x86_64; rv:8.0a1) Gecko/20110712 Firefox/8.0a1
-> Mac: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0a1) Gecko/20110713 Firefox/8.0a1

The opt-in UI for Telemetry has been implemented and is described by the following user case scenarios:
1. Restart Firefox after a first run (with a clean install or fresh profile)
2. Notice that instead of the know-your-rights popup during visible in the first run a submit-performance-data popup is visible asking:
"Would you like to help improve Nightly by automatically reporting memory usage, performance, and responsiveness to Mozilla?"
3. Notice the "Yes" and "No" buttons, as well as the close button.
4. Notice the "Learn more" link, which, if clicked launches a new tab with the page this page visible: http://www.mozilla.com/en-US/legal/privacy/firefox.html#telemetry
5. The user preference to submit or not performance data can be changed any time in the menu: Tools-> Options -> Advanced Tab -> "Submit performance data".
6. By default, the option to submit data is disabled.
Comment 75 Asa Dotzler [:asa] 2011-07-17 22:41:32 PDT
(In reply to comment #74)
Thank you for the great verification Andrei.

Moving tracking status to Firefox 7 because this didn't make the train for 6.

Note You need to log in before you can comment on or make changes to this bug.