-
Notifications
You must be signed in to change notification settings - Fork 400
Add tracking to disco pane #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tracking to disco pane #513
Conversation
f5b040c
to
5b439f4
Compare
I think installed only happened once since we would change the state and the second time it would do nothing. This is what I noticed with themes though but I didn't dig into it then. |
I presume GA is smart enough to separate the data based on origin so we only need the one ID for dev, stage and production? |
src/core/tracking.js
Outdated
|
||
export class Tracking { | ||
|
||
constructor({trackingId, trackingEnabled, _log = log} = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think destructuring should have spaces so constructor({ trackingId, trackingEnabled, _log = log } = {}) {
Yep - you can work out stats by host. Addons-server only has one id set directly in JS. |
src/core/tracking.js
Outdated
* obj.value Number No Values must be non-negative. | ||
* Useful to pass counts (e.g. 4 times) | ||
*/ | ||
sendEvent({category, action, label, value} = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say destructuring format again here.
r+wc |
5b439f4
to
229343c
Compare
229343c
to
7e25dd8
Compare
Fixes mozilla/addons#5626