Closed Bug 1503685 Opened 6 years ago Closed 6 years ago

Add home_extension_id and newtab_extension_id info to PAGE_TAKEOVER_DATA telemetry ping

Categories

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

defect

Tracking

()

VERIFIED FIXED
Firefox 65
Iteration:
65.2 - Nov 16
Tracking Status
firefox64 - verified
firefox65 --- verified

People

(Reporter: rrosario, Assigned: rrosario)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

This adds to the value of the telemetry ping implemented in bug 1494101.

In addition to the category of the home page custom URL we are already sending, we should send whether this pref is being controlled by an extension (as opposed to being set by the user or a legacy addon directly).
We already have "web-extension" in the primary AS_ENABLED ping.  What we should record is the ID of the extension that is controlling the new tab or homepage, if "web-extension" is set.
(In reply to Mike Connor [:mconnor] from comment #1)
> We already have "web-extension" in the primary AS_ENABLED ping.  What we
> should record is the ID of the extension that is controlling the new tab or
> homepage, if "web-extension" is set.

Actually, I found that if a web extension is setting the home page to any url that doesn't start with "moz-extension://" then it is reported as Custom URL and not web-extension. See https://searchfox.org/mozilla-central/source/browser/components/nsBrowserGlue.js#697

So, this will give us a better idea of how many of the Custom URLs are web extension controlled. The ID would be easy to add if it can pass data-review :)
Blocks: 1492953
Instead of a boolean, we will send the web extension id of any extension that is controlling the home page and/or newtab page. We already send telemetry with all the addons/extensions a user has, so this wouldn't be new data.
Summary: Add "extension controlled" info to PAGE_TAKEOVER_DATA telemetry ping → Add home_extension_id and newtab_extension_id info to PAGE_TAKEOVER_DATA telemetry ping
Hi  :francois, this is additional web extension id data that will ride on the telemetry ping from Bug 1494101. Here is the updated documentation for the ping:
https://github.com/mozilla/activity-stream/pull/4541/files#diff-f9d20d6688eef2754298456e5d5b836bR34

Please let me know if you have any other questions.
Attachment #9021843 - Flags: review?(francois)
Iteration: 65.1 (Nov 2) → 65.2 (Nov 16)
Comment on attachment 9021843 [details]
Data review request form

1) Is there or will there be **documentation** that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes, in https://github.com/mozilla/activity-stream/blob/master/docs/v2-system-addon/data_events.md.

2) Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, either the telemetry setting in about:preferences or the Activity Stream telemetry setting in about:config.

3) If the request is for permanent data collection, is there someone who will monitor the data over time?**

Yes, Ricky Rosario and Nan Jiang.

4) Using the **[category system of data types](https://wiki.mozilla.org/Firefox/Data_Collection)** on the Mozilla wiki, what collection type of data do the requested measurements fall under?  **

Category 1.

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

Default on, all channels.

6) Does the instrumentation include the addition of **any *new* identifiers** (whether anonymous or otherwise; e.g., username, random IDs, etc.  See the appendix for more details)?

No.

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

Yes.

8) Does there need to be a check-in in the future to determine whether to renew the data?

No, permanent.
Attachment #9021843 - Flags: review?(francois) → review+
Commit pushed to master at https://github.com/mozilla/activity-stream

https://github.com/mozilla/activity-stream/commit/d6b4c72a323640211dcac0c310847202538487f4
Fix Bug 1503685 - Add "extension controlled" info to PAGE_TAKEOVER_DATA telemetry ping (#4541)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Blocks: 1505929
Steps for QA Verification:

1- Install the Bing Homepage addon (or any other addon that takes over the homepage): https://addons.mozilla.org/en-US/firefox/addon/binghomepage/

2- Enable "browser.newtabpage.activity-stream.telemetry" and "browser.ping-centre.log" in about:config

3- Restart the browser

4- Open the browser console and verify there is a PAGE_TAKEOVER_DATA ping with "home_extension_id" set. For example:
TELEMETRY PING: {"locale":"en-US","topic":"activity-stream","client_id":"3e0133ba-f9e4-d645-b509-eb2a21d3e05f","version":"64.0","release_channel":"default","addon_version":"20181113181929","user_prefs":63,"action":"activity_stream_user_event","event":"PAGE_TAKEOVER_DATA","value":{"home_url_category":"search-engine-other-tag","home_extension_id":"{cfa868c0-6239-47df-bc81-54e13151ec2e}"},"page":"about:home","session_id":"n/a","profile_creation_date":17849,"region":"US"}

5- Done!
Comment on attachment 9025124 [details]
Bug 1503685 - Add home_extension_id and newtab_extension_id info to PAGE_TAKEOVER_DATA telemetry ping

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1503685

User impact if declined: No direct user impact but it would delay our investigation of homepage hijacking and, therefore, delay our remediation strategy which potentially affects many users.

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: No

Needs manual test from QE?: Yes

If yes, steps to reproduce: https://bugzilla.mozilla.org/show_bug.cgi?id=1503685#c11

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): This patch just adds two fields to an existing telemetry ping.

String changes made/needed: None
Attachment #9025124 - Flags: approval-mozilla-beta?
Using the steps from comment 11, I have verified that the ping is sent on the latest Nightly 65.0a1 (Build ID 20181120100045) on Windows 10 x64, Mac 10.13.3, and Arch Linux 4.16 x64.
Status: RESOLVED → VERIFIED
Comment on attachment 9025124 [details]
Bug 1503685 - Add home_extension_id and newtab_extension_id info to PAGE_TAKEOVER_DATA telemetry ping

AS telemetry, approved for 64.0b12
Attachment #9025124 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
I have verified the fix on the latest Beta build 64.0b12 (Build ID 20181122182000) on Windows 10 x64, Mac 10.13.3, and Arch Linux 4.16.
Flags: qe-verify+
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: