Skip to content

Commit

Permalink
removed local trafficcop and replaced with npm package (mozilla#11746)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-barrett authored Jun 9, 2022
1 parent 204f2eb commit 3db2c9d
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 343 deletions.
2 changes: 1 addition & 1 deletion docs/abtest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Traffic Cop experiments

More complex experiments, such as those that feature full page redesigns, or
multi-page user flows, should be implemented using `Traffic Cop
<https://github.com/mozilla/trafficcop/>`_. Traffic Cop small javascript
<https://github.com/mozmeao/trafficcop/>`_. Traffic Cop small javascript
library which will direct site traffic to different variants in a/b
experiments and make sure a visitor always sees the same variation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Accepted

## Context

Our current method for implementing multi-variant tests involves frequent, often non-trivial code changes to our most high traffic download pages. Prioritizing and running concurrent experiments on such pages is also often complex, increasing the risk of accidental breakage and making longer-term changes harder to roll out. Our current tool, [Traffic Cop](https://github.com/mozilla/trafficcop/), also requires significant custom code to accomodate these types of situations. Accurately measuring and reporting on the outcome of experiments is also a time consuming step of the process for our data science team, often requiring custom instrumentation and analysis.
Our current method for implementing multi-variant tests involves frequent, often non-trivial code changes to our most high traffic download pages. Prioritizing and running concurrent experiments on such pages is also often complex, increasing the risk of accidental breakage and making longer-term changes harder to roll out. Our current tool, [Traffic Cop](https://github.com/mozmeao/trafficcop/), also requires significant custom code to accomodate these types of situations. Accurately measuring and reporting on the outcome of experiments is also a time consuming step of the process for our data science team, often requiring custom instrumentation and analysis.

We would like to make our end-to-end experimentation process faster, with increased capacity, whilst also minimizing the performance impact and volume of code churn related to experiments running on our most important web pages.

Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ To configure switches for a demo branch. Follow the `configuration instructions
Traffic Cop
-----------

Currently, these switches are used to enable/disable `Traffic Cop <https://github.com/mozilla/trafficcop/>`_ experiments
Currently, these switches are used to enable/disable `Traffic Cop <https://github.com/mozmeao/trafficcop/>`_ experiments
on many pages of the site. We only add the Traffic Cop JavaScript snippet to a page when there is an active test. You
can see the current state of these switches and other configuration values in our `configuration
repo <https://mozmeao.github.io/www-config/configs/>`_.
Expand Down
2 changes: 1 addition & 1 deletion media/js/firefox/browsers/firefox-ios-sms-experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

(function (Mozilla) {
'use strict';

require('@mozmeao/trafficcop');
var href = window.location.href;

var initTrafficCop = function () {
Expand Down
1 change: 1 addition & 0 deletions media/js/firefox/welcome/welcome8-traffic-cop.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

(function (Mozilla) {
'use strict';
require('@mozmeao/trafficcop');
/* update dataLayer with experiment info */
var href = window.location.href;

Expand Down
1 change: 1 addition & 0 deletions media/js/firefox/whatsnew/whatsnew-101-en-experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
(function (Mozilla) {
'use strict';

require('@mozmeao/trafficcop');
var href = window.location.href;

var initTrafficCop = function () {
Expand Down
5 changes: 3 additions & 2 deletions media/js/firefox/whatsnew/whatsnew-99-en-experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
(function (Mozilla) {
'use strict';

require('@mozmeao/trafficcop');
var href = window.location.href;

var initTrafficCop = function () {
Expand All @@ -27,8 +28,8 @@
id: 'exp-wnp-99-en',
cookieExpires: 0,
variations: {
'v=1': 90,
'v=2': 10
'v=1': 10,
'v=2': 90
}
});
cop.init();
Expand Down
Loading

0 comments on commit 3db2c9d

Please sign in to comment.