Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 59 additions & 59 deletions src/content/documentation/develop/firefox-builtin-data-consent.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,27 @@ To use Firefox's built-in consent experience, you have to specify what data your

## Taxonomy

Firefox uses categories to standardize data collection information for developers and users. In line with the [policies](/documentation/publish/add-on-policies/), there are two types of data: *Personal data* and *Technical and Interaction data*.
Firefox uses categories to standardize data collection information for developers and users. In line with the [policies](/documentation/publish/add-on-policies/), there are two types of data: *Technical and Interaction data* and *Personal data*.

### Technical and interaction data

Technical data describes the environment the user is running, such as browser settings, platform information, and hardware properties. User interaction data includes how the user interacts with Firefox and the installed add-on, metrics for product improvement, and error information.

| Data type<br>visible during install | Data collection permission<br>used in the manifest | Definition and examples |
|-------------------------------------|----------------------------------------------------|------------------------------------------------------------------------------------------------|
| **Technical and interaction data** | `technicalAndInteraction` | Examples: Device and browser info, extension usage and settings data, crash and error reports. |

{% endcapture %}
{% include modules/column-w-toc.liquid,
id: "taxonomy"
content: content_with_toc
%}

<!-- END: Content with Table of Contents -->

<!-- Single Column Body Module -->

{% capture content %}

### Personal data

Expand All @@ -64,29 +84,53 @@ Personally identifiable information can be actively provided by the user or obta
| **Search terms** | `searchTerms` | Search terms entered into search engines or the browser. | yes |
| **Bookmarks** | `bookmarksInfo` | Information about Firefox bookmarks, including specific websites, bookmark names, and folder names. | yes |

## Specifying data types

You specify the data types your extension transmits in the `browser_specific_settings.gecko.data_collection_permissions` key in the `manifest.json` file. As a reminder, the policies state that data transmission refers to any data collected, used, transferred, shared, or handled outside the add-on or the local browser.

### Technical and interaction data

Technical data describes the environment the user is running, such as browser settings, platform information, and hardware properties. User interaction data includes how the user interacts with Firefox and the installed add-on, metrics for product improvement, and error information.
The `technicalAndInteraction` data type behaves differently from all other data types. This data permission must be optional, but unlike other optional data collection options, the user can turn this permission on or off during the installation flow. This choice is available in the optional settings section of the extension installation prompt.

| Data type<br>visible during install | Data collection permission<br>used in the manifest | Definition and examples |
|-------------------------------------|----------------------------------------------------|------------------------------------------------------------------------------------------------|
| **Technical and interaction data** | `technicalAndInteraction` | Examples: Device and browser info, extension usage and settings data, crash and error reports. |
### No data collection

{% endcapture %}
{% include modules/column-w-toc.liquid,
id: "taxonomy"
content: content_with_toc
%}
If your extension doesn’t collect or transmit any data, you indicate that by specifying the `none` required permission in the manifest, as follows:

<!-- END: Content with Table of Contents -->
```json
{
"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>"
]
}
```

<!-- Single Column Body Module -->
When a user attempts to install this extension, Firefox shows the usual installation prompt with the description of the required (API) permissions and a description to indicate that the extension doesn’t collect any data, like this:

{% capture content %}
![The extension installation prompt shows the no data transmission ar defined in the manifest](/assets/img/documentation/develop/data-collection-permissions-prompt-install-no-transmission.webp)

## Specifying data types
The "no data collected" type is also listed in the *Permissions and data* tab of the extension in `about:addons`, like this:

You specify the data types your extension transmits in the `browser_specific_settings.gecko.data_collection_permissions` key in the `manifest.json` file. As a reminder, the policies state that data transmission refers to any data collected, used, transferred, shared, or handled outside the add-on or the local browser.
![The about:addons page shows the "no data collected" permission.](/assets/img/documentation/develop/data-collection-permissions-about-addons-no-transmission.webp)

{% endcapture %}
{% include modules/one-column.liquid,
id: "specifying-data-types"
content: content
%}

{% capture content %}

### Personal data

Expand Down Expand Up @@ -157,50 +201,6 @@ This adds the "required" data collection paragraph to the installation prompt. T

Optional data collection permissions are specified using the optional list. These aren’t presented during installation (except for `technicalAndInteraction`), and they aren’t granted by default. The extension can request that the user opts in to this data collection after installation by calling [`permissions.request()`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions/request) in a user-activated event handler, and the user can turn this optional data collection on or off in `about:addons` in the *Permissions and data* section of the extension settings.

### Technical and interaction data

The `technicalAndInteraction` data type behaves differently from all other data types. This data permission must be optional, but unlike other optional data collection options, the user can turn this permission on or off during the installation flow. This choice is available in the optional settings section of the extension installation prompt.

### No data collection

If your extension doesn’t collect or transmit any data, you indicate that by specifying the `none` required permission in the manifest, as follows:

```json
{
"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 shows the usual installation prompt with the description of the required (API) permissions and a description to indicate that the extension doesn’t collect any data, like this:

![The extension installation prompt shows the no data transmission ar defined in the manifest](/assets/img/documentation/develop/data-collection-permissions-prompt-install-no-transmission.webp)

The "no data collected" type is also listed in the *Permissions and data* tab of the extension in `about:addons`, like this:

![The about:addons page shows the "no data collected" permission.](/assets/img/documentation/develop/data-collection-permissions-about-addons-no-transmission.webp)

{% endcapture %}
{% include modules/one-column.liquid,
id: "specifying-data-types"
content: content
%}

{% capture content %}

## Accessing the data collection permissions programmatically

You use the [`browser.permissions` API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions) to interact with the optional data permissions. Specifically, the `getAll()` method returns the list of granted optional data permissions, as follows:
Expand Down