Closed Bug 1019298 Opened 6 years ago Closed 6 years ago

Use Telemetry to count which directory links were shown in which tile position

Categories

(Firefox :: New Tab Page, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 32
Iteration:
33.2

People

(Reporter: Mardak, Assigned: Mardak)

References

()

Details

Attachments

(3 files)

While bug 975235 is being set up to send impression data to the server in bug 995262, we can start getting per-tile impression data through telemetry (note: not click data).

There's a caveat that we'll only record links data for the first 9 links shown in the first 9 positions. So if we end up with different links data down the line, this data will need some extra care when analyzing as we won't be able to differentiate which list the link came from.
Flags: firefox-backlog+
Attached image v1 screenshot
I happened to have wired (#2/sponsored), wikipedia (#5/organic), bbc (#8/sponsored) shown when I opened the new tab page.
Attached patch v1Splinter Review
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #8432919 - Flags: review?(georg.fritzsche)
Attachment #8432919 - Flags: review?(adw)
Comment on attachment 8432919 [details] [diff] [review]
v1

Review of attachment 8432919 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/newtab/page.js
@@ +211,5 @@
>        if (site) {
>          site.captureIfMissing();
> +
> +        // Record which tile index a directory link was shown
> +        let {directoryIndex, type} = site.link;

This won't emit any kind of annoying warning about directoryIndex not being defined for links that don't define it, right?  I'm thinking especially of warnings dumped to the terminal in debug builds.  It's fine for not all links to define it, but if there is such a warning, please write this in a way that doesn't emit it.
Attachment #8432919 - Flags: review?(adw) → review+
(In reply to Drew Willcoxon :adw from comment #3)
> > +        let {directoryIndex, type} = site.link;
> This won't emit any kind of annoying warning about directoryIndex not being
> defined for links that don't define it, right?
I'm assuming you're talking about these types of strict warnings?

JavaScript strict warning: chrome://browser/content/tabbrowser.xml, line 1461: reference to undefined property params.referrerURI


I tried doing both ".. = site.link.directoryIndex" and "{directoryIndex} = site.link" and neither result in the warnings... ?
Yeah, good then.  I truly wasn't sure if there would be, so I wanted to make sure there isn't. :-)
Comment on attachment 8432919 [details] [diff] [review]
v1

Review of attachment 8432919 [details] [diff] [review]:
-----------------------------------------------------------------

The histogram usage seems a little awkward here - maybe you could ask in #perf if there is a better option?
Otherwise this looks good to me.
Attachment #8432919 - Flags: review?(georg.fritzsche) → feedback+
The feedback from #perf (irving) was perhaps we should use "simple measurement" and store a JSON string with the appropriate data we want as the telemetry histograms probably won't show the results in a way we want anyway, so we'll need some special processing anyway.

Also, with an average of 4 newtabs per session and that this would only record an impression if Directory links were shown, it seems to be okay to not aggregate on the client and append additional pings. This would be more in line with bug 975235.
To be clear, we would want to start using "simple measurement" to add in the extra data that we are discussing in bug 975235 (e.g., list id, scores, grid size).
Blocks: 975235
https://hg.mozilla.org/mozilla-central/rev/f3bc97e83968
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Whiteboard: p=0 s=it-32c-31a-30b.3 [qa?]
Whiteboard: p=0 s=it-32c-31a-30b.3 [qa?] → p=0 s=33.1 [qa?]
Whiteboard: p=0 s=33.1 [qa?] → p=0 s=33.1 [qa+]
QA Contact: petruta.rasa
In order to verify this, I opened newtab page and removed some sponsored tiles. I reloaded the page for 3 times. The ones left were: 1. facebook, 2. mozilla, 3. Wikipedia, 4.bbc, 5.Webmaker.
The only data I have in about:telemetry is:

NEWTAB_PAGE_DIRECTORY_AFFILIATE_SHOWN
3 samples, average = 0, sum = 0
3
0 1
NEWTAB_PAGE_DIRECTORY_ORGANIC_SHOWN
3 samples, average = 0, sum = 0
3
0 1
NEWTAB_PAGE_DIRECTORY_SPONSORED_SHOWN
3 samples, average = 0, sum = 0
3
0 1
NEWTAB_PAGE_SHOWN
3 samples, average = 1, sum = 3
  3
0 1

Mardak, could you please let me know how this data can be interpreted? Why only facebook appears as affiliate, organic and sponsored and what happened with the other tiles? Thank you!
Flags: needinfo?(edilee)
A couple things look wrong. All 3 of those directory_*_shown probes should have been non-0 -- this functionality was added and tested in bug 972936. The new probes added in this bug for directory_link*_shown are not being reported at all ?
Flags: needinfo?(edilee)
(In reply to Ed Lee :Mardak from comment #12)
> A couple things look wrong. All 3 of those directory_*_shown probes should
> have been non-0 -- this functionality was added and tested in bug 972936.
> The new probes added in this bug for directory_link*_shown are not being
> reported at all ?
It seems that this kind of data is produced when restarting the browser having about:telemetry and about:newtab pages in view. Opening (or refreshing) the existing new tab page shows only the 3 directory_*_shown with 0 probes. Opening a new tab page displays the correct data. (I restarted the browser to obtain new data each time)

I managed to verify the directory_link*_shown data using latest Aurora 32.0a2 20140615004003 under Win 7 64-bit, Ubuntu 32-bit and Mac OSX 10.9.3: the data indicates correctly the tiles position: at startup, after removing tiles from several positions, after changing  the number of rows and columns in about:config.

The only thing I found so far is that directory_link*_shown is displayed even when not all the tiles are in view - the browser is in window mode and only a part of the tiles can fit the screen.

Should I file a new bug for this? Are there any other scenarios I should test? Thank you!
Iteration: --- → 33.2
QA Whiteboard: [qa+]
Whiteboard: p=0 s=33.1 [qa+]
It seems no additional information was received for a few weeks now. Marco, how should we proceed with this? Should we make the call here?
Flags: needinfo?(mmucci)
(In reply to Florin Mezei, QA (:FlorinMezei) from comment #14)
> It seems no additional information was received for a few weeks now. Marco,
> how should we proceed with this? Should we make the call here?

Hi Florin, let's verify for now and Petruta can file a new bug as mentioned in comment #13.  Thanks.
Flags: needinfo?(mmucci)
Yes, please file a new bug to track the visibility or not of a tile. Thanks
Flags: needinfo?(edilee)
Marking as verified as per comment 13. Logged bug 1034502 for the remaining issue.
Status: RESOLVED → VERIFIED
QA Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.