Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Michael Kelly 60b8c2e884
#302: Remove links to deleted SUMO page. 2019-01-25 12:09:16 -08:00
Michael Kelly b5de0a98ff
Remove `visit_supported_site` metric. 2019-01-15 16:01:35 -08:00
Bianca Danforth 37a8502bf4
Fix #266: Update onboarding string to note support for U.S. domains only
Also update METRICS.md to add the `'amazon_smile_link'` value for the `element` extra key for the `open_nonproduct_page` event, since that was part of the string change request as well.
2018-11-28 16:00:55 -08:00
Bianca Danforth 54ed54d147
Incorporate feedback from Osmose and pdehaan 2018-11-12 15:48:19 -08:00
Bianca Danforth ce3e06e1e5
Update METRICS.md with 'event' ping
Update METRICS.md to accurately reflect the current state of event telemetry in Firefox and in the extension:
* Firefox 62 added a new 'event' ping, so events are no longer appended to the 'main' ping.
* 'addonsManager' events are only available in Firefox 64+.
* Extension event telemetry is disabled with certain cookie settings.
2018-11-09 13:42:38 -08:00
Bianca Danforth 3b0e2b3000
Revert privacy extra keys and break out 'open_external_page' into two events
This patch:
* Reverts "Collapse privacy extra keys into a single key" (commit 32fcfc4f924e2d53fb47dd615a090bda15e51e7c) while preserving the Common Extra Keys and Event-Specific Extra Keys subsections and updating the Sample Ping section in the METRICS.md document.
* Breaks out 'open_external_page' event (11 extra keys) into two events: 'open_nonproduct_page' (5 extra keys) and 'open_product_page' (10 extra keys).
2018-11-06 13:04:57 -08:00
Bianca Danforth e633803432
Update METRICS.md
Break up Extra Keys section into Common Extra Keys and Event-specific Extra Keys subsections. Update Sample Ping section to include additional common keys added from Issue #185.
2018-11-06 13:04:56 -08:00
Bianca Danforth 349787b8d5
Collapse privacy extra keys into a single key
Event Telemetry [limits the max number of extra keys](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) for an event to 10. In the fix for Issue #185, where three new privacy-related extra keys were added to every telemetry event, the number of extra keys for the 'open_external_page' event went to 11, which causes event telemetry to fail at the registration step.

This patch collapses these 3 privacy keys into a single key that points to a stringified JSON object.
2018-11-06 13:04:56 -08:00
Bianca Danforth 0bca7d982a
Fix #158: Add 'attempt_extraction' and 'complete_extraction' probes
* Update 'method' extra key for 'complete_extraction' event to have values of 'fathom', 'css_selectors', 'open_graph' or 'none' to distinguish between the two fallback extraction methods to Fathom: CSS Selectors or Open Graph attributes.
  * Note: Since none of our five supported sites use Open Graph attributes currently for product information, we should not expect to see any successful extraction using that method for the MVP.
