for #306: Telemetry for container assignment events
This commit is contained in:
parent
ca1a926e70
commit
d09de47646
5 changed files with 60 additions and 2 deletions
|
@ -189,6 +189,45 @@ of a `testpilottest` telemetry ping for each scenario.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* The user chooses "Always Open in this Container" context menu option. (Note: We send two separate event names: one for assigning a site to a container, one for removing a site from a container.)
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"uuid": <uuid>,
|
||||||
|
"userContextId": <userContextId>,
|
||||||
|
"event": "[added|removed]-container-assignment"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* Firefox prompts the user to reload a site into a container after the user picked "Always Open in this Container".
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"uuid": <uuid>,
|
||||||
|
"userContextId": <userContextId>,
|
||||||
|
"event": "prompt-reload-page-in-container"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* The user clicks "Take me there" to reload a site into a container after the user picked "Always Open in this Container".
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"uuid": <uuid>,
|
||||||
|
"event": "click-to-reload-page-in-container"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* Firefox automatically reloads a site into a container after the user picked "Always Open in this Container".
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"uuid": <uuid>,
|
||||||
|
"userContextId": <userContextId>,
|
||||||
|
"event": "auto-reload-page-in-container"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### A Redshift schema for the payload:
|
### A Redshift schema for the payload:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "testpilot-containers",
|
"name": "testpilot-containers",
|
||||||
"title": "Containers Experiment",
|
"title": "Containers Experiment",
|
||||||
"description": "Containers works by isolating cookie jars using separate origin-attributes defined visually by colored ‘Container Tabs’. This add-on is a modified version of the containers feature for Firefox Test Pilot.",
|
"description": "Containers works by isolating cookie jars using separate origin-attributes defined visually by colored ‘Container Tabs’. This add-on is a modified version of the containers feature for Firefox Test Pilot.",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/mozilla/testpilot-containers/issues"
|
"url": "https://github.com/mozilla/testpilot-containers/issues"
|
||||||
|
|
|
@ -115,6 +115,11 @@ const assignManager = {
|
||||||
message: `Successfully ${actionName} site to always open in this container`,
|
message: `Successfully ${actionName} site to always open in this container`,
|
||||||
iconUrl: browser.extension.getURL("/img/onboarding-1.png")
|
iconUrl: browser.extension.getURL("/img/onboarding-1.png")
|
||||||
});
|
});
|
||||||
|
browser.runtime.sendMessage({
|
||||||
|
method: "sendTelemetryPayload",
|
||||||
|
event: `${actionName}-container-assignment`,
|
||||||
|
userContextId: userContextId,
|
||||||
|
});
|
||||||
this.calculateContextMenu(tab);
|
this.calculateContextMenu(tab);
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -227,7 +232,17 @@ const assignManager = {
|
||||||
// If the user has explicitly checked "Never Ask Again" on the warning page we will send them straight there
|
// If the user has explicitly checked "Never Ask Again" on the warning page we will send them straight there
|
||||||
if (neverAsk) {
|
if (neverAsk) {
|
||||||
browser.tabs.create({url, cookieStoreId: `firefox-container-${userContextId}`, index});
|
browser.tabs.create({url, cookieStoreId: `firefox-container-${userContextId}`, index});
|
||||||
|
browser.runtime.sendMessage({
|
||||||
|
method: "sendTelemetryPayload",
|
||||||
|
event: "auto-reload-page-in-container",
|
||||||
|
userContextId: userContextId,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
browser.runtime.sendMessage({
|
||||||
|
method: "sendTelemetryPayload",
|
||||||
|
event: "prompt-to-reload-page-in-container",
|
||||||
|
userContextId: userContextId,
|
||||||
|
});
|
||||||
const confirmUrl = `${loadPage}?url=${url}`;
|
const confirmUrl = `${loadPage}?url=${url}`;
|
||||||
browser.tabs.create({url: confirmUrl, cookieStoreId: `firefox-container-${userContextId}`, index}).then(() => {
|
browser.tabs.create({url: confirmUrl, cookieStoreId: `firefox-container-${userContextId}`, index}).then(() => {
|
||||||
// We don't want to sync this URL ever nor clutter the users history
|
// We don't want to sync this URL ever nor clutter the users history
|
||||||
|
|
|
@ -17,6 +17,10 @@ document.getElementById("redirect-form").addEventListener("submit", (e) => {
|
||||||
// Can't really do much here user will have to click it again
|
// Can't really do much here user will have to click it again
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
browser.runtime.sendMessage({
|
||||||
|
method: "sendTelemetryPayload",
|
||||||
|
event: "click-to-reload-page-in-container",
|
||||||
|
});
|
||||||
redirect();
|
redirect();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Containers Experiment",
|
"name": "Containers Experiment",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
|
|
||||||
"description": "Containers works by isolating cookie jars using separate origin-attributes defined visually by colored ‘Container Tabs’. This add-on is a modified version of the containers feature for Firefox Test Pilot.",
|
"description": "Containers works by isolating cookie jars using separate origin-attributes defined visually by colored ‘Container Tabs’. This add-on is a modified version of the containers feature for Firefox Test Pilot.",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue