make-mp-data 1.5.55 → 1.5.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +16 -2
- package/index.js +12 -2
- package/log.json +705 -94
- package/package.json +9 -2
- package/types.d.ts +8 -7
- package/dungeons/adspend.js +0 -96
- package/dungeons/anon.js +0 -104
- package/dungeons/big.js +0 -224
- package/dungeons/business.js +0 -327
- package/dungeons/complex.js +0 -396
- package/dungeons/foobar.js +0 -241
- package/dungeons/funnels.js +0 -220
- package/dungeons/gaming-experiments.js +0 -323
- package/dungeons/gaming.js +0 -314
- package/dungeons/governance.js +0 -288
- package/dungeons/mirror.js +0 -129
- package/dungeons/sanity.js +0 -118
- package/dungeons/scd.js +0 -205
- package/dungeons/session-replay.js +0 -175
- package/dungeons/simple.js +0 -150
- package/dungeons/userAgent.js +0 -190
package/dungeons/mirror.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the default configuration file for the data generator in SIMPLE mode
|
|
3
|
-
* notice how the config object is structured, and see it's type definition in ./types.d.ts
|
|
4
|
-
* feel free to modify this file to customize the data you generate
|
|
5
|
-
* see helper functions in utils.js for more ways to generate data
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Chance = require('chance');
|
|
12
|
-
const chance = new Chance();
|
|
13
|
-
const dayjs = require("dayjs");
|
|
14
|
-
const utc = require("dayjs/plugin/utc");
|
|
15
|
-
dayjs.extend(utc);
|
|
16
|
-
const { uid, comma } = require('ak-tools');
|
|
17
|
-
const { pickAWinner, weighNumRange, date, integer } = require('../components/utils');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/** @type {import('../types').Dungeon} */
|
|
21
|
-
const config = {
|
|
22
|
-
token: "",
|
|
23
|
-
seed: "mirror me",
|
|
24
|
-
numDays: 30, //how many days worth of data
|
|
25
|
-
numEvents: 10000, //how many events
|
|
26
|
-
numUsers: 1000, //how many users
|
|
27
|
-
format: 'json', //csv or json
|
|
28
|
-
region: "US",
|
|
29
|
-
hasAnonIds: true, //if true, anonymousIds are created for each user
|
|
30
|
-
hasSessionIds: false, //if true, hasSessionIds are created for each user
|
|
31
|
-
|
|
32
|
-
events: [
|
|
33
|
-
{
|
|
34
|
-
event: "foo",
|
|
35
|
-
weight: 10,
|
|
36
|
-
properties: {}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
event: "bar",
|
|
40
|
-
weight: 9,
|
|
41
|
-
properties: {}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
event: "baz",
|
|
45
|
-
weight: 8,
|
|
46
|
-
properties: {}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
event: "qux",
|
|
50
|
-
weight: 7,
|
|
51
|
-
properties: {}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
event: "garply",
|
|
55
|
-
weight: 6,
|
|
56
|
-
properties: {}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
event: "durtle",
|
|
60
|
-
weight: 5,
|
|
61
|
-
properties: {}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
event: "linny",
|
|
65
|
-
weight: 4,
|
|
66
|
-
properties: {}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
event: "fonk",
|
|
70
|
-
weight: 3,
|
|
71
|
-
properties: {}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
event: "crumn",
|
|
75
|
-
weight: 2,
|
|
76
|
-
properties: {}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
event: "yak",
|
|
80
|
-
weight: 1,
|
|
81
|
-
properties: {}
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
superProps: {
|
|
85
|
-
color: ["red", "orange", "yellow", "green", "blue", "indigo", "violet"],
|
|
86
|
-
deleteMe: ["hello", "world", "i", "should", "be", "deleted"],
|
|
87
|
-
updateMe: weighNumRange(1, 10)
|
|
88
|
-
},
|
|
89
|
-
userProps: {
|
|
90
|
-
title: chance.profession.bind(chance),
|
|
91
|
-
luckyNumber: weighNumRange(42, 420),
|
|
92
|
-
spiritAnimal: ["duck", "dog", "otter", "penguin", "cat", "elephant", "lion", "cheetah", "giraffe", "zebra", "rhino", "hippo", "whale", "dolphin", "shark", "octopus", "squid", "jellyfish", "starfish", "seahorse", "crab", "lobster", "shrimp", "clam", "snail", "slug", "butterfly", "moth", "bee", "wasp", "ant", "beetle", "ladybug", "caterpillar", "centipede", "millipede", "scorpion", "spider", "tarantula", "tick", "mite", "mosquito", "fly", "dragonfly", "damselfly", "grasshopper", "cricket", "locust", "mantis", "cockroach", "termite", "praying mantis", "walking stick", "stick bug", "leaf insect", "lacewing", "aphid", "cicada", "thrips", "psyllid", "scale insect", "whitefly", "mealybug", "planthopper", "leafhopper", "treehopper", "flea", "louse", "bedbug", "flea beetle", "weevil", "longhorn beetle", "leaf beetle", "tiger beetle", "ground beetle", "lady beetle", "firefly", "click beetle", "rove beetle", "scarab beetle", "dung beetle", "stag beetle", "rhinoceros beetle", "hercules beetle", "goliath beetle", "jewel beetle", "tortoise beetle"]
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
scdProps: {},
|
|
96
|
-
mirrorProps: {
|
|
97
|
-
"newlyCreated": {
|
|
98
|
-
events: "*",
|
|
99
|
-
strategy: "create",
|
|
100
|
-
values: ["fickle", "buckle", "tickle", "mackle"]
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
"deleteMe": {
|
|
104
|
-
events: "*",
|
|
105
|
-
strategy: "delete",
|
|
106
|
-
values: ["ignored"]
|
|
107
|
-
},
|
|
108
|
-
"fillMe": {
|
|
109
|
-
events: "*",
|
|
110
|
-
strategy: "fill",
|
|
111
|
-
values: ["deal", "with", "it"]
|
|
112
|
-
},
|
|
113
|
-
"updateMe": {
|
|
114
|
-
events: "*",
|
|
115
|
-
strategy: "update",
|
|
116
|
-
values: weighNumRange(11, 20)
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
groupKeys: [],
|
|
120
|
-
groupProps: {},
|
|
121
|
-
lookupTables: [],
|
|
122
|
-
hook: function (record, type, meta) {
|
|
123
|
-
return record;
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
module.exports = config;
|
package/dungeons/sanity.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the default configuration file for the data generator in SIMPLE mode
|
|
3
|
-
* notice how the config object is structured, and see it's type definition in ./types.d.ts
|
|
4
|
-
* feel free to modify this file to customize the data you generate
|
|
5
|
-
* see helper functions in utils.js for more ways to generate data
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Chance = require('chance');
|
|
12
|
-
const chance = new Chance();
|
|
13
|
-
const dayjs = require("dayjs");
|
|
14
|
-
const utc = require("dayjs/plugin/utc");
|
|
15
|
-
dayjs.extend(utc);
|
|
16
|
-
const { weighNumRange, integer } = require('../components/utils');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/** @type {import('../types').Dungeon} */
|
|
20
|
-
const config = {
|
|
21
|
-
token: "",
|
|
22
|
-
seed: "foo bar",
|
|
23
|
-
numDays: 90, //how many days worth of data
|
|
24
|
-
numEvents: 50_000, //how many events
|
|
25
|
-
numUsers: 500, //how many users
|
|
26
|
-
format: 'json', //csv or json
|
|
27
|
-
region: "US",
|
|
28
|
-
hasAnonIds: false, //if true, anonymousIds are created for each user
|
|
29
|
-
hasSessionIds: false, //if true, hasSessionIds are created for each user
|
|
30
|
-
alsoInferFunnels: true, //if true, infer funnels from events
|
|
31
|
-
makeChart: true,
|
|
32
|
-
funnels: [
|
|
33
|
-
{
|
|
34
|
-
sequence: ["qux", "garply", "durtle", "linny", "fonk", "crumn", "yak"],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
sequence: ["foo", "bar", "baz"],
|
|
38
|
-
isFirstFunnel: true,
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
events: [
|
|
42
|
-
{
|
|
43
|
-
event: "foo",
|
|
44
|
-
weight: 10,
|
|
45
|
-
properties: {}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
event: "bar",
|
|
49
|
-
weight: 9,
|
|
50
|
-
isFirstEvent: true,
|
|
51
|
-
properties: {}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
event: "baz",
|
|
55
|
-
weight: 8,
|
|
56
|
-
properties: {}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
event: "qux",
|
|
60
|
-
weight: 7,
|
|
61
|
-
properties: {}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
event: "garply",
|
|
65
|
-
weight: 6,
|
|
66
|
-
properties: {}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
event: "durtle",
|
|
70
|
-
weight: 5,
|
|
71
|
-
properties: {}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
event: "linny",
|
|
75
|
-
weight: 4,
|
|
76
|
-
properties: {}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
event: "fonk",
|
|
80
|
-
weight: 3,
|
|
81
|
-
properties: {}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
event: "crumn",
|
|
85
|
-
weight: 2,
|
|
86
|
-
properties: {}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
event: "yak",
|
|
90
|
-
weight: 1,
|
|
91
|
-
properties: {}
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
superProps: {
|
|
95
|
-
color: ["red", "orange", "yellow", "green", "blue", "indigo", "violet"],
|
|
96
|
-
number: integer,
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
userProps: {
|
|
100
|
-
title: chance.profession.bind(chance),
|
|
101
|
-
luckyNumber: weighNumRange(42, 420),
|
|
102
|
-
spiritAnimal: ["duck", "dog", "otter", "penguin", "cat", "elephant", "lion", "cheetah", "giraffe", "zebra", "rhino", "hippo", "whale", "dolphin", "shark", "octopus", "squid", "jellyfish", "starfish", "seahorse", "crab", "lobster", "shrimp", "clam", "snail", "slug", "butterfly", "moth", "bee", "wasp", "ant", "beetle", "ladybug", "caterpillar", "centipede", "millipede", "scorpion", "spider", "tarantula", "tick", "mite", "mosquito", "fly", "dragonfly", "damselfly", "grasshopper", "cricket", "locust", "mantis", "cockroach", "termite", "praying mantis", "walking stick", "stick bug", "leaf insect", "lacewing", "aphid", "cicada", "thrips", "psyllid", "scale insect", "whitefly", "mealybug", "planthopper", "leafhopper", "treehopper", "flea", "louse", "bedbug", "flea beetle", "weevil", "longhorn beetle", "leaf beetle", "tiger beetle", "ground beetle", "lady beetle", "firefly", "click beetle", "rove beetle", "scarab beetle", "dung beetle", "stag beetle", "rhinoceros beetle", "hercules beetle", "goliath beetle", "jewel beetle", "tortoise beetle"]
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
scdProps: {},
|
|
106
|
-
mirrorProps: {},
|
|
107
|
-
lookupTables: [],
|
|
108
|
-
groupKeys: [],
|
|
109
|
-
groupProps: {},
|
|
110
|
-
|
|
111
|
-
hook: function (record, type, meta) {
|
|
112
|
-
return record;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
module.exports = config;
|
package/dungeons/scd.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the default configuration file for the data generator in SIMPLE mode
|
|
3
|
-
* notice how the config object is structured, and see it's type definition in ./types.d.ts
|
|
4
|
-
* feel free to modify this file to customize the data you generate
|
|
5
|
-
* see helper functions in utils.js for more ways to generate data
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Chance = require('chance');
|
|
12
|
-
const chance = new Chance();
|
|
13
|
-
const dayjs = require("dayjs");
|
|
14
|
-
const utc = require("dayjs/plugin/utc");
|
|
15
|
-
dayjs.extend(utc);
|
|
16
|
-
const { uid, comma } = require('ak-tools');
|
|
17
|
-
const { pickAWinner, weighNumRange, date, integer, weighChoices } = require('../components/utils');
|
|
18
|
-
|
|
19
|
-
const itemCategories = ["Books", "Movies", "Music", "Games", "Electronics", "Computers", "Smart Home", "Home", "Garden", "Pet", "Beauty", "Health", "Toys", "Kids", "Baby", "Handmade", "Sports", "Outdoors", "Automotive", "Industrial", "Entertainment", "Art", "Food", "Appliances", "Office", "Wedding", "Software"];
|
|
20
|
-
|
|
21
|
-
const videoCategories = ["funny", "educational", "inspirational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"];
|
|
22
|
-
|
|
23
|
-
/** @type {import('../types').Dungeon} */
|
|
24
|
-
const config = {
|
|
25
|
-
token: "",
|
|
26
|
-
seed: "simple is best",
|
|
27
|
-
numDays: 30, //how many days worth1 of data
|
|
28
|
-
numEvents: 50000, //how many events
|
|
29
|
-
numUsers: 500, //how many users
|
|
30
|
-
format: 'csv', //csv or json
|
|
31
|
-
region: "US",
|
|
32
|
-
hasAnonIds: false, //if true, anonymousIds are created for each user
|
|
33
|
-
hasSessionIds: false, //if true, hasSessionIds are created for each user
|
|
34
|
-
hasAdSpend: false,
|
|
35
|
-
makeChart: true,
|
|
36
|
-
hasLocation: true,
|
|
37
|
-
hasAndroidDevices: true,
|
|
38
|
-
hasIOSDevices: true,
|
|
39
|
-
hasDesktopDevices: true,
|
|
40
|
-
hasBrowser: true,
|
|
41
|
-
hasCampaigns: true,
|
|
42
|
-
isAnonymous: false,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
events: [
|
|
46
|
-
{
|
|
47
|
-
event: "checkout",
|
|
48
|
-
weight: 2,
|
|
49
|
-
properties: {
|
|
50
|
-
amount: weighNumRange(5, 500, .25),
|
|
51
|
-
currency: pickAWinner(["USD", "CAD", "EUR", "BTC", "ETH", "JPY"], 0),
|
|
52
|
-
coupon: weighChoices(["none", "none", "none", "none", "10%OFF", "20%OFF", "10%OFF", "20%OFF", "30%OFF", "40%OFF", "50%OFF"]),
|
|
53
|
-
numItems: weighNumRange(1, 10),
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
event: "add to cart",
|
|
59
|
-
weight: 4,
|
|
60
|
-
properties: {
|
|
61
|
-
amount: weighNumRange(5, 500, .25),
|
|
62
|
-
rating: weighNumRange(1, 5),
|
|
63
|
-
reviews: weighNumRange(0, 35),
|
|
64
|
-
isFeaturedItem: [true, false, false],
|
|
65
|
-
itemCategory: pickAWinner(itemCategories, integer(0, 27)),
|
|
66
|
-
dateItemListed: date(30, true, 'YYYY-MM-DD'),
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
event: "page view",
|
|
71
|
-
weight: 10,
|
|
72
|
-
properties: {
|
|
73
|
-
page: pickAWinner(["/", "/", "/help", "/account", "/watch", "/listen", "/product", "/people", "/peace"]),
|
|
74
|
-
utm_source: pickAWinner(["$organic", "$organic", "$organic", "$organic", "google", "google", "google", "facebook", "facebook", "twitter", "linkedin"]),
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
event: "watch video",
|
|
79
|
-
weight: 8,
|
|
80
|
-
properties: {
|
|
81
|
-
videoCategory: pickAWinner(videoCategories, integer(0, 9)),
|
|
82
|
-
isFeaturedItem: [true, false, false],
|
|
83
|
-
watchTimeSec: weighNumRange(10, 600, .25),
|
|
84
|
-
quality: ["2160p", "1440p", "1080p", "720p", "480p", "360p", "240p"],
|
|
85
|
-
format: ["mp4", "avi", "mov", "mpg"],
|
|
86
|
-
uploader_id: chance.guid.bind(chance)
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
event: "view item",
|
|
92
|
-
weight: 8,
|
|
93
|
-
properties: {
|
|
94
|
-
isFeaturedItem: [true, false, false],
|
|
95
|
-
itemCategory: pickAWinner(itemCategories, integer(0, 27)),
|
|
96
|
-
dateItemListed: date(30, true, 'YYYY-MM-DD'),
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
event: "save item",
|
|
101
|
-
weight: 5,
|
|
102
|
-
properties: {
|
|
103
|
-
isFeaturedItem: [true, false, false],
|
|
104
|
-
itemCategory: pickAWinner(itemCategories, integer(0, 27)),
|
|
105
|
-
dateItemListed: date(30, true, 'YYYY-MM-DD'),
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
event: "sign up",
|
|
110
|
-
isFirstEvent: true,
|
|
111
|
-
weight: 0,
|
|
112
|
-
properties: {
|
|
113
|
-
variants: ["A", "B", "C", "Control"],
|
|
114
|
-
flows: ["new", "existing", "loyal", "churned"],
|
|
115
|
-
flags: ["on", "off"],
|
|
116
|
-
experiment_ids: ["1234", "5678", "9012", "3456", "7890"],
|
|
117
|
-
multiVariate: [true, false]
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
superProps: {
|
|
122
|
-
platform: ["web", "mobile", "web", "mobile", "web", "web", "kiosk", "smartTV"],
|
|
123
|
-
currentTheme: weighChoices(["light", "dark", "custom", "light", "dark"]),
|
|
124
|
-
},
|
|
125
|
-
/*
|
|
126
|
-
user properties work the same as event properties
|
|
127
|
-
each key should be an array or function reference
|
|
128
|
-
*/
|
|
129
|
-
userProps: {
|
|
130
|
-
title: chance.profession.bind(chance),
|
|
131
|
-
luckyNumber: weighNumRange(42, 420, .3),
|
|
132
|
-
spiritAnimal: pickAWinner(["duck", "dog", "otter", "penguin", "cat", "elephant", "lion", "cheetah", "giraffe", "zebra", "rhino", "hippo", "whale", "dolphin", "shark", "octopus", "squid", "jellyfish", "starfish", "seahorse", "crab", "lobster", "shrimp", "clam", "snail", "slug", "butterfly", "moth", "bee", "wasp", "ant", "beetle", "ladybug", "caterpillar", "centipede", "millipede", "scorpion", "spider", "tarantula", "tick", "mite", "mosquito", "fly", "dragonfly", "damselfly", "grasshopper", "cricket", "locust", "mantis", "cockroach", "termite", "praying mantis", "walking stick", "stick bug", "leaf insect", "lacewing", "aphid", "cicada", "thrips", "psyllid", "scale insect", "whitefly", "mealybug", "planthopper", "leafhopper", "treehopper", "flea", "louse", "bedbug", "flea beetle", "weevil", "longhorn beetle", "leaf beetle", "tiger beetle", "ground beetle", "lady beetle", "firefly", "click beetle", "rove beetle", "scarab beetle", "dung beetle", "stag beetle", "rhinoceros beetle", "hercules beetle", "goliath beetle", "jewel beetle", "tortoise beetle"])
|
|
133
|
-
},
|
|
134
|
-
scdProps: {
|
|
135
|
-
role: {
|
|
136
|
-
type: "user",
|
|
137
|
-
frequency: "week",
|
|
138
|
-
values: ["admin", "collaborator", "user", "view only", "no access"],
|
|
139
|
-
timing: 'fuzzy',
|
|
140
|
-
max: 10
|
|
141
|
-
},
|
|
142
|
-
NPS: {
|
|
143
|
-
type: "user",
|
|
144
|
-
frequency: "day",
|
|
145
|
-
values: weighNumRange(1, 10, 2, 150),
|
|
146
|
-
timing: 'fuzzy',
|
|
147
|
-
max: 10
|
|
148
|
-
},
|
|
149
|
-
MRR: {
|
|
150
|
-
type: "company_id",
|
|
151
|
-
frequency: "month",
|
|
152
|
-
values: weighNumRange(0, 10000, .15),
|
|
153
|
-
timing: 'fixed',
|
|
154
|
-
max: 10
|
|
155
|
-
},
|
|
156
|
-
AccountHealthScore: {
|
|
157
|
-
type: "company_id",
|
|
158
|
-
frequency: "week",
|
|
159
|
-
values: weighNumRange(1, 10, .15),
|
|
160
|
-
timing: 'fixed',
|
|
161
|
-
max: 40
|
|
162
|
-
},
|
|
163
|
-
plan: {
|
|
164
|
-
type: "company_id",
|
|
165
|
-
frequency: "month",
|
|
166
|
-
values: ["free", "basic", "premium", "enterprise"],
|
|
167
|
-
timing: 'fixed',
|
|
168
|
-
max: 10
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
groupKeys: [["company_id", 1_000]],
|
|
172
|
-
groupProps: {
|
|
173
|
-
company_id: {
|
|
174
|
-
name: () => { return chance.name(); },
|
|
175
|
-
email: () => { return `CSM: ${chance.pickone(["AK", "Neha", "Rajiv", "Deepak", "Justin", "Hans", "Katie", "Somya", "Tony", "Kaan"])}`; },
|
|
176
|
-
industry: pickAWinner([
|
|
177
|
-
"technology",
|
|
178
|
-
"education",
|
|
179
|
-
"finance",
|
|
180
|
-
"healthcare",
|
|
181
|
-
"retail",
|
|
182
|
-
"manufacturing",
|
|
183
|
-
"transportation",
|
|
184
|
-
"entertainment",
|
|
185
|
-
"media",
|
|
186
|
-
"real estate",
|
|
187
|
-
"construction",
|
|
188
|
-
"hospitality",
|
|
189
|
-
"energy",
|
|
190
|
-
"utilities",
|
|
191
|
-
"agriculture",
|
|
192
|
-
"other",
|
|
193
|
-
]),
|
|
194
|
-
segment: ["SMB", "SMB", "SMB", "Mid Market", "Mid Market", "Enterprise"],
|
|
195
|
-
"# active users": chance.integer({ min: 2, max: 20 })
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
hook: function (record, type, meta) {
|
|
199
|
-
return record;
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
module.exports = config;
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const SEED = "hello-world";
|
|
3
|
-
const dayjs = require("dayjs");
|
|
4
|
-
const utc = require("dayjs/plugin/utc");
|
|
5
|
-
dayjs.extend(utc);
|
|
6
|
-
require("dotenv").config();
|
|
7
|
-
const u = require("../components/utils");
|
|
8
|
-
const v = require("ak-tools");
|
|
9
|
-
const chance = u.initChance(SEED);
|
|
10
|
-
const num_users = 50_000;
|
|
11
|
-
const days = 90;
|
|
12
|
-
|
|
13
|
-
/** @type {import("../types").Dungeon} */
|
|
14
|
-
const config = {
|
|
15
|
-
token: "204809263e148f5a7cc63e171865a4b2",
|
|
16
|
-
seed: SEED,
|
|
17
|
-
numDays: days,
|
|
18
|
-
numEvents: num_users * 50,
|
|
19
|
-
numUsers: num_users,
|
|
20
|
-
hasAnonIds: false,
|
|
21
|
-
hasSessionIds: false,
|
|
22
|
-
format: "json",
|
|
23
|
-
alsoInferFunnels: false,
|
|
24
|
-
hasLocation: true,
|
|
25
|
-
hasAndroidDevices: false,
|
|
26
|
-
hasIOSDevices: false,
|
|
27
|
-
hasDesktopDevices: true,
|
|
28
|
-
hasBrowser: false,
|
|
29
|
-
hasCampaigns: true,
|
|
30
|
-
isAnonymous: false,
|
|
31
|
-
hasAdSpend: false,
|
|
32
|
-
percentUsersBornInDataset: 75,
|
|
33
|
-
hasAvatar: false,
|
|
34
|
-
makeChart: false,
|
|
35
|
-
|
|
36
|
-
batchSize: 1_500_000,
|
|
37
|
-
concurrency: 1,
|
|
38
|
-
writeToDisk: false,
|
|
39
|
-
|
|
40
|
-
funnels: [
|
|
41
|
-
{
|
|
42
|
-
sequence: ["home page view", "get started button click", "next button click", "next button click", "sign up button click"],
|
|
43
|
-
conversionRate: 25,
|
|
44
|
-
timeToConvert: 1,
|
|
45
|
-
requireRepeats: true,
|
|
46
|
-
isFirstFunnel: true,
|
|
47
|
-
props: {
|
|
48
|
-
"browser": ["Chrome", "Safari", "Firefox", "Edge", "IE"]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
events: [
|
|
53
|
-
{
|
|
54
|
-
"event": "home page view",
|
|
55
|
-
weight: 100,
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"event": "get started button click",
|
|
60
|
-
weight: 50,
|
|
61
|
-
isFirstEvent: true,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"event": "next button click",
|
|
65
|
-
weight: 50,
|
|
66
|
-
isFirstEvent: true,
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
"event": "sign up button click",
|
|
71
|
-
weight: 30,
|
|
72
|
-
isFirstEvent: true,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"event": "log in",
|
|
76
|
-
weight: 70
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"event": "send money",
|
|
80
|
-
weight: 65,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"event": "receive money",
|
|
84
|
-
weight: 45,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"event": "check balance",
|
|
88
|
-
weight: 70,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"event": "bill pay",
|
|
92
|
-
weight: 50,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"event": "connect account",
|
|
96
|
-
weight: 25,
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"event": "view dashboard",
|
|
100
|
-
weight: 30,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"event": "view credit score",
|
|
104
|
-
weight: 20,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"event": "apply for loan",
|
|
108
|
-
weight: 10,
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
superProps: {
|
|
112
|
-
"browser": u.pickAWinner(["Chrome", "Safari", "Firefox", "Edge", "IE"], 0),
|
|
113
|
-
},
|
|
114
|
-
userProps: {},
|
|
115
|
-
scdProps: {},
|
|
116
|
-
mirrorProps: {},
|
|
117
|
-
groupKeys: [],
|
|
118
|
-
groupProps: {},
|
|
119
|
-
lookupTables: [],
|
|
120
|
-
hook: function (record, type, meta) {
|
|
121
|
-
const NOW = dayjs();
|
|
122
|
-
const bugStartDate = NOW.subtract(7, 'days');
|
|
123
|
-
// const bugFixedDate = NOW.subtract(3, 'days');
|
|
124
|
-
// const featureReleaseData = NOW.subtract(7, 'days');
|
|
125
|
-
|
|
126
|
-
if (type === "event") {
|
|
127
|
-
// const EVENT_TIME = dayjs(record.time);
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (type === "funnel-post") {
|
|
132
|
-
// there's a bug in Chrome where users can't complete the funnel
|
|
133
|
-
if (record[1]?.event === 'get started button click') {
|
|
134
|
-
if (dayjs(record[0].time).isAfter(bugStartDate)) {
|
|
135
|
-
if (record[0]?.["browser"] === "Chrome") {
|
|
136
|
-
if (record.length > 3) {
|
|
137
|
-
record = record.slice(0, 3);
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (type === "everything") {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (record[1]?.event === "get started button click") {
|
|
150
|
-
|
|
151
|
-
// most users don't convert
|
|
152
|
-
if (chance.bool({ likelihood: u.integer(69, 75) })) {
|
|
153
|
-
record = record.slice(0, u.integer(1, 4));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// chrome case, never converts, can't reach step 3
|
|
158
|
-
if (record[0]?.["browser"] === "Chrome") {
|
|
159
|
-
if (dayjs(record[0].time).isAfter(bugStartDate)) {
|
|
160
|
-
if (record.length > 3) {
|
|
161
|
-
record = record.slice(0, 3);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return record;
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
module.exports = config;
|