Closed
Bug 975235
Opened 11 years ago
Closed 10 years ago
Send click pings for Directory Tiles (including which link, tile, other metadata)
Categories
(Firefox :: New Tab Page, defect)
Firefox
New Tab Page
Tracking
()
VERIFIED
FIXED
Firefox 33
People
(Reporter: jboriss, Assigned: mzhilyaev)
References
()
Details
(Whiteboard: [tiles] p=5 s=33.1 [qa-])
Attachments
(1 file, 3 obsolete files)
16.06 KB,
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
Counting of tile impressions and clicks will give us data to determine the usefulness and interaction rate of specific Tiles as well as positions of tiles.
Comment 1•11 years ago
|
||
There's already some work being done to count those in bug 975570 to do telemetry on them.
Updated•11 years ago
|
Whiteboard: [tiles] → [tiles] p=0
Updated•11 years ago
|
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Comment 2•11 years ago
|
||
Mass-move to Firefox::New Tab Page.
Filter on new-tab-page-component.
Component: Tabbed Browser → New Tab Page
Comment 3•11 years ago
|
||
Initially, we'll be sending impression data onPageFirstVisible and click data onClick to a tiles-metrics server separate from Telemetry or FHR. Both event handlers already have telemetry probes but only report back aggregates or an index without specific tile data.
We'll be including tile data such as an id (unique for a given url/title/image/bcColor(?)/type(?) tuple), index, frecency/score. We'll also want tile-independent data such as a list-id/version and locale (if it's not embedded in the list id).
A tile's id could be mozilla-1 that is updated appropriately when the url/title/image change, or it could be a hash of those values that the client could generate.
For the list-id, we'll similarly need to either maintain ids, e.g., en-US-1, or dynamically generate it by hashing the whole file.
For the hashing, we can use:
Cu.import("resource://services-crypto/utils.js");
CryptoUtils.sha1(JSON.stringify(tileObject || directoryLinksObject))
Updated•10 years ago
|
Assignee: nobody → tspurway
Updated•10 years ago
|
Assignee: tspurway → mzhilyaev
Summary: Add counting of Tile impressions, clicks (inc. which tile and position) → Send impression and click pings for Directory Tiles (inc. which tile and position)
Assignee | ||
Comment 4•10 years ago
|
||
Following Tim's conversation these are clarifications:
1) tile IDs should be generated by back-end and attached to each tile in the list
2) stats are collected for directory tiles only (history tiles are not touched)
3) list-id, version and locale can come with JSON directory file
4) browser aggregates impression/click stats for each tile and ships aggregate batch to a server on directory request.
5) browser clears aggregate batch upon successful response from server
6) browser needs to timestamp each impression/click observed, and timestamp the batch before sending to the server
Assignee | ||
Comment 5•10 years ago
|
||
Following Ed's advice, the simpler way is to send impression/click as they happen.
1) browser sends impressions upon newtab load
2) browser sends clicks if they happen
3) is timestamping needed?
Comment 6•10 years ago
|
||
(In reply to maxim zhilyaev from comment #4)
> 1) tile IDs should be generated by back-end and attached to each tile in the
> list
Instead of having an id explicitly attached to each tile as part of the json, we know given a unique list id and the link's index (in the json's list) which link it is.
So the impression or click data only needs to report back a list id and an array of link indices.
E.g., impression ping: {
listId: 44b2b82fde95c,
gridCols: 3,
gridRows: 3,
shownTiles: [{
listIndex: 0,
tilePosition: 2,
score: 1000
}, {
listIndex: 4,
tilePosition: 3,
score: 1000
}, {
listIndex: 10,
tilePosition: 0,
score: 1234
}
}
where listIndex is the original index of the link in the json, tilePosition is where it's shown on the grid, score is the computed frecency.
The same thing can be used for click ping except "shownTiles" array could be just clickedTile object.
Comment 7•10 years ago
|
||
With bug 1019298 covering impressions through telemetry for non-Release, let's focus this bug on just sending click pings.
Summary: Send impression and click pings for Directory Tiles (inc. which tile and position) → Send click pings for Directory Tiles (including which link, tile, other metadata)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8435395 -
Flags: review?(adw)
Comment 9•10 years ago
|
||
maksik: https://tbpl.mozilla.org/?tree=Try&rev=00177db435d9 seems to be good
Comment 10•10 years ago
|
||
mconnor points to a jsapi that can send a ping in a smarter way:
https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon
We could use navigator.sendBeach from the newtab page context although the current patch sends the ping from DirectoryLinksProvider.jsm
Comment 11•10 years ago
|
||
Comment on attachment 8435395 [details] [diff] [review]
v1. report directory tiles clicks
mconnor suggested we include other actions other than link clicks: e.g., block, pin
Attachment #8435395 -
Flags: review?(adw)
Comment 12•10 years ago
|
||
Report click actions including link, block, pin, unpin, sponsored
Attachment #8435395 -
Attachment is obsolete: true
Attachment #8436198 -
Flags: review?(adw)
Updated•10 years ago
|
Attachment #8436198 -
Attachment description: wip v2 (no json) → v2
Comment 13•10 years ago
|
||
Fixes an issue with tests starting too soon before links populate on the hidden page
Attachment #8436198 -
Attachment is obsolete: true
Attachment #8436198 -
Flags: review?(adw)
Attachment #8436277 -
Flags: review?(adw)
Comment 14•10 years ago
|
||
Comment on attachment 8436277 [details] [diff] [review]
v3
Ah nope. Seems like the directory links aren't being loaded before the tab is shown still. Might be simplest to turn off preload. https://tbpl.mozilla.org/?tree=Try&rev=45048ed2409c
Attachment #8436277 -
Flags: review?(adw)
Comment 15•10 years ago
|
||
Attachment #8436277 -
Attachment is obsolete: true
Attachment #8436317 -
Flags: review?(adw)
Comment 16•10 years ago
|
||
Comment on attachment 8436317 [details] [diff] [review]
v4
Review of attachment 8436317 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/modules/DirectoryLinksProvider.jsm
@@ +264,5 @@
> + reportClickEndPoint = Services.prefs.getCharPref(PREF_DIRECTORY_REPORT_CLICK_ENDPOINT);
> + telemetryEnabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED);
> + }
> + catch (ex) {
> + Cu.reportError("Error accessing preferences for click report: " + ex);
I don't think reportError is necessary.
@@ +268,5 @@
> + Cu.reportError("Error accessing preferences for click report: " + ex);
> + return;
> + }
> +
> + if (telemetryEnabled == false) {
Nit: if (!telemetryEnabled)
@@ +280,5 @@
> + ["link", link.directoryIndex],
> + ["action", action],
> + ["tile", tileIndex],
> + ["score", link.frecency],
> + ["pin", +pinned],
Whoa, I didn't know there is a unary + operator. Cool.
Attachment #8436317 -
Flags: review?(adw) → review+
Comment 17•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Updated•10 years ago
|
Whiteboard: [tiles] p=0 → [tiles] p=0 s=33.1 [qa?]
Comment 18•10 years ago
|
||
marking qa-, since this is flagged in-testsuite+. If anyone feels there should be manual QA here, feel free to change to qa+
Whiteboard: [tiles] p=0 s=33.1 [qa?] → [tiles] p=0 s=33.1 [qa-]
Updated•10 years ago
|
Status: RESOLVED → VERIFIED
Comment 19•10 years ago
|
||
Were privacy issues discussed/approved wrt such telemetry pings?
Flags: needinfo?(edilee)
Comment 20•10 years ago
|
||
We confirmed that these click pings cannot be sent to telemetry servers, so that's why there's a separate endpoint. The sending is conditional of the user having telemetry turned on. Right now this behavior is only turned on for Nightly and Aurora.
Flags: needinfo?(edilee)
Whiteboard: [tiles] p=0 s=33.1 [qa-] → [tiles] p=5 s=33.1 [qa-]
Comment 21•10 years ago
|
||
Comment on attachment 8436317 [details] [diff] [review]
v4
Review of attachment 8436317 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/app/profile/firefox.js
@@ +1471,4 @@
> pref("browser.newtabpage.directory.source", "chrome://global/content/directoryLinks.json");
>
> +// endpoint to send newtab click reports
> +pref("browser.newtabpage.directory.reportClickEndPoint", "https://tiles.up.mozillalabs.com/ping/click");
Given that this is sending another bit of private data out, even to a non-mozilla.org/com address, is there a switch for users to turn this off in "Data Choices" prefs?
I guess that request will probably come up soon if we don't have a plan for it.
Comment 22•10 years ago
|
||
So am I correct in understanding that in this bug we're reporting users' clicks on specific directory tiles to Mozilla's non-Telemetry servers, but only if the Telemetry reporting pref is set to true?
Since it's using Telemetry's consent mechanism, it seems like it should follow the same privacy rules (no URIs, no tracking of user browsing) as Telemetry, no? Could we ask the Privacy team for their blessing?
Comment 23•10 years ago
|
||
(In reply to Ed Lee :Mardak from comment #20)
> Right now this behavior is only turned on for Nightly and Aurora.
But will be on beta in 6 weeks, right?
Comment 24•10 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #23)
> (In reply to Ed Lee :Mardak from comment #20)
> > Right now this behavior is only turned on for Nightly and Aurora.
>
> But will be on beta in 6 weeks, right?
If there's a real privacy concern here, then we should be concerned also for nightly and aurora users who, while willing to try experimental builds, didn't sign up for sending their advertising clicks back to us (even if to some degree it might be expected from such system).
Comment 25•10 years ago
|
||
(In reply to Ed Lee :Mardak from comment #20)
> The sending is conditional of the user having telemetry turned on. Right
> now this behavior is only turned on for Nightly and Aurora.
Ah, I got what you meant after looking at the code, but it's not exactly clear. So here is the clearer explanation: The sending is conditional of the user having telemetry turned on. Telemetry is on by default on nightly and aurora. But don't we prompt users on the first run on beta/release?
Comment 26•10 years ago
|
||
(In reply to Avi Halachmi (:avih) from comment #24)
> If there's a real privacy concern here, then we should be concerned also for
> nightly and aurora users who, while willing to try experimental builds,
> didn't sign up for sending their advertising clicks back to us (even if to
> some degree it might be expected from such system).
Note I wasn't assessing anything about privacy, I was trying to understand the assumption behind that sentence (as in, was it meaning that it would stick to nightly/aurora, or ride the trains. Code says the latter)
You need to log in
before you can comment on or make changes to this bug.
Description
•