Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

MR2 Telemetry: Homescreen view count #22377

Merged
merged 5 commits into from
Nov 16, 2021
Merged

MR2 Telemetry: Homescreen view count #22377

merged 5 commits into from
Nov 16, 2021

Conversation

MozillaNoah
Copy link
Contributor

#22146

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@MozillaNoah MozillaNoah added Feature:HomeScreen Feature:Telemetry needs:data-review PR is awaiting a data review needs:review PRs that need to be reviewed labels Nov 8, 2021
@MozillaNoah MozillaNoah requested review from a team as code owners November 8, 2021 22:24
@MozillaNoah
Copy link
Contributor Author

MozillaNoah commented Nov 8, 2021

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?
  • How many times does the user view the homescreen?
  1. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?
  • This will help us understand usage patterns around the homescreen.
  1. What alternative methods did you consider to answer these questions? Why were they not sufficient?
  • There are no other alternatives.

  1. Can current instrumentation answer these questions?
  1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories 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.
Measurement Description Data Collection Category Tracking Bug #
How many total times has the user seen the homescreen? Category 2 - interaction data #22146
  1. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.
  1. How long will this data be collected? Choose one of the following:
  • One year (ending on November 1st, 2022), with the option to renew at that point.

  1. What populations will you measure?
  • All channels, all locales, all countries

  1. If this data collection is default on, what is the opt-out mechanism for users?
  • Default Glean SDK opt-out mechanism.

  1. Please provide a general description of how you will analyze this data.
  • Glean and Amplitude.

  1. Where do you intend to share the results of your analysis?
  • 
Only on Glean, Amplitude, and with mobile teams.

  1. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?
  • No third-party tools.

@MozillaNoah
Copy link
Contributor Author

MozillaNoah commented Nov 8, 2021

This new probe does have a bit of overlap with two existing probes:
https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/start_on_home_enter_home_screen
https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/home_screen_home_screen_displayed

We may want to revisit the original probes come renewal time.

Copy link
Contributor

@jonalmeida jonalmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new probe does have a bit of overlap with two existing probes: https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/start_on_home_enter_home_screen https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/home_screen_home_screen_displayed

We may want to revisit the original probes come renewal time.

Please put this under "What alternative methods did you consider to answer these questions? Why were they not sufficient?"

I was looking at this from an eng perspective and I can't see how this probe would give any new data that differs from home_screen_displayed.

We should ask product/data why this new probe is needed probably.

@@ -230,7 +230,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}

if (!shouldStartOnHome() &&
shouldNavigateBrowserFragmentOnCouldStart(savedInstanceState)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@MozillaNoah
Copy link
Contributor Author

This new probe does have a bit of overlap with two existing probes: https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/start_on_home_enter_home_screen https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/home_screen_home_screen_displayed
We may want to revisit the original probes come renewal time.

Please put this under "What alternative methods did you consider to answer these questions? Why were they not sufficient?"

I was looking at this from an eng perspective and I can't see how this probe would give any new data that differs from home_screen_displayed.

We should ask product/data why this new probe is needed probably.

Yeah, I was thinking the same thing but wanted to get the code out first since it was a pretty minor addition. I'll reach out to Kimmy and comment back when I have an update.

Thanks!

@MozillaNoah
Copy link
Contributor Author

Reached out to Kimmy:

i think the intended difference here was the start_on_home.enter_home_screen counts when the user is directed to the home screen after 4 hours or more of being away, while the home_screen_displayed one counts all the different ways the home screen can be viewed (including start_on_home.enter_home_screen.
...
so i think we wanted a total home screen view count, and the start on home one contributes to that overall count
...
...for this situation we'd just like one aggregate measure of home screen views

Confirmed we need this new probe for running a particular report.

CC: @jonalmeida @rocketsroger

@rocketsroger
Copy link
Contributor

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?


* How many times does the user view the homescreen?


1. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?


* This will help us understand usage patterns around the homescreen.


1. What alternative methods did you consider to answer these questions? Why were they not sufficient?


* There are no other alternatives.


1. Can current instrumentation answer these questions?


* This new probe does have a bit of overlap with two existing probes:
  
  * https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/start_on_home_enter_home_screen
  * [https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/home_screen_home_screen_displayed
    ](https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/home_screen_home_screen_displayed%E2%80%A8)


1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories 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.

Measurement Description Data Collection Category Tracking Bug #
How many total times has the user seen the homescreen? Category 2 - interaction data #22146

1. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.


* [https://dictionary.telemetry.mozilla.org/apps/fenix
  ](https://dictionary.telemetry.mozilla.org/apps/fenix%E2%80%A8)


1. How long will this data be collected? Choose one of the following:


* One year (ending on November 1st, 2022), with the option to renew at that point.


1. What populations will you measure?


* All channels, all locales, all countries


1. If this data collection is default on, what is the opt-out mechanism for users?


* Default Glean SDK opt-out mechanism.


1. Please provide a general description of how you will analyze this data.


* Glean and Amplitude.


1. Where do you intend to share the results of your analysis?


* Only on Glean, Amplitude, and with mobile teams.


1. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?


* No third-party tools.

Data Review

  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, through the metrics.yaml file and the Glean Dictionary

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

Yes, through the "Send Usage Data" preference in the application settings

  1. If the request is for permanent data collection, is there someone who will monitor the data over time?

N/A, collection set to end or be renewed by 2022-11-01

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

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

default-on

  1. Does the instrumentation include the addition of any new identifiers?

No

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

Yes

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

No

Result

data-review+

@@ -480,7 +480,10 @@ class HomeFragment : Fragment() {
val profilerStartTime = requireComponents.core.engine.profiler?.getProfilerTime()

super.onViewCreated(view, savedInstanceState)
context?.metrics?.track(Event.HomeScreenDisplayed)
context?.metrics?.apply {
track(Event.HomeScreenDisplayed)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove this then? since we will now have a counter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't think so since the event should be, in theory, used to follow a sequence of user interactions, whereas the counter will be used for some quantitative calculations and comparisons.

@eliserichards eliserichards removed the needs:data-review PR is awaiting a data review label Nov 15, 2021
@MozillaNoah MozillaNoah added the pr:needs-landing-squashed PRs that are ready to land (squashed) [Will be merged by Mergify] label Nov 16, 2021
@MozillaNoah MozillaNoah reopened this Nov 16, 2021
@mergify mergify bot merged commit dde9160 into mozilla-mobile:main Nov 16, 2021
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this pull request Mar 7, 2022
* For mozilla-mobile#22146 - Added counter for home screen views

* For mozilla-mobile#22146 - Added PR number to metrics

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature:HomeScreen Feature:Telemetry needs:review PRs that need to be reviewed pr:needs-landing-squashed PRs that are ready to land (squashed) [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants