Repository: mozilla-mobile/firefox-ios
Pull request #26487: Refactor FXIOS-12167 [TA 2025] Move Glean YAML files to their own folder
Author: login: ih-codes
Created: 2025-05-02T22:30:52Z | Merged: 2025-05-07T15:29:21Z

## :scroll: Tickets
[Jira ticket](https://mozilla-hub.atlassian.net/browse/FXIOS-12167)
[Github issue](https://github.com/mozilla-mobile/firefox-ios/issues/26486)

## :bulb: Description
This PR moves the metrics.yaml, pings.yaml, and tags.yaml into their own Glean folder.

This PR also adds a settings.yaml file which contains all the metrics/events related to the settings screens (currently called "preferences"). This emulates what we will eventually want to do for each component in the app so as to better organize our metrics instead of using one monolithic metrics.yaml file. All metrics/events in this file are automatically tagged with "Settings" for easy filtering on the Glean dictionary.

Paths and file inclusions were updated in Xcode as well. Added the new Glean folder to the Xcode project hierarchy for easy dev access to the yaml files.

**Note**: No data steward review is required as things were only moved around, not changed or added.

## :pencil: Checklist
- [x] I filled in the ticket numbers and a description of my work
- [x] I updated the PR name to follow our [PR naming guidelines](https://github.com/mozilla-mobile/firefox-ios/wiki/Pull-Request-Naming-Guide)
- [x] I ensured unit tests pass and wrote tests for new code
- [ ] If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
- [ ] If adding telemetry, I read the [data stewardship requirements](https://github.com/mozilla-mobile/firefox-ios/wiki/Adding-Glean-Telemetry-Events) and will request a data review
- [ ] If needed, I updated documentation and added comments to complex code
- [ ] If needed, I added a backport comment (example `@Mergifyio backport release/v120`)



Diff:
diff --git a/firefox-ios/Client.xcodeproj/project.pbxproj b/firefox-ios/Client.xcodeproj/project.pbxproj
index 7225233c92e07..ae14d9a299324 100644
--- a/firefox-ios/Client.xcodeproj/project.pbxproj
+++ b/firefox-ios/Client.xcodeproj/project.pbxproj
@@ -1228,7 +1228,6 @@
 		8CC033FA2BA476840033449E /* FormAutofillHelper.js in Resources */ = {isa = PBXBuildFile; fileRef = 8CC033F92BA476840033449E /* FormAutofillHelper.js */; };
 		8CC617092C35463B001C7688 /* AddressModifiedStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CC617082C35463B001C7688 /* AddressModifiedStatus.swift */; };
 		8CCD74732B90A945008F919B /* LoginListViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CCD74722B90A945008F919B /* LoginListViewModelTests.swift */; };
-		8CDA04872D351783004C333C /* pings.yaml in Resources */ = {isa = PBXBuildFile; fileRef = 8CDA04862D351783004C333C /* pings.yaml */; };
 		8CE1E4322B8C76AE0026530B /* LoginStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE1E4312B8C76AE0026530B /* LoginStorage.swift */; };
 		8CE1E4372B8C76C80026530B /* LoginAutofillView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE1E4332B8C76C80026530B /* LoginAutofillView.swift */; };
 		8CE1E4382B8C76C80026530B /* LoginListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE1E4342B8C76C80026530B /* LoginListViewModel.swift */; };
@@ -1948,6 +1947,10 @@
 		ED7A08E12CF679CE0035EC8F /* MockShareTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7A08E02CF679CE0035EC8F /* MockShareTab.swift */; };
 		ED80541B2DAD967000484080 /* ContinuationsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED80541A2DAD966B00484080 /* ContinuationsChecker.swift */; };
 		ED8B49B92D6CF72700743444 /* AppIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED8B49B82D6CF72700743444 /* AppIcon.swift */; };
