# 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/.

# Adding a new metric? We have docs for that!
# https://firefox-source-docs.mozilla.org/toolkit/components/glean/user/new_definitions_file.html

---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
$tags:
  - 'Firefox :: Private Browsing'

private_browsing.reset_pbm:
  confirm_panel:
    type: event
    description: >
      Confirm panel show / hide event.
    extra_keys:
      action:
        type: string
        description: Whether the panel was hidden or shown.
      reason:
        type: string
        description: Reason for the action.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1853698
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1853698#c3
    data_sensitivity:
      - interaction
    notification_emails:
      - emz@mozilla.com
    expires: never
  reset_action:
    type: event
    description: >
      Dispatched whenever PBM is restarted / reset via the resetPBM feature.
    extra_keys:
      did_confirm:
        type: boolean
        description: Whether the user confirmed the reset action via the confirmation dialog.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1853698
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1853698#c3
    data_sensitivity:
      - interaction
    notification_emails:
      - emz@mozilla.com
    expires: never

aboutprivatebrowsing:
  click_info_link:
    type: event
    description: >
      This is recorded when a user clicks a link on the private browsing
      newtab.
      This event was generated to correspond to the Legacy Telemetry event
      aboutprivatebrowsing.click#info_link.
    bugs: &aboutprivatebrowsing_click_bugs
      - https://bugzil.la/1709344
      - https://bugzil.la/1754635
      - https://bugzil.la/1781973
      - https://bugzil.la/1811146
      - https://bugzil.la/1841925
      - https://bugzil.la/1871197
      - https://bugzil.la/1922609
      - https://bugzil.la/1952111
      - https://bugzil.la/1984459
      - https://bugzil.la/2005390
    data_reviews: &aboutprivatebrowsing_click_data_reviews
      - https://bugzil.la/1709344
      - https://bugzil.la/1754635
      - https://bugzil.la/1781973
      - https://bugzil.la/1811146
      - https://bugzil.la/1841925
      - https://bugzil.la/1871197
      - https://phabricator.services.mozilla.com/D225937
      - https://bugzil.la/1984459
      - https://bugzil.la/2005390
    notification_emails: &aboutprivatebrowsing_click_emails
      - emz@mozilla.com
      - tihuang@mozilla.com
    expires: 160
    no_lint:
      - COMMON_PREFIX

  click_promo_link:
    type: event
    description: >
      This is recorded when a user clicks a link on the private browsing
      newtab.
      This event was generated to correspond to the Legacy Telemetry event
      aboutprivatebrowsing.click#promo_link.
    bugs: *aboutprivatebrowsing_click_bugs
    data_reviews: *aboutprivatebrowsing_click_data_reviews
    notification_emails: *aboutprivatebrowsing_click_emails
    expires: 160
    no_lint:
      - COMMON_PREFIX

  click_dismiss_button:
    type: event
    description: >
      This is recorded when a user clicks a link on the private browsing
      newtab.
      This event was generated to correspond to the Legacy Telemetry event
      aboutprivatebrowsing.click#dismiss_button.
    bugs: *aboutprivatebrowsing_click_bugs
    data_reviews: *aboutprivatebrowsing_click_data_reviews
    notification_emails: *aboutprivatebrowsing_click_emails
    expires: 160
    no_lint:
      - COMMON_PREFIX
