Specifying data types
You specify data types your extension transmits in the browser_specific_settings.gecko.data_collection_permissions
key in the manifest.json
file. As a reminder, our policies state that data transmission refers to any data that is collected, used, transferred, shared, or handled outside of the add-on or the local browser.
Personal data
Personal data permissions can either be required or optional (only technicalAndInteraction
cannot be required, see the documentation further down):
"browser_specific_settings": {
"gecko": {
"data_collection_permissions": {
"required": [...],
"optional": [...]
}
}
}
The rest of this section describes each key in the data_collection_permissions
object.
Required data
When types of data are specified in the required list, users must opt in to this data collection to use the extension. Users cannot opt-out, and Figure 1 gives an example of how it could look. If a user does not agree to the data collection the extension is not installed. This gives the user a chance to review the data collection requirements of an extension before it is installed in their browser.
In the example manifest.json
file below, the developer specifies a single type of required data: locationInfo
.
{
"manifest_version": 2,
"name": "Example - Data collection with fallback",
"version": "1.0.0",
"permissions": [
"storage",
"management"
],
"browser_specific_settings": {
"gecko": {
"id": "example-data-collection-with-fallback@test.mozilla.org",
"data_collection_permissions": {
"required": [
"locationInfo"
],
"optional": [
"technicalAndInteraction"
]
}
}
},
"background": {
"scripts": [
"background.js"
]
},
"browser_action": {},
"options_ui": {
"page": "options/page.html"
}
}
This results in a new paragraph in the installation prompt (see Figure 1). The data permissions are also listed in about:addons
as shown in Figure 2.

Figure 1: Installation prompt with data types as specified in the manifest

Figure 2: The data permissions are also listed in about:addons
Optional data
Optional data collection permissions can be specified using the optional list. These are not surfaced during installation (except technicalAndInteraction
; see next section), and they are not granted by default. The extension can request the user opts in to this data collection after installation via a prompt, and the user can enable or disable this option data collection at any time in about:addons
in the Permissions and data section of the extension settings.
Technical and interaction data
The technicalAndInteraction
data type behaves differently compared to all others. This data permission can only be optional, but unlike other optional data collection options the user has the opportunity to enable or disable this during the installation flow. In Figure 1 above, this choice is available in the optional settings section of the installation prompt.
No data collection
If an extension does not collect or transmit any data, developers should explicitly indicate that by specifying the none
required permission in the manifest, as follows:
{
"manifest_version": 2,
"name": "extension without data collection",
"version": "1.0.0",
"browser_specific_settings": {
"gecko": {
"id": "@extension-without-data-collection",
"data_collection_permissions": {
"required": ["none"]
}
}
},
"permissions": [
"bookmarks",
"<all_urls>"
]
}
When a user attempts to install this extension, Firefox will show the usual installation prompt with the description of the required (API) permissions as well as a new description to indicate that the extension does not collect any data (see Figure 3).

Figure 3: Installation prompt with no data transmission defined in the manifest
The "no data collected" type is also listed in the Permissions and data tab of the extension in about:addons
as shown in Figure 4.

Figure 4: The "no data collected" permission is listed in about:addons