+		ED9DB41F2DC57DF80072FF5F /* metrics.yaml in Resources */ = {isa = PBXBuildFile; fileRef = ED9DB41A2DC57DF80072FF5F /* metrics.yaml */; };
+		ED9DB4202DC57DF80072FF5F /* pings.yaml in Resources */ = {isa = PBXBuildFile; fileRef = ED9DB41B2DC57DF80072FF5F /* pings.yaml */; };
+		ED9DB4212DC57DF80072FF5F /* tags.yaml in Resources */ = {isa = PBXBuildFile; fileRef = ED9DB41D2DC57DF80072FF5F /* tags.yaml */; };
+		ED9DB4222DC57DF80072FF5F /* settings.yaml in Resources */ = {isa = PBXBuildFile; fileRef = ED9DB41C2DC57DF80072FF5F /* settings.yaml */; };
 		ED9FD5DB2CEBB5EA00E906A3 /* SentFromFirefoxSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED9FD5DA2CEBB5EA00E906A3 /* SentFromFirefoxSetting.swift */; };
 		EDADF77A2D70BD3E00C39295 /* AppIconSelectionTelemetry.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDADF7792D70BD3E00C39295 /* AppIconSelectionTelemetry.swift */; };
 		EDADF77C2D70C58200C39295 /* SettingsTelemetry.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDADF77B2D70C58200C39295 /* SettingsTelemetry.swift */; };
@@ -8598,7 +8601,6 @@
 		8CCA45EFA01D41F54715FBCC /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/AuthenticationManager.strings; sourceTree = "<group>"; };
 		8CCD74722B90A945008F919B /* LoginListViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginListViewModelTests.swift; sourceTree = "<group>"; };
 		8CD04F1485CE61A3B3237248 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/3DTouchActions.strings; sourceTree = "<group>"; };
-		8CDA04862D351783004C333C /* pings.yaml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = pings.yaml; sourceTree = "<group>"; };
 		8CE041B18298F668144B225A /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Menu.strings; sourceTree = "<group>"; };
 		8CE1E4312B8C76AE0026530B /* LoginStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginStorage.swift; sourceTree = "<group>"; };
 		8CE1E4332B8C76C80026530B /* LoginAutofillView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginAutofillView.swift; sourceTree = "<group>"; };
@@ -8933,7 +8935,6 @@
 		ACA54F0AB310BBB89A78FEE6 /* fa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fa; path = fa.lproj/AuthenticationManager.strings; sourceTree = "<group>"; };
 		ACAB474AA6DD8BA9A621CB94 /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/ClearPrivateDataConfirm.strings; sourceTree = "<group>"; };
 		ACCB429B86B8D1BC8BF2FDE0 /* gd */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = gd; path = gd.lproj/ClearHistoryConfirm.strings; sourceTree = "<group>"; };
-		ACD605D124B35EEE00EE4454 /* metrics.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = metrics.yaml; sourceTree = "<group>"; };
 		AD0048BFB828C49A0E82F1E0 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/ClearHistoryConfirm.strings; sourceTree = "<group>"; };
 		AD2C4ABAB9762CB3F2E77E92 /* eo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = eo; path = eo.lproj/ClearHistoryConfirm.strings; sourceTree = "<group>"; };
 		AD494D0E9BB55086064EB864 /* bg */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bg; path = bg.lproj/ClearPrivateDataConfirm.strings; sourceTree = "<group>"; };
