---
# Schema
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0

page:
  path:
    type: url
    lifetime: application
    send_in_pings:
      - page
      - action
    description: |
      The URL path of the page that was viewed.
    data_sensitivity:
      - web_activity
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1782509
    data_reviews:
      - https://github.com/mdn/yari/pull/6813#issuecomment-1203705308
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05
  referrer:
    type: url
    lifetime: application
    send_in_pings:
      - page
      - action
    description: |
      The referring URL that linked to the page that was viewed.
    data_sensitivity:
      - web_activity
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1782509
    data_reviews:
      - https://github.com/mdn/yari/pull/6813#issuecomment-1203705308
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05
  utm:
    type: labeled_string
    lifetime: application
    send_in_pings:
      - page
      - action
    description: |
      The UTM parameters of the page, used to attribute the source of traffic:
      "source": which site sent the traffic
      "medium": what type of link was used
      "campaign": what specific campaign or experiment does this relate to
      "term": here for completeness, the search term that was purchased/bid on
      "content": what specifically was clicked to bring the user to the site
    data_sensitivity:
      - web_activity
    bugs:
      - "https://mozilla-hub.atlassian.net/browse/MP-545"
    data_reviews:
      - "https://bugzilla.mozilla.org/show_bug.cgi?id=1851150"
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05
    labels:
      - source
      - medium
      - campaign
      - term
      - content

navigator:
  geo:
    type: string
    lifetime: application
    send_in_pings:
      - page
      - action
    description: |
      The navigators ISO 3166 country name (not code) based on geo ip.
    data_sensitivity:
      - web_activity
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1798296
    data_reviews:
      - https://github.com/mdn/yari/pull/7457#issuecomment-1296934544
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05
  geo_iso:
    type: string
    lifetime: application
    send_in_pings:
      - page
      - action
    description: |
      The navigator's two-letter ISO 3166 country code based on geo ip.
    data_sensitivity:
      - web_activity
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1798296
    data_reviews:
      - https://github.com/mdn/yari/pull/7457#issuecomment-1296934544
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05
  subscription_type:
    type: string
    lifetime: application
    send_in_pings:
      - page
      - action
    description: |
      The subscription type of the user. can be one of
      'core','mdn_plus_5m','mdn_plus_5y','mdn_plus_10m','mdn_plus_10y'
    data_sensitivity:
      - web_activity
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1798296
    data_reviews:
      - https://github.com/mdn/yari/pull/7457#issuecomment-1296934544
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05

element:
  clicked:
    type: event
    lifetime: ping
    send_in_pings:
      - action
    description: |
      MDN Page element clicks.
    data_sensitivity:
      - web_activity
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1782509
    data_reviews:
      - https://github.com/mdn/yari/pull/6813#issuecomment-1203705308
    notification_emails:
      - mdn-team@mozilla.com
    expires: 2026-09-05
    extra_keys:
      source:
        description: |
          The click source/target
        type: string
      subscription_type:
        description: |
          The subscription type of the user. can be one of
          'core','mdn_plus_5m','mdn_plus_5y','mdn_plus_10m','mdn_plus_10y'
        type: string
