diff --git a/.github/workflows/glean-probe-scraper.yml b/.github/workflows/glean-probe-scraper.yml
index a58c1f510c0..47f97fd430e 100644
--- a/.github/workflows/glean-probe-scraper.yml
+++ b/.github/workflows/glean-probe-scraper.yml
@@ -2,10 +2,12 @@ name: Glean probe-scraper
on:
push:
paths:
- - src/telemetry/metrics.yml
+ - src/telemetry/metrics.yaml
+ - src/telemetry/backend-metrics.yaml
pull_request:
paths:
- - src/telemetry/metrics.yml
+ - src/telemetry/metrics.yaml
+ - src/telemetry/backend-metrics.yaml
jobs:
glean-probe-scraper:
- uses: mozilla/probe-scraper/.github/workflows/glean.yaml@main
+ uses: mozilla/probe-scraper/.github/workflows/glean.yaml@main
\ No newline at end of file
diff --git a/docs/telemetry/backend/metrics.md b/docs/telemetry/backend/metrics.md
new file mode 100644
index 00000000000..2b0e4a1d150
--- /dev/null
+++ b/docs/telemetry/backend/metrics.md
@@ -0,0 +1,39 @@
+
+
+# Metrics
+
+This document enumerates the metrics collected by this project using the [Glean SDK](https://mozilla.github.io/glean/book/index.html).
+This project may depend on other projects which also collect metrics.
+This means you might have to go searching through the dependency tree to get a full picture of everything collected by this project.
+
+# Pings
+
+- [events](#events)
+
+## events
+
+This is a built-in ping that is assembled out of the box by the Glean SDK.
+
+See the Glean SDK documentation for the [`events` ping](https://mozilla.github.io/glean/book/user/pings/events.html).
+
+All Glean pings contain built-in metrics in the [`ping_info`](https://mozilla.github.io/glean/book/user/pings/index.html#the-ping_info-section) and [`client_info`](https://mozilla.github.io/glean/book/user/pings/index.html#the-client_info-section) sections.
+
+In addition to those built-in metrics, the following metrics are added to the ping:
+
+| Name | Type | Description | Data reviews | Extras | Expiration | [Data Sensitivity](https://wiki.mozilla.org/Firefox/Data_Collection) |
+| ----------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------- |
+| account.create | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A new Mozilla Monitor account has been created. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| account.password_change | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | The password for an existing Mozilla Account has been changed, and existing auth tokens have been revoked. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| account.profile_change | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | An existing Mozilla Accounts profile has been changed, for example the primary email address. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| account.remove | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | An existing Mozilla Monitor account has been deleted. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| monitor.plan_tier | [string](https://mozilla.github.io/glean/book/user/metrics/string.html) | Which tier of plan the user is on [Free, Plus] | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| monitor.session_id | [string](https://mozilla.github.io/glean/book/user/metrics/string.html) | An ID that allows us to track “sessions” of the user experience within the product. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| monitor.user_id | [string](https://mozilla.github.io/glean/book/user/metrics/string.html) | Mozilla Monitor-specific user ID. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| mozilla.account_id | [string](https://mozilla.github.io/glean/book/user/metrics/string.html) | Mozilla Accounts ID. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| page.view | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A web page view event distinguishable by the page’s URL. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) |
- path: The path of the page.
- referrer: The referring URL, if any.
- utm_campaign: Attribution campaign.
- utm_content: Attribution content.
- utm_medium: Attribution medium.
- utm_source: Attribution source.
- utm_term: Attribution term.
| never | 2 |
+| subscription.activate | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A subscription has been activated for this user. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+| subscription.cancel | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A subscription cancellation has taken effect, and the user is no longer subscribed to Monitor Plus. | [Bug 1896222](https://bugzilla.mozilla.org/show_bug.cgi?id=1896222) | | never | 2 |
+
+Data categories are [defined here](https://wiki.mozilla.org/Firefox/Data_Collection).
+
+
diff --git a/docs/metrics.md b/docs/telemetry/frontend/metrics.md
similarity index 93%
rename from docs/metrics.md
rename to docs/telemetry/frontend/metrics.md
index ca37ffe72a9..8fa4078f672 100644
--- a/docs/metrics.md
+++ b/docs/telemetry/frontend/metrics.md
@@ -1,4 +1,4 @@
-
+
# Metrics
@@ -24,6 +24,7 @@ In addition to those built-in metrics, the following metrics are added to the pi
| ---------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------------------------------------------------------------------- |
| button.click | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A click on a button that doesn’t fall into one of the two other button categories (call-to-action (CTA) or purchase intent). | [Bug 1823766](https://bugzilla.mozilla.org/show_bug.cgi?id=1823766) | - button_id: The ID of the button that was clicked on, or some way to identify where on the page the interaction is located.
- flow_id: A randomly generated unique identifier for following user flows within the FxA system.
- path: The path of the page.
- plan_tier: Which tier of plan the user is on [Free, Plus]
- session_id: An ID that allows us to track “sessions” of the user experience within the product.
- user_id: Mozilla accounts user ID.
| never | 2 |
| collapse.click | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A click to collapse a section on the webpage. | [Bug 1823766](https://bugzilla.mozilla.org/show_bug.cgi?id=1823766) | - button_id: The ID of the button that was clicked on, or some way to identify where on the page the interaction is located.
- flow_id: A randomly generated unique identifier for following user flows within the FxA system.
- path: The path of the page.
- plan_tier: Which tier of plan the user is on [Free, Plus]
- session_id: An ID that allows us to track “sessions” of the user experience within the product.
- user_id: Mozilla accounts user ID.
| never | 2 |
+| csat_survey.click | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A click on a CSAT survey response button. | [Bug 1823766](https://bugzilla.mozilla.org/show_bug.cgi?id=1823766) | - automated_removal_period: The time period since the first automated removal for the user. [initial, 3-months, 6-months, 12-months]
- experiment_branch: The experiment branch the user is on. [control, treatment]
- last_scan_date: The date on which the user had their last data broker scan. [YYYYMMDD]
- path: The path of the page.
- plan_tier: Which tier of plan the user is on [Free, Plus]
- response_id: The ID of the survey response option.
- survey_id: The ID of the survey, or some way to identify which survey was responded to.
| never | 2 |
| cta_button.click | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A click on a button that has a specific call-to-action. | [Bug 1823766](https://bugzilla.mozilla.org/show_bug.cgi?id=1823766) | - button_id: The ID of the button that was clicked on, or some way to identify where on the page the interaction is located.
- flow_id: A randomly generated unique identifier for following user flows within the FxA system.
- path: The path of the page.
- plan_tier: Which tier of plan the user is on [Free, Plus]
- session_id: An ID that allows us to track “sessions” of the user experience within the product.
- user_id: Mozilla accounts user ID.
| never | 2 |
| dashboard.view | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A view event of a Monitor user’s dashboard, where a user is able to view their data breaches and broker information. | [Bug 1823766](https://bugzilla.mozilla.org/show_bug.cgi?id=1823766) | - breach_count: Users who run the new free scan will be notified of breaches found during the scan.
- broker_count: Users who run the new free scan will be notified of breaches found during the scan.
- dashboard_tab: Either [action_needed, fixed] depending on where the user is in their dashboard.
- flow_id: A randomly generated unique identifier for following user flows within the FxA system.
- legacy_breach_count: Legacy users of Monitor may already have breaches reported on their dashboard, without having run the new free scan.
- legacy_user: True for users who signed up before data broker scanning was released to the welcome flow.
- path: The path of the page.
- plan_tier: Which tier of plan the user is on [Free, Plus]
- session_id: An ID that allows us to track “sessions” of the user experience within the product.
- user_id: Mozilla accounts user ID.
| never | 2 |
| expand.click | [event](https://mozilla.github.io/glean/book/user/metrics/event.html) | A click to expand a section of the webpage. | [Bug 1823766](https://bugzilla.mozilla.org/show_bug.cgi?id=1823766) | - button_id: The ID of the button that was clicked on, or some way to identify where on the page the interaction is located.
- flow_id: A randomly generated unique identifier for following user flows within the FxA system.
- path: The path of the page.
- plan_tier: Which tier of plan the user is on [Free, Plus]
- session_id: An ID that allows us to track “sessions” of the user experience within the product.
- user_id: Mozilla accounts user ID.
| never | 2 |
@@ -37,4 +38,4 @@ In addition to those built-in metrics, the following metrics are added to the pi
Data categories are [defined here](https://wiki.mozilla.org/Firefox/Data_Collection).
-
+
diff --git a/package.json b/package.json
index 50cee705b58..5a411efe3c7 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,9 @@
"build-nimbus": "node src/scripts/build/nimbusTypes.js",
"build-glean": "glean translate src/telemetry/metrics.yaml --format typescript --output src/telemetry/generated && npm run build-glean-types",
"build-glean-types": "node src/scripts/build/gleanTypes.js",
- "build-glean-docs": "glean translate src/telemetry/metrics.yaml --format markdown --output docs"
+ "build-glean-docs": "npm run build-glean-frontend-docs && npm run build-glean-backend-docs",
+ "build-glean-frontend-docs": "glean translate src/telemetry/metrics.yaml --format markdown --output docs/telemetry/frontent",
+ "build-glean-backend-docs": "glean translate src/telemetry/backend-metrics.yaml --format markdown --output docs/telemetry/backend"
},
"repository": {
"type": "git",
diff --git a/src/telemetry/backend-metrics.yaml b/src/telemetry/backend-metrics.yaml
new file mode 100644
index 00000000000..04c65340117
--- /dev/null
+++ b/src/telemetry/backend-metrics.yaml
@@ -0,0 +1,212 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# For more information on configuring this file:
+# https://mozilla.github.io/glean/book/reference/yaml/metrics.html
+
+---
+$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
+
+mozilla:
+ account_id:
+ description: Mozilla Accounts ID.
+ type: string
+ lifetime: application
+ send_in_pings:
+ - events
+ notification_emails:
+ - rhelmer@mozilla.com
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ expires: never
+ data_sensitivity:
+ - interaction
+
+monitor:
+ session_id:
+ description: An ID that allows us to track “sessions” of the user experience within the product.
+ type: string
+ lifetime: application
+ send_in_pings:
+ - events
+ notification_emails:
+ - rhelmer@mozilla.com
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ expires: never
+ data_sensitivity:
+ - interaction
+
+ user_id:
+ description: Mozilla Monitor-specific user ID.
+ type: string
+ lifetime: application
+ send_in_pings:
+ - events
+ notification_emails:
+ - rhelmer@mozilla.com
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ expires: never
+ data_sensitivity:
+ - interaction
+
+ plan_tier:
+ description: Which tier of plan the user is on [Free, Plus]
+ type: string
+ lifetime: application
+ send_in_pings:
+ - events
+ notification_emails:
+ - rhelmer@mozilla.com
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ expires: never
+ data_sensitivity:
+ - interaction
+
+page:
+ view:
+ type: event
+ description: |
+ A web page view event distinguishable by the page’s URL.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events
+ extra_keys:
+ path:
+ description: The path of the page.
+ type: string
+ utm_campaign:
+ description: Attribution campaign.
+ type: string
+ utm_content:
+ description: Attribution content.
+ type: string
+ utm_medium:
+ description: Attribution medium.
+ type: string
+ utm_source:
+ description: Attribution source.
+ type: string
+ utm_term:
+ description: Attribution term.
+ type: string
+ referrer:
+ description: The referring URL, if any.
+ type: string
+
+subscription:
+ activate:
+ type: event
+ description: |
+ A subscription has been activated for this user.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events
+
+ cancel:
+ type: event
+ description: |
+ A subscription cancellation has taken effect, and the user is no longer subscribed to Monitor Plus.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events
+
+account:
+ create:
+ type: event
+ description: |
+ A new Mozilla Monitor account has been created.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events
+
+ remove:
+ type: event
+ description: |
+ An existing Mozilla Monitor account has been deleted.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events
+
+ profile_change:
+ type: event
+ description: |
+ An existing Mozilla Accounts profile has been changed, for example the primary email address.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events
+
+ password_change:
+ type: event
+ description: |
+ The password for an existing Mozilla Account has been changed, and existing auth tokens have been revoked.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1896222
+ data_sensitivity:
+ - interaction
+ notification_emails:
+ - rhelmer@mozilla.com
+ expires: never
+ send_in_pings:
+ - events