Closed Bug 1824842 Opened 2 years ago Closed 2 years ago

Record the advertiser name and tile ID for sponsored tile impressions and clicks

Categories

(Firefox :: New Tab Page, task, P1)

task

Tracking

()

VERIFIED FIXED
114 Branch
Tracking Status
firefox114 --- verified

People

(Reporter: lina, Assigned: ttran)

References

Details

(Whiteboard: [disco])

Attachments

(3 files)

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 and tile_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! 🎊

Severity: -- → N/A
Priority: -- → P1
Whiteboard: [disco]
Group: mozilla-employee-confidential
Attached file request.md
Attachment #9326995 - Flags: data-review?(mmccorquodale)

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! 😊

Flags: needinfo?(ttran)
Attached file request.md
Flags: needinfo?(ttran)

updated the request.md attachment, please ignore the second one

Comment on attachment 9326995 [details] request.md # Request for data collection review form **All questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection.** 1) What questions will you answer with this data? We will have context of which sponsored tile had an impression or was clicked 2) Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements? Some example responses: * Accurate engagement metrics for sponsored tiles are revenue-critical 3) What alternative methods did you consider to answer these questions? Why were they not sufficient? Without advertiser and tile id we are not able to attribute sponsored tiles to our partners. 4) Can current instrumentation answer these questions? Yes, but it's all collected in legacy telemetry at the moment. 5) List all proposed measurements and indicate the category of data collection for each measurement, using the [Firefox data collection categories](https://wiki.mozilla.org/Data_Collection) found on the Mozilla wiki. **Note that the data steward reviewing your request will characterize your data collection based on the highest (and most sensitive) category.** <table> <tr> <td>Measurement Name</td> <td>Measurement Description</td> <td>Data Collection Category</td> <td>Tracking Bug #</td> </tr> <tr> <td> topsites.impression.advertiser_name</td> <td> The title of the impressed tile</td> <td>3</td> <td>https://bugzilla.mozilla.org/show_bug.cgi?id=1824842</td> </tr> <tr> <td>topsites.impression.advertiser_id</td> <td> The unique id of the impressed tile provided by Contile</td> <td>3</td> <td>https://bugzilla.mozilla.org/show_bug.cgi?id=1824842</td> </tr> <tr> <td>topsites.click.advertiser_name</td> <td> The title of the clicked title </td> <td>3</td> <td>https://bugzilla.mozilla.org/show_bug.cgi?id=1824842</td> </tr> <tr> <td>topsites.click.advertiser_id</td> <td> The unique id of the clicked tile provided by Contile</td> <td>3</td> <td>https://bugzilla.mozilla.org/show_bug.cgi?id=1824842</td> </tr> </table> 6) Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way. * This collection is documented in the Glean Dictionary at https://dictionary.telemetry.mozilla.org/ 7) How long will this data be collected? Choose one of the following: * The NewTab working group will permanently monitor this data. 8) What populations will you measure? * We will measure all channels, countries and locales. 9) If this data collection is default on, what is the opt-out mechanism for users? * These collections are Glean. The opt-out can be found in the product's preferences. 10) Please provide a general description of how you will analyze this data. * This data will be correlated with existing new tab telemetry to distingush between Ad Market Place and other advertiser partners. 11) Where do you intend to share the results of your analysis? * The results would be collected into a looker dashboard 12) Is there a third-party tool (i.e. not Glean or Telemetry) that you are proposing to use for this data collection? If so: * No

Comment on attachment 9326995 [details]
request.md

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Is the data collection request for default-on or default-off?
    Default on.

  6. Does the instrumentation include the addition of any new identifiers?
    No new identifiers.

  7. Is the data collection covered by the existing Firefox privacy notice?
    Yes.

  8. Does the data collection use a third-party collection tool?
    No.


data-review +

Attachment #9326995 - Flags: data-review?(mmccorquodale) → data-review+
Pushed by ttran@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d21cf01de919 Record the advertiser name and tile ID for sponsored tile impressions and clicks r=lina
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch

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}"
}

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: