Skip to content
This repository has been archived by the owner. It is now read-only.

feat(metrics): emit a flow event for active experiments #4775

Merged
merged 1 commit into from Mar 2, 2017

Conversation

@philbooth
Copy link
Contributor

@philbooth philbooth commented Mar 2, 2017

Fixes #4290.

There is some additional monkeying around we can do in the import scripts, to make the experiment data available as metadata rather than a standalone event. But that can happen in a separate issue.

@mozilla/fxa-devs r?

Copy link
Member

@shane-tomlinson shane-tomlinson left a comment

Two things, the first a question (could metrics.logExperiment just call this.logFlowEvent), and the 2nd looks like a problem, I imagine the experiment should only be logged once.

@@ -36,7 +36,7 @@ define(function (require, exports, module) {
notifications: {},

/**
* The A/B testing group type, see https://en.wikipedia.org/wiki/A/B_testing for details.
* The A/B testing group type, usually either `'control'` or `'treatment'`.

This comment has been minimized.

@@ -151,6 +151,9 @@ define(function (require, exports, module) {
if (initResult) {
this._activeExperiments[experimentName] = experiment;
this.metrics.logExperiment(experimentName, experiment._groupType);
this.notifier.trigger('flow.event', {

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Mar 2, 2017
Member

Could metrics.logExperiment just invoke it's own logFlowEvent?

In addition, do you only want to log this once? If I keep switching between signin and signup, multiple experiment events are logged:

screen shot 2017-03-02 at 13 24 06

This comment has been minimized.

@philbooth

philbooth Mar 2, 2017
Author Contributor

Oh crikey, didn't notice that, thanks. Will fix.

@philbooth philbooth force-pushed the phil/issue-4290 branch from 2ce13cc to 1db27c8 Mar 2, 2017
@philbooth philbooth merged commit 799b4ab into master Mar 2, 2017
4 checks passed
4 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 98.378%
Details
@philbooth philbooth deleted the phil/issue-4290 branch Mar 2, 2017
Copy link
Member

@shane-tomlinson shane-tomlinson left a comment

I give an ex post facto r+

@rfk
Copy link
Member

@rfk rfk commented Mar 13, 2017

But that can happen in a separate issue.

Did this separate issue get filed?

@philbooth
Copy link
Contributor Author

@philbooth philbooth commented Mar 13, 2017

Did this separate issue get filed?

Good point, sorry, this had dropped off my radar temporarily. Opened in mozilla/fxa-activity-metrics#61.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants