-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexperiments.ts
More file actions
49 lines (46 loc) · 1.18 KB
/
Copy pathexperiments.ts
File metadata and controls
49 lines (46 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { STAGE } from '../../config';
import { Experiments } from './types';
// Experiments config file:
// 1. To setup a new experiment, add a new object with the id of the experiment from Google Optimize
// 2. Keep track of the experiments by using the same name as defined in Google Optimize
// 3. Add all the variants and the variant weights
// 4. Don't forget to create a new experiment for each environment and to use the correct experiment id
// Example:
// {
// name: 'exp',
// id: 'xoo8Mc2ITTCSiXLjuOqrng',
// variants: [{ id: '0', weight: 0.5 }, { id: '1', weight: 0.5 }],
// }
const experiments: Experiments = {
dev: [
{
name: 'exp',
id: 'xoo8Mc2ITTCSiXLjuOqrng',
variants: [
{ id: '0', weight: 0.5 },
{ id: '1', weight: 0.5 },
],
},
],
staging: [
{
name: 'exp',
id: 'xoo8Mc2ITTCSiXLjuOqrng',
variants: [
{ id: '0', weight: 0.5 },
{ id: '1', weight: 0.5 },
],
},
],
prod: [
{
name: 'exp',
id: 'fs9HZij4RQyrPaONn_a2FQ',
variants: [
{ id: '0', weight: 0.5 },
{ id: '1', weight: 0.5 },
],
},
],
};
export default experiments[STAGE];