From 6a4b4339f3170343542a4862f0dcab94ece359b4 Mon Sep 17 00:00:00 2001 From: Lisa Chan Date: Wed, 4 Feb 2026 17:16:42 -0500 Subject: [PATCH 1/3] feat(shared-metrics): Add Glean for Churn --- .../registry/subplat-frontend-metrics.yaml | 516 ++++++++++++++++++ 1 file changed, 516 insertions(+) create mode 100644 libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml diff --git a/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml b/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml new file mode 100644 index 00000000000..4a15fde7304 --- /dev/null +++ b/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml @@ -0,0 +1,516 @@ +--- +# Schema +$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 + +subscriptions_action_submit: + type: event + description: | + Frontend initiated a subscription state-changing action. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + action: + type: string + description: | + Allowed values: + - resume_subscription + - apply_churn_discount + - cancel_subscription + +subscriptions_action_result: + type: event + description: | + Result of a submitted subscription action. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + action: + type: string + result: + type: string + description: success | failure + error_reason: + type: string + +subscriptions: + management: + view: + type: event + description: | + View of the Subscription Management page + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + + button_click: + type: event + description: | + User clicked a button on the Subscription Management page. + One event is recorded per click. + + All buttons, except `add_payment_method` and `manage_payment_method`, are subscription-specific and + include product_name/offering_id and eligibility fields. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXX + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=YYYYY + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Normalized button key. + Allowed values: + - add_payment_method + - manage_payment_method + - contact_support + - view_invoice + - stay_subscribed + - cancel_subscription + - manage_subscription + type: string + product_name: + description: The name of the product subscription (omitted for *_payment_method buttons) + type: string + offering_id: + description: The API id of the subscribed product (omitted for *_payment_method buttons) + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + isEligibleForChurnCancel: + description: if true, customer is eligible to redeem existing churn coupon on Cancel subscription flow + type: boolean + isEligibleForChurnStaySubscribed: + description: if true, customer is eligible to redeem existing churn coupon on Stay subscribed flow + type: boolean + isEligibleForOffer: + description: if true, customer is eligible for upgrade and save + type: boolean + + loyalty_discount: + cancel: + view: + type: event + description: | + View of /subscriptions//loyalty-discount/cancel + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + button_click: + type: event + description: | + User clicked a button on the churn cancel subscription flow page. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXX + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=YYYYY + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Allowed values: + - back_to_subscriptions + - stay_subscribed + - continue_to_cancel + - manage_subscriptions + - contact_support + - go_to_product_page + type: string + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + error_view: + type: event + description: | + View of /subscriptions//loyalty-discount/cancel/error + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + error_reason: + description: | + Reason for displaying error page + Allowed values: + - already_canceling_at_period_end + - discount_already_applied + - no_churn_intervention_found + - redemption_limit_exceeded + - subscription_not_active + - subscription_not_found + type: string + + error_button_click: + type: event + description: | + User clicked a button on the churn cancel subscription flow error page. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXX + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=YYYYY + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Allowed values: + - back_to_subscriptions + - keep_subscription + - stay_subscribed + - continue_to_cancel + - manage_subscriptions + - contact_support + - go_to_product_page + - try_again + type: string + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + stay_subscribed: + view: + type: event + description: | + View of /subscriptions//loyalty-discount/stay-subscribed + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + product_name: + description: The name of the product subscription + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + button_click: + type: event + description: | + User clicked a button on the churn stay subscribed flow page. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Allowed values: + - go_to_product_page + - back_to_subscriptions + - stay_subscribed + - manage_subscriptions + type: string + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + error_view: + type: event + description: | + View of /subscriptions//loyalty-discount/stay-subscribed/error + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + error_reason: + description: | + Reason for displaying error page + Allowed values: + - discount_already_applied + - general_error + - no_churn_intervention_found + - redemption_limit_exceeded + - subscription_not_active + - subscription_not_found + - subscription_still_active + type: string + + error_button_click: + type: event + description: | + User clicked a button on the churn stay subscribed subscription flow error page. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Allowed values: + - back_to_subscriptions + - stay_subscribed + - continue_to_cancel + - manage_subscriptions + - contact_support + - go_to_product_page + - try_again + type: string + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + offer: + view: + type: event + description: | + View of /subscriptions//offer + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + product_name: + description: The name of the product subscription + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + button_click: + type: event + description: | + User clicked a button on the cancel interstitial offer page. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Allowed values: + - upgrade_subscription + - keep_subscription + - continue_to_cancel + type: string + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) + type: string + + error_view: + type: event + description: | + View of /subscriptions//offer/error + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + error_reason: + description: | + Reason for displaying error page + Allowed values: + - already_canceling_at_period_end + - current_interval_not_found + - no_cancel_interstitial_offer_found + - no_upgrade_plan_found + - not_eligible_for_upgrade_interval + - offering_id_not_found + - stripe_price_id_not_found + - subscription_not_active + - subscription_not_found + type: string + + error_button_click: + type: event + description: | + User clicked a button on the cancel interstitial offer error page. + send_in_pings: + - events + notification_emails: + - lchan@mozilla.com + - subplat-team@mozilla.com + bugs: + - FILL INNNNNNNNNN + data_reviews: + - FILL INNNNNNNNNN + expires: never + data_sensitivity: + - interaction + extra_keys: + button: + description: | + Allowed values: + - back_to_subscriptions + - continue_to_cancel + type: string + product_name: + description: The name of the product that the customer is subscribed + type: string + offering_id: + description: The API id of the subscribed product + type: string + interval: + description: Billing interval for the subscription (monthly | yearly) + type: string From 8a47b00622cd804d0b470606a1e47064d09c9e62 Mon Sep 17 00:00:00 2001 From: Lisa Chan Date: Fri, 6 Feb 2026 14:25:08 -0500 Subject: [PATCH 2/3] update yaml --- .../registry/subplat-frontend-metrics.yaml | 680 +++++------------- 1 file changed, 177 insertions(+), 503 deletions(-) diff --git a/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml b/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml index 4a15fde7304..403b5972830 100644 --- a/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml +++ b/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml @@ -2,515 +2,189 @@ # Schema $schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 -subscriptions_action_submit: - type: event - description: | - Frontend initiated a subscription state-changing action. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - action: - type: string - description: | - Allowed values: - - resume_subscription - - apply_churn_discount - - cancel_subscription - -subscriptions_action_result: - type: event - description: | - Result of a submitted subscription action. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - action: - type: string - result: - type: string - description: success | failure - error_reason: - type: string - subscriptions: - management: - view: - type: event - description: | - View of the Subscription Management page - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - - button_click: - type: event - description: | - User clicked a button on the Subscription Management page. - One event is recorded per click. - - All buttons, except `add_payment_method` and `manage_payment_method`, are subscription-specific and - include product_name/offering_id and eligibility fields. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXX - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=YYYYY - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Normalized button key. - Allowed values: - - add_payment_method - - manage_payment_method - - contact_support - - view_invoice - - stay_subscribed - - cancel_subscription - - manage_subscription - type: string - product_name: - description: The name of the product subscription (omitted for *_payment_method buttons) - type: string - offering_id: - description: The API id of the subscribed product (omitted for *_payment_method buttons) - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - isEligibleForChurnCancel: - description: if true, customer is eligible to redeem existing churn coupon on Cancel subscription flow - type: boolean - isEligibleForChurnStaySubscribed: - description: if true, customer is eligible to redeem existing churn coupon on Stay subscribed flow - type: boolean - isEligibleForOffer: - description: if true, customer is eligible for upgrade and save - type: boolean - - loyalty_discount: - cancel: - view: - type: event + 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: | - View of /subscriptions//loyalty-discount/cancel - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - button_click: - type: event + The UI state reached by the user. Allowed values: + - management + - stay_standard + - stay_standard_success + - stay_retention + - stay_retention_success + - cancel_standard + - cancel_standard_success + - cancel_retention + - cancel_retention_success + - interstitial_offer + - interstitial_offer_success + type: string + source: description: | - User clicked a button on the churn cancel subscription flow page. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXX - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=YYYYY - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Allowed values: - - back_to_subscriptions - - stay_subscribed - - continue_to_cancel - - manage_subscriptions - - contact_support - - go_to_product_page - type: string - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - error_view: - type: event + 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: | - View of /subscriptions//loyalty-discount/cancel/error - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - error_reason: - description: | - Reason for displaying error page - Allowed values: - - already_canceling_at_period_end - - discount_already_applied - - no_churn_intervention_found - - redemption_limit_exceeded - - subscription_not_active - - subscription_not_found - type: string - - error_button_click: - type: event + 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: | - User clicked a button on the churn cancel subscription flow error page. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXX - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=YYYYY - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Allowed values: - - back_to_subscriptions - - keep_subscription - - stay_subscribed - - continue_to_cancel - - manage_subscriptions - - contact_support - - go_to_product_page - - try_again - type: string - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - stay_subscribed: - view: - type: event + Type of retention flow. Allowed values: cancel, stay_subscribed. + type: string + step: description: | - View of /subscriptions//loyalty-discount/stay-subscribed - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - product_name: - description: The name of the product subscription - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - button_click: - type: event + Stage in the user journey lifecycle. Allowed values: engage, submit, result. + type: string + outcome: description: | - User clicked a button on the churn stay subscribed flow page. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Allowed values: - - go_to_product_page - - back_to_subscriptions - - stay_subscribed - - manage_subscriptions - type: string - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - error_view: - type: event + The category of the result. Allowed values: success, error. + type: string + error_reason: description: | - View of /subscriptions//loyalty-discount/stay-subscribed/error - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - error_reason: - description: | - Reason for displaying error page - Allowed values: - - discount_already_applied - - general_error - - no_churn_intervention_found - - redemption_limit_exceeded - - subscription_not_active - - subscription_not_found - - subscription_still_active - type: string - - error_button_click: - type: event + 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: | - User clicked a button on the churn stay subscribed subscription flow error page. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Allowed values: - - back_to_subscriptions - - stay_subscribed - - continue_to_cancel - - manage_subscriptions - - contact_support - - go_to_product_page - - try_again - type: string - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - offer: - view: - type: event - description: | - View of /subscriptions//offer - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - product_name: - description: The name of the product subscription - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - button_click: - type: event - description: | - User clicked a button on the cancel interstitial offer page. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Allowed values: - - upgrade_subscription - - keep_subscription - - continue_to_cancel - type: string - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (daily | weekly | monthly | halfyearly | yearly) - type: string - - error_view: - type: event - description: | - View of /subscriptions//offer/error - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - error_reason: - description: | - Reason for displaying error page - Allowed values: - - already_canceling_at_period_end - - current_interval_not_found - - no_cancel_interstitial_offer_found - - no_upgrade_plan_found - - not_eligible_for_upgrade_interval - - offering_id_not_found - - stripe_price_id_not_found - - subscription_not_active - - subscription_not_found - type: string - - error_button_click: - type: event - description: | - User clicked a button on the cancel interstitial offer error page. - send_in_pings: - - events - notification_emails: - - lchan@mozilla.com - - subplat-team@mozilla.com - bugs: - - FILL INNNNNNNNNN - data_reviews: - - FILL INNNNNNNNNN - expires: never - data_sensitivity: - - interaction - extra_keys: - button: - description: | - Allowed values: - - back_to_subscriptions - - continue_to_cancel - type: string - product_name: - description: The name of the product that the customer is subscribed - type: string - offering_id: - description: The API id of the subscribed product - type: string - interval: - description: Billing interval for the subscription (monthly | yearly) - type: string + Type of retention flow. Allowed values: cancel, stay_subscribed. + 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 From 740ab23261274005ea60486c7b9ddcdde8632be6 Mon Sep 17 00:00:00 2001 From: Lisa Chan Date: Fri, 6 Feb 2026 15:29:30 -0500 Subject: [PATCH 3/3] meep --- libs/payments/metrics/project.json | 9 ++++++++- .../src/registry/subplat-frontend-metrics.yaml | 18 +++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/libs/payments/metrics/project.json b/libs/payments/metrics/project.json index d833134fd51..feb9b35a7fc 100644 --- a/libs/payments/metrics/project.json +++ b/libs/payments/metrics/project.json @@ -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"], @@ -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}"], diff --git a/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml b/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml index 403b5972830..b596080df14 100644 --- a/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml +++ b/libs/shared/metrics/glean/src/registry/subplat-frontend-metrics.yaml @@ -22,17 +22,21 @@ subscriptions: extra_keys: page_name: description: | - The UI state reached by the user. Allowed values: + The page reached by the user. Allowed values: - management - stay_standard - - stay_standard_success - stay_retention - - stay_retention_success - cancel_standard - - cancel_standard_success - cancel_retention - - cancel_retention_success - 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: @@ -110,7 +114,7 @@ subscriptions: extra_keys: flow_type: description: | - Type of retention flow. Allowed values: cancel, stay_subscribed. + Type of retention flow. Allowed values: cancel, stay. type: string step: description: | @@ -157,7 +161,7 @@ subscriptions: extra_keys: flow_type: description: | - Type of retention flow. Allowed values: cancel, stay_subscribed. + Type of retention flow. Allowed values: cancel, stay. type: string step: description: |