Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Fix #157: Add Firefox UI telemetry probes #199

Merged
merged 2 commits into from
Oct 23, 2018
Merged

Conversation

biancadanforth
Copy link
Collaborator

  • 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.

@biancadanforth biancadanforth requested a review from Osmose October 23, 2018 18:45
@biancadanforth
Copy link
Collaborator Author

@Osmose Ready for your review! Should hopefully be less painful than the first telemetry probes PR (#169 ), as this builds on top of it.

Copy link
Contributor

@Osmose Osmose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc, nice work! I'll apply the changes and get this merged myself.


// sendMessage/onMessage handlers

export const messageHandlers = new Map([
['extracted-product', handleExtractedProductData],
['config', handleConfigMessage],
['telemetry', async message => recordEvent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably define this handler elsewhere to match the pattern of the other handlers.

CustomizableUI.removeListener(toolbarButton);
};
},
).api(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is rad as hell!

biancadanforth and others added 2 commits October 23, 2018 16:44
* 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.
@Osmose Osmose force-pushed the 157-firefox-ui-probes branch from e758504 to ac7630c Compare October 23, 2018 23:51
@Osmose Osmose merged commit 33562f2 into master Oct 23, 2018
@Osmose Osmose deleted the 157-firefox-ui-probes branch October 23, 2018 23:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants