<commit_before># METRICS

## Data Analysis
The collected data will primarily be used to answer the following questions.
Images are used for visualization and are not composed of actual data.

### Do users install and run this?

What is the overall engagement of the Containers experiment?
**This is the standard Daily Active User (DAU) and Monthly Active User (MAU) analysis.**

This captures data from the users who have the add-on installed, regardless of
whether they are actively interacting with it.

![](kpi-1.png)

### Immediate Questions

* Do people use the containers feature & how do people create new container tabs?
  * Click to create new container tab
    * \+ `entry-point` value: "tab-bar" or "pop-up"
* Do people who use the containers feature continue to use it?
  * Retention: opening a second container tab (second tab in the same container, or a tab in a second container?)
* What containers do people use?
  * userContextId
    * \+ Number of tabs in the container (when should we measure this? on every tab open?)
* Do people edit their containers?
  * Click on "Edit Containers"
  * Click to edit a single container
    * Click "OK"
  * Click to delete a single container
    * Click "OK"
  * Click to add a container
    * Click "OK"
* Do people sort the tabs?
  * Click sort
    * \+ Number of tabs when clicked
  * Average number of container tabs when sort was clicked
* Do users show and hide container tabs?
  * Click hide
    * \+ Number of tabs when clicked
    * \+ Number of hidden containers when clicked
  * Click show
    * \+ Number of tabs when clicked
    * \+ Number of shown containers when clicked
* Do users move container tabs to new windows?
  * Click move
    * \+ Number of tabs when clicked
  * Average number of container tabs when new window was clicked
* How many containers do users have hidden at the same time? (when should we measure this? each time a container is hidden?)
* Do users pin container tabs? (do we have existing Telemetry for pinning?)
* Do users visit more pages in container tabs than non-container tabs?

### Follow-up Questions

What are some follow-up questions we anticipate we will ask based on any of the
above answers/data?

* What is the average lifespan of a container tab? Is that longer or shorter than a regular tab? (if we don't have data on the latter, the former probably isn't worth gathering data on since we will have nothing to compare it to).

## Data Collection

### Server Side
There is currently no server side component to Containers.

### Client Side
Containers will use Test Pilot Telemetry with no batching of data.  Details
of when pings are sent are below, along with examples of the `payload` portion
of a `testpilottest` telemetry ping for each scenario.

* The user clicks on a container name to open a tab in that container

```js
  {
    "uuid": <uuid>,
    "userContextId": <userContextId>,
    "clickedContainerTabCount": <number-of-tabs-in-the-container>,
    "event": "open-tab",
    "eventSource": ["tab-bar"|"pop-up"|"file-menu"]
  }
```

* The user clicks "Edit Containers" in the pop-up

```js
  {
    "uuid": <uuid>,
    "event": "edit-containers"
  }
```

* The user clicks OK after clicking on a container edit icon in the pop-up

```js
  {
    "uuid": <uuid>,
    "userContextId": <userContextId>,
    "event": "edit-container"
  }
```<commit_msg>document "alltabs-menu" as an open tab source<commit_after># METRICS

## Data Analysis
The collected data will primarily be used to answer the following questions.
Images are used for visualization and are not composed of actual data.

### Do users install and run this?

What is the overall engagement of the Containers experiment?
**This is the standard Daily Active User (DAU) and Monthly Active User (MAU) analysis.**

This captures data from the users who have the add-on installed, regardless of
whether they are actively interacting with it.

![](kpi-1.png)

### Immediate Questions

* Do people use the containers feature & how do people create new container tabs?
  * Click to create new container tab
    * \+ `entry-point` value: "tab-bar" or "pop-up"
* Do people who use the containers feature continue to use it?
  * Retention: opening a second container tab (second tab in the same container, or a tab in a second container?)
* What containers do people use?
  * userContextId
    * \+ Number of tabs in the container (when should we measure this? on every tab open?)
* Do people edit their containers?
  * Click on "Edit Containers"
  * Click to edit a single container
    * Click "OK"
  * Click to delete a single container
    * Click "OK"
  * Click to add a container
    * Click "OK"
* Do people sort the tabs?
  * Click sort
    * \+ Number of tabs when clicked
  * Average number of container tabs when sort was clicked
* Do users show and hide container tabs?
  * Click hide
    * \+ Number of tabs when clicked
    * \+ Number of hidden containers when clicked
  * Click show
    * \+ Number of tabs when clicked
    * \+ Number of shown containers when clicked
* Do users move container tabs to new windows?
  * Click move
    * \+ Number of tabs when clicked
  * Average number of container tabs when new window was clicked
* How many containers do users have hidden at the same time? (when should we measure this? each time a container is hidden?)
* Do users pin container tabs? (do we have existing Telemetry for pinning?)
* Do users visit more pages in container tabs than non-container tabs?

### Follow-up Questions

What are some follow-up questions we anticipate we will ask based on any of the
above answers/data?

* What is the average lifespan of a container tab? Is that longer or shorter than a regular tab? (if we don't have data on the latter, the former probably isn't worth gathering data on since we will have nothing to compare it to).

## Data Collection

### Server Side
There is currently no server side component to Containers.

### Client Side
Containers will use Test Pilot Telemetry with no batching of data.  Details
of when pings are sent are below, along with examples of the `payload` portion
of a `testpilottest` telemetry ping for each scenario.

* The user clicks on a container name to open a tab in that container

```js
  {
    "uuid": <uuid>,
    "userContextId": <userContextId>,
    "clickedContainerTabCount": <number-of-tabs-in-the-container>,
    "event": "open-tab",
    "eventSource": ["tab-bar"|"pop-up"|"file-menu"|"alltabs-menu"]
  }
```

* The user clicks "Edit Containers" in the pop-up

```js
  {
    "uuid": <uuid>,
    "event": "edit-containers"
  }
```

* The user clicks OK after clicking on a container edit icon in the pop-up

```js
  {
    "uuid": <uuid>,
    "userContextId": <userContextId>,
    "event": "edit-container"
  }
```
{'fraction_non_alphanumeric': 0.0806903673108128, 'fraction_numerical': 0.0002950287653046172, 'mean_word_length': 3.6533973919011666, 'pattern_counts': {'":': 20, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1404688', 'n_tokens_mistral': 1903, 'n_tokens_neox': 1805, 'n_words': 968}