@@ -10261,6 +10262,10 @@
 		ED80541A2DAD966B00484080 /* ContinuationsChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContinuationsChecker.swift; sourceTree = "<group>"; };
 		ED84423D8666C751BBFC76AC /* lo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = lo; path = lo.lproj/Storage.strings; sourceTree = "<group>"; };
 		ED8B49B82D6CF72700743444 /* AppIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppIcon.swift; sourceTree = "<group>"; };
+		ED9DB41A2DC57DF80072FF5F /* metrics.yaml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = metrics.yaml; sourceTree = "<group>"; };
+		ED9DB41B2DC57DF80072FF5F /* pings.yaml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = pings.yaml; sourceTree = "<group>"; };
+		ED9DB41C2DC57DF80072FF5F /* settings.yaml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = settings.yaml; sourceTree = "<group>"; };
+		ED9DB41D2DC57DF80072FF5F /* tags.yaml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = tags.yaml; sourceTree = "<group>"; };
 		ED9FD5DA2CEBB5EA00E906A3 /* SentFromFirefoxSetting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentFromFirefoxSetting.swift; sourceTree = "<group>"; };
 		EDA240A8BBFD0A19FB2C3D7E /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Intro.strings; sourceTree = "<group>"; };
 		EDADF7792D70BD3E00C39295 /* AppIconSelectionTelemetry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppIconSelectionTelemetry.swift; sourceTree = "<group>"; };
@@ -14937,6 +14942,17 @@
 			path = AppIconSelection;
 			sourceTree = "<group>";
 		};
+		ED9DB41E2DC57DF80072FF5F /* Glean */ = {
+			isa = PBXGroup;
+			children = (
+				ED9DB41A2DC57DF80072FF5F /* metrics.yaml */,
+				ED9DB41B2DC57DF80072FF5F /* pings.yaml */,
+				ED9DB41C2DC57DF80072FF5F /* settings.yaml */,
+				ED9DB41D2DC57DF80072FF5F /* tags.yaml */,
+			);
+			path = Glean;
+			sourceTree = "<group>";
+		};
 		EDADF7822D70D59900C39295 /* AppIconSelection */ = {
 			isa = PBXGroup;
 			children = (
@@ -15057,14 +15073,13 @@
 				F84B22431A09165600AAB793 /* Info.plist */,
 				7B2142FC1E5E055000CDD3FC /* InfoPlist.strings */,
 				74821FFD1DB6D3AC00EEEA72 /* MailSchemes.plist */,
-				ACD605D124B35EEE00EE4454 /* metrics.yaml */,
-				8CDA04862D351783004C333C /* pings.yaml */,
 				C87D8B7E2818331900A6307D /* Nimbus */,
 				DFACDFAD274D4D4B00A94EEC /* Protocols */,
 				216A0D6F2A40D0E4008077BA /* Redux */,
 				8A590C6228C13E1D0032F1AA /* TabManagement */,
 				E69DB0B91E97E301008A67E6 /* Telemetry */,
 				E65075551E37F714006961AC /* Utils */,
+				ED9DB41E2DC57DF80072FF5F /* Glean */,
 			);
 			path = Client;
 			sourceTree = "<group>";
@@ -16353,6 +16368,10 @@
 				BA1237BA2DAE55EA00BB6333 /* NightModeAllFramesAtDocumentStart.js in Resources */,
 				BA8E197F2BF2FB1900590B5F /* AddressFormManager.js in Resources */,
 				8A1A935B2B757C7C0069C190 /* wave.json in Resources */,
+				ED9DB41F2DC57DF80072FF5F /* metrics.yaml in Resources */,
+				ED9DB4202DC57DF80072FF5F /* pings.yaml in Resources */,
+				ED9DB4212DC57DF80072FF5F /* tags.yaml in Resources */,
+				ED9DB4222DC57DF80072FF5F /* settings.yaml in Resources */,
 				D4AFAB0E2AFA8F9A000BFEAA /* SyncIntegrationTests in Resources */,
 				EDF2C05C2D6CDB6F00723609 /* AppIcons.xcassets in Resources */,
 				43F92B3829E9F52B000C0F17 /* AutofillAllFramesAtDocumentStart.js in Resources */,
@@ -16395,7 +16414,6 @@
 				43175DB626B8774D00C41C31 /* Ads.js in Resources */,
 				D0FCF8081FE4772D004A7995 /* MainFrameAtDocumentStart.js in Resources */,
 				D30684F11C84F12A002D8D82 /* SearchPlugins in Resources */,
-				8CDA04872D351783004C333C /* pings.yaml in Resources */,
 				8A5CDEED27E510F500CC60FF /* pocketglobalfeed.json in Resources */,
 				8A1A93582B757C7C0069C190 /* gradient.json in Resources */,
 				74821FFE1DB6D3AC00EEEA72 /* MailSchemes.plist in Resources */,
@@ -16611,9 +16629,10 @@
 			inputFileListPaths = (
 			);
 			inputPaths = (
-				"$(SRCROOT)/Client/metrics.yaml",
-				"$(SRCROOT)/Client/pings.yaml",
-				"$(SRCROOT)/Client/tags.yaml",
+				"$(SRCROOT)/Client/Glean/metrics.yaml",
+				"$(SRCROOT)/Client/Glean/pings.yaml",
+				"$(SRCROOT)/Client/Glean/tags.yaml",
+				"$(SRCROOT)/Client/Glean/settings.yaml",
 			);
 			name = "Glean SDK Generator Script";
 			outputFileListPaths = (
diff --git a/firefox-ios/Client/metrics.yaml b/firefox-ios/Client/Glean/metrics.yaml
similarity index 95%
rename from firefox-ios/Client/metrics.yaml
rename to firefox-ios/Client/Glean/metrics.yaml
index 62e5b9254c395..1d542d78c297a 100755
--- a/firefox-ios/Client/metrics.yaml
+++ b/firefox-ios/Client/Glean/metrics.yaml
@@ -1207,35 +1207,6 @@ microsurvey:
         - fx-ios-data-stewards@mozilla.com
     expires: "2025-07-01"
 
-# Metrics related to the App Settings
-settings.app_icon:
-  selected:
-    type: event
-    description: |
-      Records when the user changes their app icon in the app settings.
-    extra_keys:
-      new_name:
-        type: string
-        description: |
-          The name of the new app icon the user has selected. Options
-          are listed in the AppIcon enumeration.
-      old_name:
-        type: string
-        description: |
-          The name of the app icon the user had previously selected.
-          Returns "unknown" if the previous icon had an invalid name.
-    bugs:
-      - https://mozilla-hub.atlassian.net/browse/FXIOS-11473
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/25029
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-06-01"
-    metadata:
-      tags:
-        - AppIconSelection
-        - Settings
-
 # Settings main menu
 settings.main_menu:
   option_selected:
@@ -2795,218 +2766,6 @@ pocket:
     notification_emails:
       - fx-ios-data-stewards@mozilla.com
     expires: "2025-07-01"
-# Preference metrics
-preferences:
-  changed:
-    type: event
-    description: |
-      Recorded when a preference is changed and includes the
-      preference that changed as well as the value changed to
-      recorded in the extra keys.
-    extra_keys:
-      preference:
-        type: string
-        description: |
-          The preference that was changed.
-      changed_to:
-        type: string
-        description: |
-          The value the preference was changed to.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
-      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
-      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  new_tab_experience:
-    type: string
-    description: |
-      The name of the view that the user wants to see on new tabs.
-      For example History, Homepage or Blank. It is used to measure
-      usage of this feature, to see how effective feature promotion
-      campaigns are and to establish a baseline number for when we
-      introduce the new Activity Stream features.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
-      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
-      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  home_page_setting:
-    type: string
-    description: |
-      The setting a user chooses as their Home page. By default,
-      it is initially set to Firefox Home.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/8887
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/8887
-      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
-      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
-      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  save_logins:
-    type: boolean
-    description: |
-      Measures the state of the "Save Logins" preference.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
-      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
-      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  show_clipboard_bar:
-    type: boolean
-    description: |
-      Measures the state of the "Show Clipboard Bar" preference.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
-      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
-      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  tips_and_features_notifs:
-    type: boolean
-    description: |
-      True if notifications for tips and features are allowed, otherwise false.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14907
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15114
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  sync_notifs:
-    type: boolean
-    description: |
-      True if notifications for sync are allowed, otherwise false.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14907
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15114
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  fxa_logged_in:
-    type: boolean
-    description: |
-      Measures the state of the fxa login.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14904
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15181
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  close_private_tabs:
-    type: boolean
-    description: |
-      Measures the state of the "Close Private Tabs" preference.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
-      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
-      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
-      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  jump_back_in:
-    type: boolean
-    description: |
-      An indication of whether the Jump back in section
-      is enabled to be displayed.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  recently_visited:
-    type: boolean
-    description: |
-      An indication of whether the Recently visited section
-      is enabled to be displayed.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  recently_saved:
-    type: boolean
-    description: |
-      An indication of whether the recently saved section
-      is enabled to be displayed.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  pocket:
-    type: boolean
-    description: |
-      An indication of whether Pocket is enabled to be displayed.
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  opening_screen:
-    type: string
-    description: |
-      What opening screen preference the user has selected under
-      "Customize Home". "homepage," "last tab," or
-      "homepage after 4 hours" default: "homepage after 4 hours".
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
-  autoplay_setting_changed:
-    type: event
-    description: |
-      Event for user changing the autoplay setting
-    extra_keys:
-      media_type:
-        type: string
-        description: |
-          We either send "allowAudioAndVideo", "blockAudio" or "blockAudioAndVideo".
-          Default is "allowAudioAndVideo".
-    bugs:
-      - https://github.com/mozilla-mobile/firefox-ios/issues/12862
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-ios/pull/TODO
-    notification_emails:
-      - fx-ios-data-stewards@mozilla.com
-    expires: "2025-07-01"
 
 # Private Browsing
 private_browsing:
diff --git a/firefox-ios/Client/pings.yaml b/firefox-ios/Client/Glean/pings.yaml
similarity index 100%
rename from firefox-ios/Client/pings.yaml
rename to firefox-ios/Client/Glean/pings.yaml
diff --git a/firefox-ios/Client/Glean/settings.yaml b/firefox-ios/Client/Glean/settings.yaml
new file mode 100644
index 0000000000000..ea4fbe582906d
--- /dev/null
+++ b/firefox-ios/Client/Glean/settings.yaml
@@ -0,0 +1,264 @@
+# 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/.
+
+# This file defines the metrics that are recorded by the Glean SDK. They are
+# automatically converted to Kotlin code at build time using the `glean_parser`
+# PyPI package.
+
+# This file is organized (roughly) alphabetically by metric names
+# for easy navigation
+
+---
+$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
+
+$tags:
+  - Settings
+
+###############################################################################
+# Legacy "preferences" telemetry to be expired and/or migrated to "settings" 
+# telemetry.
+###############################################################################
+preferences:
+  changed:
+    type: event
+    description: |
+      Recorded when a preference is changed and includes the
+      preference that changed as well as the value changed to
+      recorded in the extra keys.
+    extra_keys:
+      preference:
+        type: string
+        description: |
+          The preference that was changed.
+      changed_to:
+        type: string
+        description: |
+          The value the preference was changed to.
+    bugs:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
+      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
+      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  new_tab_experience:
+    type: string
+    description: |
+      The name of the view that the user wants to see on new tabs.
+      For example History, Homepage or Blank. It is used to measure
+      usage of this feature, to see how effective feature promotion
+      campaigns are and to establish a baseline number for when we
+      introduce the new Activity Stream features.
+    bugs:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
+      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
+      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  home_page_setting:
+    type: string
+    description: |
+      The setting a user chooses as their Home page. By default,
+      it is initially set to Firefox Home.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/8887
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/8887
+      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
+      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
+      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  save_logins:
+    type: boolean
+    description: |
+      Measures the state of the "Save Logins" preference.
+    bugs:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
+      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
+      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  show_clipboard_bar:
+    type: boolean
+    description: |
+      Measures the state of the "Show Clipboard Bar" preference.
+    bugs:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
+      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
+      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  tips_and_features_notifs:
+    type: boolean
+    description: |
+      True if notifications for tips and features are allowed, otherwise false.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14907
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15114
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  sync_notifs:
+    type: boolean
+    description: |
+      True if notifications for sync are allowed, otherwise false.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14907
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15114
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  fxa_logged_in:
+    type: boolean
+    description: |
+      Measures the state of the fxa login.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14904
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15181
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  close_private_tabs:
+    type: boolean
+    description: |
+      Measures the state of the "Close Private Tabs" preference.
+    bugs:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1644846
+      - https://github.com/mozilla-mobile/firefox-ios/pull/9673
+      - https://github.com/mozilla-mobile/firefox-ios/pull/12334
+      - https://github.com/mozilla-mobile/firefox-ios/pull/14102
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  jump_back_in:
+    type: boolean
+    description: |
+      An indication of whether the Jump back in section
+      is enabled to be displayed.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  recently_visited:
+    type: boolean
+    description: |
+      An indication of whether the Recently visited section
+      is enabled to be displayed.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  recently_saved:
+    type: boolean
+    description: |
+      An indication of whether the recently saved section
+      is enabled to be displayed.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  pocket:
+    type: boolean
+    description: |
+      An indication of whether Pocket is enabled to be displayed.
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  opening_screen:
+    type: string
+    description: |
+      What opening screen preference the user has selected under
+      "Customize Home". "homepage," "last tab," or
+      "homepage after 4 hours" default: "homepage after 4 hours".
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/14908
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/15583
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+  autoplay_setting_changed:
+    type: event
+    description: |
+      Event for user changing the autoplay setting
+    extra_keys:
+      media_type:
+        type: string
+        description: |
+          We either send "allowAudioAndVideo", "blockAudio" or "blockAudioAndVideo".
+          Default is "allowAudioAndVideo".
+    bugs:
+      - https://github.com/mozilla-mobile/firefox-ios/issues/12862
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/TODO
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-07-01"
+
+###############################################################################
+# New "settings" telemetry properly nested under "settings".
+###############################################################################
+
+# App Icon Settings
+settings.app_icon:
+  selected:
+    type: event
+    description: |
+      Records when the user changes their app icon in the app settings.
+    extra_keys:
+      new_name:
+        type: string
+        description: |
+          The name of the new app icon the user has selected. Options
+          are listed in the AppIcon enumeration.
+      old_name:
+        type: string
+        description: |
+          The name of the app icon the user had previously selected.
+          Returns "unknown" if the previous icon had an invalid name.
+    bugs:
+      - https://mozilla-hub.atlassian.net/browse/FXIOS-11473
+    data_reviews:
+      - https://github.com/mozilla-mobile/firefox-ios/pull/25029
+    notification_emails:
+      - fx-ios-data-stewards@mozilla.com
+    expires: "2025-06-01"
+    metadata:
+      tags:
+        - AppIconSelection
diff --git a/firefox-ios/Client/tags.yaml b/firefox-ios/Client/Glean/tags.yaml
similarity index 87%
rename from firefox-ios/Client/tags.yaml
rename to firefox-ios/Client/Glean/tags.yaml
index b7454b46e3779..9071edb70a6dc 100644
--- a/firefox-ios/Client/tags.yaml
+++ b/firefox-ios/Client/Glean/tags.yaml
@@ -11,31 +11,35 @@
 ---
 $schema: moz://mozilla.org/schemas/glean/tags/1-0-0
   
+###############################################################################
+# Please add your tags alphabetically.
+###############################################################################
+
 AppIconSelection:
   description: Corresponds to the feature where users can change their default app icon in the settings.
 
 ContextMenu:
   description: Corresponds to any context menu in the app.
 
-Library:
-  description: Corresponds to library, containing bookmarks, history, reading list, and downloads.
-
 HistoryPanel:
   description: Corresponds to the history panel of the library.
 
 Homepage:
   description: Corresponds to the homepage feature and all content that resides on the page.
 
+Library:
+  description: Corresponds to library, containing bookmarks, history, reading list, and downloads.
+
 Settings:
   description: Corresponds to all the options encompassed in the app's settings screens.
 
-TopSites:
-  description: Corresponds to the [Feature:TopSites](https://mozilla-hub.atlassian.net/browse/FXIOS-3464)
-    label on GitHub.
-  
 TabsPanel:
   description: Corresponds to all things related to the tab panel.
-
+  
 Toasts:
   description: Corresponds to any events around toasts in the app. Toasts are the shortlived banners that 
     appear when an action is taken.
+
+TopSites:
+  description: Corresponds to the [Feature:TopSites](https://mozilla-hub.atlassian.net/browse/FXIOS-3464)
+    label on GitHub.


Reviews:
user: login: ih-codes
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-02T22:32:25Z
user: login: Foxbolts
body: super small nits. Excited to not have a giant metrics file anymore 🥳 
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-07T15:23:35Z
user: login: Foxbolts
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-07T15:28:51Z

Review comments:
diff_hunk: @@ -11,31 +11,35 @@
 ---
 $schema: moz://mozilla.org/schemas/glean/tags/1-0-0
   
+###############################################################################
+# Please add your tags alphabetically.
+###############################################################################
path: firefox-ios/Client/Glean/tags.yaml
user: login: ih-codes
body: This file is unchanged, I just reorganized the tags to be listed alphabetically.
created_at: 2025-05-02T22:32:25Z
author_association: COLLABORATOR
diff_hunk: @@ -11,31 +11,35 @@
 ---
 $schema: moz://mozilla.org/schemas/glean/tags/1-0-0
   
+###############################################################################
+# Please add your tags alphabetically.
+###############################################################################
+
 AppIconSelection:
   description: Corresponds to the feature where users can change their default app icon in the settings.
 
 ContextMenu:
   description: Corresponds to any context menu in the app.
 
-Library:
-  description: Corresponds to library, containing bookmarks, history, reading list, and downloads.
-
 HistoryPanel:
   description: Corresponds to the history panel of the library.
 
 Homepage:
   description: Corresponds to the homepage feature and all content that resides on the page.
 
+Library:
+  description: Corresponds to library, containing bookmarks, history, reading list, and downloads.
+
 Settings:
   description: Corresponds to all the options encompassed in the app's settings screens.
 
-TopSites:
-  description: Corresponds to the [Feature:TopSites](https://mozilla-hub.atlassian.net/browse/FXIOS-3464)
-    label on GitHub.
-  
 TabsPanel:
   description: Corresponds to all things related to the tab panel.
-
+  
path: firefox-ios/Client/Glean/tags.yaml
user: login: Foxbolts
body: extra whitespace 🙃
created_at: 2025-05-07T15:16:54Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,264 @@
+# 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/.
+
+# This file defines the metrics that are recorded by the Glean SDK. They are
+# automatically converted to Kotlin code at build time using the `glean_parser`
path: firefox-ios/Client/Glean/settings.yaml
user: login: Foxbolts
body: ```suggestion
# automatically converted to Swift code at build time using the `glean_parser`
```
created_at: 2025-05-07T15:20:55Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,264 @@
+# 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/.
+
+# This file defines the metrics that are recorded by the Glean SDK. They are
+# automatically converted to Kotlin code at build time using the `glean_parser`
+# PyPI package.
+
+# This file is organized (roughly) alphabetically by metric names
+# for easy navigation
+
+---
+$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
+
+$tags:
+  - Settings
+
+###############################################################################
+# Legacy "preferences" telemetry to be expired and/or migrated to "settings" 
+# telemetry.
+###############################################################################
path: firefox-ios/Client/Glean/settings.yaml
user: login: Foxbolts
body: ```suggestion
###############################################################################
# Legacy "preferences" telemetry to be expired and/or migrated to "settings" 
# telemetry.
###############################################################################

```

For consistency with the line break after the "New "settings" comment
created_at: 2025-05-07T15:22:35Z
author_association: COLLABORATOR

PR comments:
user: login: mobiletest-ci-bot
created_at: 2025-05-02T22:41:10Z
body: 
<!--
  0 failure: 
  0 warning: 
  2 messages
  
  DangerID: danger-id-Danger;
-->



<table>
  <thead>
    <tr>
      <th width="50"></th>
      <th width="100%" data-danger-table="true">Messages</th>
    </tr>
  </thead>
  <tbody><tr>
      <td>:book:</td>
      <td>Edited 4 files</td>
    </tr>
  
<tr>
      <td>:book:</td>
      <td>Created 1 files</td>
    </tr>
  </tbody>
</table>


<p align="right">
  Generated by :no_entry_sign: <a href="https://danger.systems/swift">Danger Swift</a> against 4c97c4d635b1df6a6b1f5d2635dea4d070b79817
</p>

author_association: NONE
user: login: ih-codes
created_at: 2025-05-02T22:42:33Z
body: Hmmmm apparently there's a workflow that relies on the [Glean probe scraper](https://github.com/mozilla/probe-scraper) that's failing. Will look into this Monday. But I might have to revert this work unless we can get that updated.
author_association: COLLABORATOR
user: login: badboy
created_at: 2025-05-06T16:02:43Z
body: Ah, so the "good" thing is the Glean probe-scraper task is not blocking (see also: #17860) 
So what will need to happen is:

1. This PR would need to be merged with the task failing for now
2. A PR needs to change the paths here: https://github.com/mozilla/probe-scraper/blob/dba2c450debf005fd6ebe31428cbe0d7a3b3dd2d/repositories.yaml#L814-L820
3. The next PR on firefox-ios should be clean again

the probe-scraper will updates URLs (as shown for metrics in the dictionary: https://dictionary.telemetry.mozilla.org/apps/firefox_ios) on the next run then and all should be fine. It will just be part of the metric history we track.
We only ever scrape the `main` branch of `firefox-ios`. Other branches aren't ever scraped, so no problems there either.

I suggest doing the changes of (2) and sending the PR. I can also do a dry-run then. 
And we can merge them in quick succession, so that all runs smoothly.
author_association: MEMBER
user: login: ih-codes
created_at: 2025-05-06T17:18:20Z
body: Thanks so much for taking a look and giving me an idea of the process @badboy, much appreciated! 🙏  I've opened a [PR](https://github.com/mozilla/probe-scraper/pull/902) on the probe-scraper repo. We'll wait for the go-ahead and try to merge both these PRs in quick succession, like you suggested.

I'll be away on May 8 so we can wait until we're both available to coordinate the merges.

@mattreaganmozilla This code is ready for review! Thanks!
author_association: COLLABORATOR
user: login: mergify[bot]
created_at: 2025-05-06T20:26:43Z
body: This pull request has conflicts when rebasing. Could you fix it @ih-codes? 🙏
author_association: CONTRIBUTOR
user: login: ih-codes
created_at: 2025-05-07T15:28:05Z
body: > super small nits. Excited to not have a giant metrics file anymore 🥳

These are great suggestions, thanks for looking closely @Foxbolts ! I'm going to catch them in another small PR later today just so we don't hold up getting the probe-scraper side merged.

Edit: Here's the followup PR: https://github.com/mozilla-mobile/firefox-ios/pull/26590
author_association: COLLABORATOR