Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Comments

Instrument the restart-required flows (closes #1375).#1381

Merged
chuckharmston merged 1 commit intomozilla:masterfrom
chuckharmston:1375-restart-ga
Sep 19, 2016
Merged

Instrument the restart-required flows (closes #1375).#1381
chuckharmston merged 1 commit intomozilla:masterfrom
chuckharmston:1375-restart-ga

Conversation

@chuckharmston
Copy link

@chuckharmston
Copy link
Author

Note: the UTMs were added in #1379, where I added the restart-tab-opening.

@ckprice ckprice self-assigned this Sep 19, 2016
if (useMozAddonManager) {
sendToGA('event', gaEvent);
mozAddonManagerInstall(downloadUrl).then(() => {
gaEvent.eventValue = RESTART_REQUIRED ? 1 : 0;
Copy link

Choose a reason for hiding this comment

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

RESTART_NEEDED?

Copy link
Author

Choose a reason for hiding this comment

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

...yeah. I don't know why this worked when I tested it out, I'm going to backtrack to make sure it's doing what's intended.

Copy link
Author

Choose a reason for hiding this comment

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

At least the tests failed.

Copy link
Contributor

@lmorchard lmorchard left a comment

Choose a reason for hiding this comment

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

Code looks 💯 to me.

@pdehaan
Copy link
Contributor

pdehaan commented Sep 19, 2016

Needs a rebasin', but not sure if we want to fix the "Insturment" typo in commit message while we're at it. :trollface:

if (useMozAddonManager) {
sendToGA('event', gaEvent);
mozAddonManagerInstall(downloadUrl).then(() => {
gaEvent.eventValue = RESTART_NEEDED ? 1 : 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just casting a Boolean to an int? And if so, couldn't you just do gaEvent.eventValue = Number(RESTART_NEEDED);?

$ node -e console.log(Number(true));  # 1
$ node -e console.log(Number(false)); # 0

Copy link
Author

@chuckharmston chuckharmston Sep 19, 2016

Choose a reason for hiding this comment

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

Yeah, but when you're giving numbers magic values, I'd rather be explicit about what the range of values are. Clear > cute.

@chuckharmston chuckharmston changed the title Insturment the restart-required flows (closes #1375). Instrument the restart-required flows (closes #1375). Sep 19, 2016
@ckprice
Copy link

ckprice commented Sep 19, 2016

I pulled the branch down, and there were no errors, but I wasn't able to fully test the small measurement pieces (eventValue and utm values). I ventured down #1330 (comment) to enable mozAddonManager, but ended up doing more harm than good here I think. Can we merge this in, and I'll take an action item to test on dev (assuming it's any easier there)?

@chuckharmston
Copy link
Author

Sure. Merging.

@chuckharmston chuckharmston merged commit 383d9ed into mozilla:master Sep 19, 2016
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.

4 participants