Record the advertiser name and tile ID for sponsored tile impressions and clicks
Categories
(Firefox :: New Tab Page, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | verified |
People
(Reporter: lina, Assigned: ttran)
References
Details
(Whiteboard: [disco])
Attachments
(3 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
3.27 KB,
text/plain
|
mmccorquodale
:
data-review+
|
Details |
3.29 KB,
text/plain
|
Details |
This bug covers adding the advertiser name and tile ID to the topsites.impression
and topsites.click
events for sponsored tiles.
I'm marking it moco-confidential for now, because it's sensitive data that depends on the outcome of the data review thread that :chutten started.
As part of this, I think we'll want to add:
advertiser
andtile_id
keys to the Glean events for impressions and clicks.- Instrumentation to
TelemetryFeed.jsm
that records these keys for sponsored tiles. - Tests covering the new instrumentation ☺️
Here are some things I found really helpful when adding instrumentation for organic tiles in bug 1820707:
- The metric types reference from the Glean book.
- Other metrics in the
metrics.yaml
file, for inspiration. - Bug 1766887, which initially added the
newtab
ping and metrics. - Some discussion in the patch for bug 1688698 about the different telemetry instrumentation for Pocket ("Discovery Stream") sponsored vs. non-Pocket sponsored and organic tiles.
- The Data Collection page on the Mozilla wiki with an explanation of the data review process, and links to the forms.
- Bug 1733443, comment 3 for an explanation of how the potentially sensitive data review (step 3) is handled.
When I'm hacking on New Tab locally, I use:
./mach npm run testmc:unit --prefix=browser/components/newtab
to run the Node-based unit tests for New Tab../mach npm run bundle --prefix=browser/components/newtab
to rebuild the bundle—only needed once you're ready to push your changes.
Running the Node tests can take quite a while, and I didn't find (after like a minute; I didn't look very hard 😅) a way to make Karma run just a subset. But I found that editing this line with just the test files I wanted to run, to something like this:
const files = req.keys().filter(file => file.endsWith("/TopSites.test.jsx"));
...worked perfectly, so I didn't poke further.
I had great results with using ./mach try auto
to run the tests on automation, too.
We can't use artifact builds when adding / changing Glean metrics yet, but I think we'll be able to again once bug 1820241 is fixed! 🎊
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 3•2 years ago
•
|
||
Tif, for completeness, could you please update the data collection review form with the new names, and category from 3 => 2.5? (I was wrong about that one). advertiser
=> advertiser_name
, tile_id
=> advertiser_id
. Thank you! 😊
updated the request.md attachment, please ignore the second one
Comment 7•2 years ago
|
||
Comment on attachment 9326995 [details]
request.md
-
Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?
Yes, this will be documented in the Glean dictionary. -
Is there a control mechanism that allows the user to turn the data collection on and off?
Yes, users can opt out of telemetry collection. -
If the request is for permanent data collection, is there someone who will monitor the data over time?
This will be monitored by the New Tab team. -
Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?
Category 2, interaction data. -
Is the data collection request for default-on or default-off?
Default on. -
Does the instrumentation include the addition of any new identifiers?
No new identifiers. -
Is the data collection covered by the existing Firefox privacy notice?
Yes. -
Does the data collection use a third-party collection tool?
No.
data-review +
Comment 9•2 years ago
|
||
bugherder |
Comment 10•2 years ago
|
||
I have verified this issue on the latest Nightly 114.0a1 build (Build ID: 20230507095340) on Windows 10 x64, macOS 13.1 and Linux Mint 20.
- The impression and click telemetry are correctly registered for Sponsored Tiles in Glean. Here is an example:
{
"timestamp": 9,
"category": "topsites",
"name": "impression",
"extra": {
"is_sponsored": "true",
"advertiser_name": "expedia",
"position": "1",
"tile_id": "74925",
"newtab_visit_id": "{13ce282c-292d-4ac2-89a8-7fc63e084284}"
}
{
"timestamp": 4423,
"category": "topsites",
"name": "click",
"extra": {
"tile_id": "74925",
"position": "1",
"is_sponsored": "true",
"advertiser_name": "expedia",
"newtab_visit_id": "{13ce282c-292d-4ac2-89a8-7fc63e084284}"
}
Description
•