Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion libs/payments/metrics/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"assets": ["libs/payments/metrics/*.md"],
"declaration": true
},
"dependsOn": ["glean-generate"]
"dependsOn": ["glean-generate", "glean-generate-frontend"]
},
"glean-generate": {
"dependsOn": ["glean-lint"],
Expand All @@ -24,6 +24,13 @@
"glean-lint": {
"command": "yarn glean glinter libs/shared/metrics/glean/src/registry/subplat-backend-metrics.yaml"
},
"glean-generate-frontend": {
"dependsOn": ["glean-lint-frontend"],
"command": "yarn glean translate libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml -f typescript -o libs/payments/metrics/src/lib/glean-frontend/__generated__"
},
"glean-lint-frontend": {
"command": "yarn glean glinter libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml"
},
"test-unit": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
Expand Down
194 changes: 194 additions & 0 deletions libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
---
# Schema
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0

subscriptions:
page_view:
type: event
description: |
View of pages (management, standard, retention, interstitial offer)
send_in_pings:
- events
notification_emails:
- lchan@mozilla.com
- subplat-team@mozilla.com
bugs:
- https://mozilla-hub.atlassian.net/browse/PAY-3472
data_reviews:
- FILL IN
expires: never
data_sensitivity:
- interaction
extra_keys:
page_name:
description: |
The page reached by the user. Allowed values:
- management
- stay_standard
- stay_retention
- cancel_standard
- cancel_retention
- interstitial_offer
type: string
page_variant:
description: |
UI state of page. Allowed values:
- stay_standard_success
- stay_retention_success
- cancel_standard_success
- cancel_retention_success
- interstitial_offer_success
type: string
source:
description: |
Source of traffic. Allowed values: email, internal_nav, deep_link.
type: string
offering_id:
description: The API id of the specific subscription offering.
type: string
interval:
description: |
Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly).
type: string

retention_eligibility:
type: labeled_counter
description: |
Counts occurrences of retention eligibility outcomes by product, billing interval, and eligibility type.
notification_emails:
- lchan@mozilla.com
- subplat-team@mozilla.com
bugs:
- https://mozilla-hub.atlassian.net/browse/PAY-3472
data_reviews:
- FILL IN
expires: never
labels:
- vpn.monthly.eligible_for_stay
- vpn.monthly.eligible_for_cancel
- vpn.monthly.eligible_for_offer
- vpn.yearly.eligible_for_stay
- vpn.yearly.eligible_for_cancel
- vpn.yearly.eligible_for_offer
- relaypremiumphone.monthly.eligible_for_stay
- relaypremiumphone.monthly.eligible_for_cancel
- relaypremiumphone.monthly.eligible_for_offer
- relaypremiumphone.yearly.eligible_for_stay
- relaypremiumphone.yearly.eligible_for_cancel
- relaypremiumphone.yearly.eligible_for_offer
- relaypremium.monthly.eligible_for_stay
- relaypremium.monthly.eligible_for_cancel
- relaypremium.monthly.eligible_for_offer
- relaypremium.yearly.eligible_for_stay
- relaypremium.yearly.eligible_for_cancel
- relaypremium.yearly.eligible_for_offer
- mdnplus5m.monthly.eligible_for_stay
- mdnplus5m.monthly.eligible_for_cancel
- mdnplus5m.monthly.eligible_for_offer
- mdnplus10m.monthly.eligible_for_stay
- mdnplus10m.monthly.eligible_for_cancel
- mdnplus10m.monthly.eligible_for_offer
- mdnplus5y.yearly.eligible_for_stay
- mdnplus5y.yearly.eligible_for_cancel
- mdnplus5y.yearly.eligible_for_offer
- mdnplus10y.yearly.eligible_for_stay
- mdnplus10y.yearly.eligible_for_cancel
- mdnplus10y.yearly.eligible_for_offer

retention_flow:
type: event
description: |
Tracks the lifecycle of a retention flow decision.
send_in_pings:
- events
notification_emails:
- lchan@mozilla.com
- subplat-team@mozilla.com
bugs:
- https://mozilla-hub.atlassian.net/browse/PAY-3472
data_reviews:
- FILL IN
expires: never
data_sensitivity:
- interaction
extra_keys:
flow_type:
description: |
Type of retention flow. Allowed values: cancel, stay.
type: string
step:
description: |
Stage in the user journey lifecycle. Allowed values: engage, submit, result.
type: string
outcome:
description: |
The category of the result. Allowed values: success, error.
type: string
error_reason:
description: |
Specific reason for failure. Allowed values:
- customer_mismatch
- discount_already_applied
- general_error
- no_churn_intervention_found
- redemption_limit_exceeded
- subscription_not_active
- subscription_not_found
- subscription_still_active
type: string
offering_id:
description: The API id of the specific subscription offering.
type: string
interval:
description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly)
type: string

interstitial_offer:
type: event
description: Tracks engagement with non-retention flow.
send_in_pings:
- events
notification_emails:
- lchan@mozilla.com
- subplat-team@mozilla.com
bugs:
- https://mozilla-hub.atlassian.net/browse/PAY-3472
data_reviews:
- FILL IN
expires: never
data_sensitivity:
- interaction
extra_keys:
flow_type:
description: |
Type of retention flow. Allowed values: cancel, stay.
type: string
step:
description: |
Stage in the user journey lifecycle. Allowed values: engage, submit, result.
type: string
outcome:
description: |
The category of the result. Allowed values: success, error.
type: string
error_reason:
description: |
Specific reason for failure. Allowed values:
- customer_mismatch
- discount_already_applied
- general_error
- no_churn_intervention_found
- redemption_limit_exceeded
- subscription_not_active
- subscription_not_found
- subscription_still_active
type: string
offering_id:
description: The API id of the specific subscription offering.
type: string
interval:
description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly)
type: string
nimbus_user_id:
description: Nimbus user ID
type: string
Loading