* Important caveats for making conclusions using these probes as-is:
  * The coverage values that these probes will suggest will not be very accurate initially until we ensure we are extracting on only **product pages** for a supported site, rather than any page on the site (see Issues #225 and #181).
  * Successful extraction does not mean that the information extracted for the product is correct. It only means that _a_ value was extracted for each product feature (i.e. title, image and price) on the page.
2018-11-06 13:04:56 -08:00
Bianca Danforth 6bf71516aa
Rename telemetry event category to 'extension.price_wise' 2018-11-06 13:04:56 -08:00
Bianca Danforth 16a8fa3791
#158: Add badge_toolbar_button and send_notification probes
Add badge_toolbar_button and send_notification probes:
* Add an additional extra key, 'price_last_high' to 'send_notification' and 'open_external_page' (with 'element' value of 'system_notification') and update METRICS.md.
* Add a 'sendTelemetry' flag for the 'sendProductToBackground' function to also be removed when the 'resend' code is removed in './src/extraction/index.js'.
  * Due to the fix for Issue #192, I was seeing some extra 'badge_toolbar_button' events (with 'badge_type' of 'add') as we are resending extracted product information 5 and 10 seconds after the product page loads.
* Update METRICS.md to clarify when 'badge_toolbar_button' with a 'badge_type' of 'price_alert' fires, since it will continue to fire for the same price alert until that alert is dismissed which is not obvious.
2018-11-06 13:04:56 -08:00
Bianca Danforth 3743b4cfca
#158: Add 'detect_price_change' probe
Add 'detect_price_change' probe
* Add `price_prev` extra key for `detect_price_change` event. This will be the same value as `price_orig` if there is only one price entry for the product when updating prices. This will help us answer questions around how much prices change in addition to how frequently.
Additionally:
* Update the name of the extension in METRICS.md to Price Wise.
* Add Appendix B to METRICS.md which explains how to view recorded telemetry events in about:telemetry.
2018-11-06 13:04:55 -08:00
Michael Kelly 080d797348
Add links to SUMO explaining privacy settings. 2018-11-01 13:31:10 -07:00
Michael Kelly 9a5208a0c0
Make privacy telemetry keys consistent. 2018-11-01 10:57:55 -07:00
Michael Kelly a24b9362de
Fix #185: Include privacy context info in telemetry pings. 2018-11-01 10:55:38 -07:00
Michael Kelly 1211b0f987
Fix #208: Rename add-on to Price Wise. 2018-10-25 09:09:21 -07:00
Bianca Danforth f2022d4dd0
Fix #157: Add Firefox UI telemetry probes
* Add `visit_supported_site` and `hide_toolbar_button` probes.
  * `hide_toolbar_button` required adding a new experimental API, `customizeUI`, which allows the extension to be notified when the Firefox CustomizeUI module detects the `onWidgetRemoved` event. This event fires any time a widget is removed from the chrome, including browserAction buttons. The widget is identified by a widgetId.
* Update METRICS.md to move `uninstall` probe to Appendix, since it is handled by the Addons Manager's event telemetry already.
* Create a new ./src/telemetry/content.js file to handle sending messages to the background telemetry script to record events from content scripts.
2018-10-23 16:44:25 -07:00
Bianca Danforth dbf9036fc8 Fix #156: Add extension UI probes
* Add `open_popup`, `open_external_page`, `add_product`, `delete_product` and `undo_delete_product` probes (See ./docs/METRICS.md for their specifications).
* Update `badge_type` `extra_key` description in METRICS.md to add a new enum value of 'unknown' in the case that the badge text is unrecognized, and a badge type cannot be determined.
* Update `addProductFromExtracted` action creator to return a thunk, which returns a random UUID (v4) for use as a product key in telemetry. This allows us to differentiate one product from another for a particular user. This is NOT a universal product id across all users.
* Add `tabId` URL searchParam to browserAction popup URL when an extracted product is found on the current page in order to obtain the `badge_type` `extra_key` value for the `open_popup` event.
2018-10-22 16:16:22 -07:00
Michael Kelly 5b1795d054
Update name to Price Scout. 2018-10-22 14:36:53 -07:00
Bianca Danforth 1b88819279 Incorporate feedback from teonbrooks
* Add Feature Engagement definition.
2018-10-15 13:28:52 -07:00
Bianca Danforth 61a55bc39d Replace 'supported_sites' scalar with 'visit_supported_site' event
Event telemetry is easier from the analysis perspective to answer questions around frequency of visits.
2018-10-15 13:27:41 -07:00
Bianca Danforth d70ffd5d0e Incorporate more feedback
Incorporate more feedback on the metrics used for the extension.

METRICS.md
* For the `open_external_page` probe, moved the ‘objects’ enums to their own ‘extra_key’, ‘element’. This is so that the schema doesn’t have to change if the content of these UI elements changes down the road (feedback from Osmose).
* Arrange list items in Definitions section in alphabetical order and add Price Alert definition.
* Move questions under ‘Does it affect user behavior in Firefox?’ in the Analysis section to the ‘Questions to answer in future experiments’ subsection.
* Fixed probe name typos.
* Ensured consistent whitespace and use of markdown symbols.

telemetry.js
* Instead of exporting a single object, export the methods from the module directly.
* Update probes based on changes to METRICS.md

config.js
* Unrelated to the telemetry issue here; fixed a typo I noticed.
2018-10-15 13:27:41 -07:00
Bianca Danforth b11b726c32 Incorporate feedback from various sources
METRICS.md
* Reorganized the questions in the Analysis section to fall under broad categories of questions.
* Added a scalar 'supported_sites' to keep track of the number of times the user visits one of the five supported websites.
* Added an 'extra_keys' section that explains up front what each key represents.
* Made data types for all scalar and event telemetry values more explicit.
* Added a 'detect_price_change' event.
* Updated and added new keys to provide more context around certain events and ensure data collection is Category 1 or 2 at most.

telemetry.js
* Updated registered events and scalars to match METRICS.md

Note: While this patch does not record any events or scalars itself, recording can be tested with the following after 'telemetry.recordProbes()' in './src/background/index.js':
```javascript
await telemetry.scalarAdd('supported_sites', 1);
await telemetry.recordEvent(
  'badge_toolbar_button',
  'toolbar_button',
  null,
  {
    badge_type: 'add',
    tracked_prods: '5',
  },
);
```
2018-10-15 13:27:41 -07:00
Bianca Danforth 8d3a7e8030 Fix #134: Add METRICS.md and initial telemetry setup
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
2018-10-15 13:27:41 -07:00