@ak--47/dungeon-master 1.0.0 → 1.2.0
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/README.md +7 -7
- package/dungeons/technical/ad-spend-schema.json +128 -0
- package/dungeons/technical/ad-spend.js +116 -0
- package/dungeons/technical/anonymous-users-schema.json +92 -0
- package/dungeons/technical/anonymous-users.js +102 -0
- package/dungeons/technical/array-of-object-lookup-schema.json +191 -0
- package/dungeons/{array-of-object-lookup.js → technical/array-of-object-lookup.js} +12 -5
- package/dungeons/technical/experiments-schema.json +203 -0
- package/dungeons/technical/experiments.js +168 -0
- package/dungeons/technical/foobar-schema.json +362 -0
- package/dungeons/{foobar.js → technical/foobar.js} +3 -3
- package/dungeons/technical/group-analytics-schema.json +241 -0
- package/dungeons/technical/group-analytics.js +151 -0
- package/dungeons/technical/mirror-strategies-schema.json +84 -0
- package/dungeons/technical/mirror-strategies.js +126 -0
- package/dungeons/technical/nested-objects-schema.json +145 -0
- package/dungeons/technical/nested-objects.js +207 -0
- package/dungeons/technical/retention-cadence-schema.json +37 -0
- package/dungeons/{retention-cadence.js → technical/retention-cadence.js} +2 -3
- package/dungeons/technical/sanity-schema.json +185 -0
- package/dungeons/{sanity.js → technical/sanity.js} +4 -2
- package/dungeons/technical/scale-test-schema.json +70 -0
- package/dungeons/technical/scale-test.js +90 -0
- package/dungeons/technical/scd-schema.json +467 -0
- package/dungeons/{scd.js → technical/scd.js} +20 -10
- package/dungeons/technical/simple-schema.json +362 -0
- package/dungeons/{simple.js → technical/simple.js} +7 -7
- package/dungeons/technical/simplest-schema.json +724 -0
- package/dungeons/{simplest.js → technical/simplest.js} +7 -7
- package/dungeons/technical/text-generation-schema.json +1062 -0
- package/dungeons/{text-generation.js → technical/text-generation.js} +24 -11
- package/dungeons/vertical/community-schema.json +579 -0
- package/dungeons/vertical/community.js +794 -0
- package/dungeons/vertical/devtools-schema.json +601 -0
- package/dungeons/vertical/devtools.js +843 -0
- package/dungeons/vertical/ecommerce-schema.json +604 -0
- package/dungeons/{ecommerce.js → vertical/ecommerce.js} +43 -5
- package/dungeons/vertical/education-schema.json +5686 -0
- package/dungeons/{education.js → vertical/education.js} +70 -39
- package/dungeons/vertical/fintech-schema.json +630 -0
- package/dungeons/{fintech.js → vertical/fintech.js} +107 -56
- package/dungeons/vertical/fitness-schema.json +530 -0
- package/dungeons/vertical/fitness.js +808 -0
- package/dungeons/vertical/food-delivery-schema.json +36728 -0
- package/dungeons/{food.js → vertical/food-delivery.js} +67 -26
- package/dungeons/vertical/gaming-schema.json +438 -0
- package/dungeons/{gaming.js → vertical/gaming.js} +29 -16
- package/dungeons/vertical/healthcare-schema.json +549 -0
- package/dungeons/vertical/healthcare.js +775 -0
- package/dungeons/vertical/insurance-application-schema.json +485 -0
- package/dungeons/{insurance-application.js → vertical/insurance-application.js} +41 -31
- package/dungeons/vertical/logistics-schema.json +574 -0
- package/dungeons/vertical/logistics.js +799 -0
- package/dungeons/vertical/marketplace-schema.json +533 -0
- package/dungeons/vertical/marketplace.js +850 -0
- package/dungeons/vertical/media-schema.json +4749 -0
- package/dungeons/{media.js → vertical/media.js} +103 -19
- package/dungeons/vertical/rpg-schema.json +2491 -0
- package/dungeons/{rpg.js → vertical/rpg.js} +87 -60
- package/dungeons/vertical/sass-schema.json +3128 -0
- package/dungeons/{sass.js → vertical/sass.js} +65 -26
- package/dungeons/vertical/social-schema.json +620 -0
- package/dungeons/{social.js → vertical/social.js} +76 -17
- package/dungeons/vertical/travel-schema.json +580 -0
- package/dungeons/vertical/travel.js +742 -0
- package/index.js +20 -16
- package/lib/core/config-validator.js +286 -1
- package/lib/core/context.js +16 -5
- package/lib/core/storage.js +2 -0
- package/lib/generators/adspend.js +3 -3
- package/lib/generators/events.js +141 -14
- package/lib/generators/funnels.js +67 -7
- package/lib/generators/text.js +2 -2
- package/lib/orchestrators/user-loop.js +444 -22
- package/lib/templates/soup-presets.js +2 -2
- package/lib/utils/utils.js +4 -5
- package/package.json +4 -3
- package/scripts/dungeon-to-json.mjs +163 -0
- package/scripts/extract-dungeon-schema.mjs +343 -0
- package/scripts/json-to-dungeon.mjs +200 -0
- package/scripts/run-dungeon.mjs +76 -0
- package/scripts/run-many.mjs +118 -0
- package/scripts/verify-runner.mjs +42 -0
- package/types.d.ts +316 -1
- package/dungeons/array-of-object-lookup-schema.json +0 -327
- package/dungeons/ecommerce-schema.json +0 -462
- package/dungeons/education-schema.json +0 -2409
- package/dungeons/fintech-schema.json +0 -14034
- package/dungeons/foobar-schema.json +0 -403
- package/dungeons/food-delivery-schema.json +0 -192
- package/dungeons/food-delivery.js +0 -602
- package/dungeons/food-schema.json +0 -1152
- package/dungeons/gaming-schema.json +0 -1270
- package/dungeons/insurance-application-schema.json +0 -204
- package/dungeons/media-schema.json +0 -906
- package/dungeons/retention-cadence-schema.json +0 -78
- package/dungeons/rpg-schema.json +0 -4526
- package/dungeons/sanity-schema.json +0 -255
- package/dungeons/sass-schema.json +0 -1291
- package/dungeons/scd-schema.json +0 -919
- package/dungeons/simple-schema.json +0 -608
- package/dungeons/simplest-schema.json +0 -1418
- package/dungeons/social-schema.json +0 -1118
- package/dungeons/text-generation-schema.json +0 -3096
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
{
|
|
2
|
+
"events": [
|
|
3
|
+
{
|
|
4
|
+
"event": "checkout",
|
|
5
|
+
"weight": 2,
|
|
6
|
+
"properties": {
|
|
7
|
+
"amount": {
|
|
8
|
+
"$range": [
|
|
9
|
+
104,
|
|
10
|
+
391
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"currency": [
|
|
14
|
+
"USD",
|
|
15
|
+
"CAD",
|
|
16
|
+
"EUR",
|
|
17
|
+
"BTC",
|
|
18
|
+
"ETH",
|
|
19
|
+
"JPY"
|
|
20
|
+
],
|
|
21
|
+
"coupon": [
|
|
22
|
+
"none",
|
|
23
|
+
"10%OFF",
|
|
24
|
+
"20%OFF",
|
|
25
|
+
"30%OFF",
|
|
26
|
+
"40%OFF",
|
|
27
|
+
"50%OFF"
|
|
28
|
+
],
|
|
29
|
+
"numItems": {
|
|
30
|
+
"$range": [
|
|
31
|
+
2,
|
|
32
|
+
9
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"discount_applied": [
|
|
36
|
+
false
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"event": "add to cart",
|
|
42
|
+
"weight": 4,
|
|
43
|
+
"properties": {
|
|
44
|
+
"amount": {
|
|
45
|
+
"$range": [
|
|
46
|
+
110,
|
|
47
|
+
395
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"rating": {
|
|
51
|
+
"$range": [
|
|
52
|
+
1,
|
|
53
|
+
5
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"reviews": {
|
|
57
|
+
"$range": [
|
|
58
|
+
1,
|
|
59
|
+
35
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"isFeaturedItem": [
|
|
63
|
+
true,
|
|
64
|
+
false
|
|
65
|
+
],
|
|
66
|
+
"itemCategory": [
|
|
67
|
+
"Pet",
|
|
68
|
+
"Art",
|
|
69
|
+
"Handmade",
|
|
70
|
+
"Garden",
|
|
71
|
+
"Beauty",
|
|
72
|
+
"Baby",
|
|
73
|
+
"Movies"
|
|
74
|
+
],
|
|
75
|
+
"dateItemListed": {
|
|
76
|
+
"$type": "string"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"event": "page view",
|
|
82
|
+
"weight": 10,
|
|
83
|
+
"properties": {
|
|
84
|
+
"page": [
|
|
85
|
+
"/",
|
|
86
|
+
"/help",
|
|
87
|
+
"/account",
|
|
88
|
+
"/watch",
|
|
89
|
+
"/listen",
|
|
90
|
+
"/product",
|
|
91
|
+
"/people",
|
|
92
|
+
"/peace"
|
|
93
|
+
],
|
|
94
|
+
"utm_source": [
|
|
95
|
+
"$organic",
|
|
96
|
+
"google",
|
|
97
|
+
"facebook",
|
|
98
|
+
"twitter",
|
|
99
|
+
"linkedin"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"event": "watch video",
|
|
105
|
+
"weight": 8,
|
|
106
|
+
"properties": {
|
|
107
|
+
"videoCategory": [
|
|
108
|
+
"cooking",
|
|
109
|
+
"inspirational",
|
|
110
|
+
"music",
|
|
111
|
+
"sports",
|
|
112
|
+
"educational",
|
|
113
|
+
"DIY"
|
|
114
|
+
],
|
|
115
|
+
"isFeaturedItem": [
|
|
116
|
+
true,
|
|
117
|
+
false
|
|
118
|
+
],
|
|
119
|
+
"watchTimeSec": {
|
|
120
|
+
"$range": [
|
|
121
|
+
131,
|
|
122
|
+
467
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"quality": [
|
|
126
|
+
"2160p",
|
|
127
|
+
"1440p",
|
|
128
|
+
"1080p",
|
|
129
|
+
"720p",
|
|
130
|
+
"480p",
|
|
131
|
+
"360p",
|
|
132
|
+
"240p"
|
|
133
|
+
],
|
|
134
|
+
"format": [
|
|
135
|
+
"mp4",
|
|
136
|
+
"avi",
|
|
137
|
+
"mov",
|
|
138
|
+
"mpg"
|
|
139
|
+
],
|
|
140
|
+
"uploader_id": {
|
|
141
|
+
"$type": "string"
|
|
142
|
+
},
|
|
143
|
+
"is_weekend": [
|
|
144
|
+
false
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"event": "view item",
|
|
150
|
+
"weight": 8,
|
|
151
|
+
"properties": {
|
|
152
|
+
"isFeaturedItem": [
|
|
153
|
+
true,
|
|
154
|
+
false
|
|
155
|
+
],
|
|
156
|
+
"itemCategory": [
|
|
157
|
+
"Handmade",
|
|
158
|
+
"Baby",
|
|
159
|
+
"Wedding",
|
|
160
|
+
"Electronics",
|
|
161
|
+
"Industrial",
|
|
162
|
+
"Pet"
|
|
163
|
+
],
|
|
164
|
+
"dateItemListed": {
|
|
165
|
+
"$type": "string"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"event": "save item",
|
|
171
|
+
"weight": 5,
|
|
172
|
+
"properties": {
|
|
173
|
+
"isFeaturedItem": [
|
|
174
|
+
true,
|
|
175
|
+
false
|
|
176
|
+
],
|
|
177
|
+
"itemCategory": [
|
|
178
|
+
"Games",
|
|
179
|
+
"Electronics",
|
|
180
|
+
"Books",
|
|
181
|
+
"Entertainment",
|
|
182
|
+
"Outdoors",
|
|
183
|
+
"Pet",
|
|
184
|
+
"Computers"
|
|
185
|
+
],
|
|
186
|
+
"dateItemListed": {
|
|
187
|
+
"$type": "string"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"event": "sign up",
|
|
193
|
+
"isFirstEvent": true,
|
|
194
|
+
"properties": {
|
|
195
|
+
"variants": [
|
|
196
|
+
"A",
|
|
197
|
+
"B",
|
|
198
|
+
"C",
|
|
199
|
+
"Control"
|
|
200
|
+
],
|
|
201
|
+
"flows": [
|
|
202
|
+
"new",
|
|
203
|
+
"existing",
|
|
204
|
+
"loyal",
|
|
205
|
+
"churned"
|
|
206
|
+
],
|
|
207
|
+
"flags": [
|
|
208
|
+
"on",
|
|
209
|
+
"off"
|
|
210
|
+
],
|
|
211
|
+
"experiment_ids": [
|
|
212
|
+
"1234",
|
|
213
|
+
"5678",
|
|
214
|
+
"9012",
|
|
215
|
+
"3456",
|
|
216
|
+
"7890"
|
|
217
|
+
],
|
|
218
|
+
"multiVariate": [
|
|
219
|
+
true,
|
|
220
|
+
false
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"event": "cart_abandoned",
|
|
226
|
+
"isStrictEvent": true,
|
|
227
|
+
"properties": {
|
|
228
|
+
"amount": {
|
|
229
|
+
"$range": [
|
|
230
|
+
114,
|
|
231
|
+
397
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"superProps": {
|
|
238
|
+
"platform": [
|
|
239
|
+
"web",
|
|
240
|
+
"mobile",
|
|
241
|
+
"kiosk",
|
|
242
|
+
"smartTV"
|
|
243
|
+
],
|
|
244
|
+
"currentTheme": [
|
|
245
|
+
"light",
|
|
246
|
+
"dark",
|
|
247
|
+
"custom"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"userProps": {
|
|
251
|
+
"title": {
|
|
252
|
+
"$type": "string"
|
|
253
|
+
},
|
|
254
|
+
"luckyNumber": {
|
|
255
|
+
"$range": [
|
|
256
|
+
115,
|
|
257
|
+
326
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"spiritAnimal": [
|
|
261
|
+
"duck",
|
|
262
|
+
"dog",
|
|
263
|
+
"otter",
|
|
264
|
+
"penguin",
|
|
265
|
+
"cat",
|
|
266
|
+
"elephant",
|
|
267
|
+
"lion",
|
|
268
|
+
"cheetah",
|
|
269
|
+
"giraffe",
|
|
270
|
+
"zebra",
|
|
271
|
+
"rhino",
|
|
272
|
+
"hippo",
|
|
273
|
+
"whale",
|
|
274
|
+
"dolphin",
|
|
275
|
+
"shark",
|
|
276
|
+
"octopus",
|
|
277
|
+
"squid",
|
|
278
|
+
"jellyfish",
|
|
279
|
+
"starfish",
|
|
280
|
+
"seahorse",
|
|
281
|
+
"crab",
|
|
282
|
+
"lobster",
|
|
283
|
+
"shrimp",
|
|
284
|
+
"clam",
|
|
285
|
+
"snail",
|
|
286
|
+
"slug",
|
|
287
|
+
"butterfly",
|
|
288
|
+
"moth",
|
|
289
|
+
"bee",
|
|
290
|
+
"wasp",
|
|
291
|
+
"ant",
|
|
292
|
+
"beetle",
|
|
293
|
+
"ladybug",
|
|
294
|
+
"caterpillar",
|
|
295
|
+
"centipede",
|
|
296
|
+
"millipede",
|
|
297
|
+
"scorpion",
|
|
298
|
+
"spider",
|
|
299
|
+
"tarantula",
|
|
300
|
+
"tick",
|
|
301
|
+
"mite",
|
|
302
|
+
"mosquito",
|
|
303
|
+
"fly",
|
|
304
|
+
"dragonfly",
|
|
305
|
+
"damselfly",
|
|
306
|
+
"grasshopper",
|
|
307
|
+
"cricket",
|
|
308
|
+
"locust",
|
|
309
|
+
"mantis",
|
|
310
|
+
"cockroach",
|
|
311
|
+
"termite",
|
|
312
|
+
"praying mantis",
|
|
313
|
+
"walking stick",
|
|
314
|
+
"stick bug",
|
|
315
|
+
"leaf insect",
|
|
316
|
+
"lacewing",
|
|
317
|
+
"aphid",
|
|
318
|
+
"cicada",
|
|
319
|
+
"thrips",
|
|
320
|
+
"psyllid",
|
|
321
|
+
"scale insect",
|
|
322
|
+
"whitefly",
|
|
323
|
+
"mealybug",
|
|
324
|
+
"planthopper",
|
|
325
|
+
"leafhopper",
|
|
326
|
+
"treehopper",
|
|
327
|
+
"flea",
|
|
328
|
+
"louse",
|
|
329
|
+
"bedbug",
|
|
330
|
+
"flea beetle",
|
|
331
|
+
"weevil",
|
|
332
|
+
"longhorn beetle",
|
|
333
|
+
"leaf beetle",
|
|
334
|
+
"tiger beetle",
|
|
335
|
+
"ground beetle",
|
|
336
|
+
"lady beetle",
|
|
337
|
+
"firefly",
|
|
338
|
+
"click beetle",
|
|
339
|
+
"rove beetle",
|
|
340
|
+
"scarab beetle",
|
|
341
|
+
"dung beetle",
|
|
342
|
+
"stag beetle",
|
|
343
|
+
"rhinoceros beetle",
|
|
344
|
+
"hercules beetle",
|
|
345
|
+
"goliath beetle",
|
|
346
|
+
"jewel beetle",
|
|
347
|
+
"tortoise beetle"
|
|
348
|
+
],
|
|
349
|
+
"spendTier": [
|
|
350
|
+
"budget"
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"groupKeys": [
|
|
354
|
+
{
|
|
355
|
+
"key": "company_id",
|
|
356
|
+
"count": 1000
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"groupProps": {
|
|
360
|
+
"company_id": {
|
|
361
|
+
"name": {
|
|
362
|
+
"$type": "string"
|
|
363
|
+
},
|
|
364
|
+
"email": [
|
|
365
|
+
"CSM: AK",
|
|
366
|
+
"CSM: Deepak",
|
|
367
|
+
"CSM: Hans",
|
|
368
|
+
"CSM: Justin",
|
|
369
|
+
"CSM: Kaan",
|
|
370
|
+
"CSM: Katie",
|
|
371
|
+
"CSM: Neha",
|
|
372
|
+
"CSM: Rajiv",
|
|
373
|
+
"CSM: Somya",
|
|
374
|
+
"CSM: Tony"
|
|
375
|
+
],
|
|
376
|
+
"industry": [
|
|
377
|
+
"technology",
|
|
378
|
+
"education",
|
|
379
|
+
"finance",
|
|
380
|
+
"healthcare",
|
|
381
|
+
"retail",
|
|
382
|
+
"manufacturing",
|
|
383
|
+
"transportation",
|
|
384
|
+
"entertainment",
|
|
385
|
+
"media",
|
|
386
|
+
"real estate",
|
|
387
|
+
"construction",
|
|
388
|
+
"hospitality",
|
|
389
|
+
"energy",
|
|
390
|
+
"utilities",
|
|
391
|
+
"agriculture",
|
|
392
|
+
"other"
|
|
393
|
+
],
|
|
394
|
+
"segment": [
|
|
395
|
+
"SMB",
|
|
396
|
+
"Mid Market",
|
|
397
|
+
"Enterprise"
|
|
398
|
+
],
|
|
399
|
+
"# active users": [
|
|
400
|
+
17
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"scdProps": {
|
|
405
|
+
"role": {
|
|
406
|
+
"type": "user",
|
|
407
|
+
"frequency": "week",
|
|
408
|
+
"timing": "fuzzy",
|
|
409
|
+
"max": 10,
|
|
410
|
+
"values": [
|
|
411
|
+
"admin",
|
|
412
|
+
"collaborator",
|
|
413
|
+
"user",
|
|
414
|
+
"view only",
|
|
415
|
+
"no access"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
"NPS": {
|
|
419
|
+
"type": "user",
|
|
420
|
+
"frequency": "day",
|
|
421
|
+
"timing": "fuzzy",
|
|
422
|
+
"max": 10,
|
|
423
|
+
"values": {
|
|
424
|
+
"$range": [
|
|
425
|
+
1,
|
|
426
|
+
10
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"MRR": {
|
|
431
|
+
"type": "company_id",
|
|
432
|
+
"frequency": "month",
|
|
433
|
+
"timing": "fixed",
|
|
434
|
+
"max": 10,
|
|
435
|
+
"values": {
|
|
436
|
+
"$range": [
|
|
437
|
+
2240,
|
|
438
|
+
7836
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"AccountHealthScore": {
|
|
443
|
+
"type": "company_id",
|
|
444
|
+
"frequency": "week",
|
|
445
|
+
"timing": "fixed",
|
|
446
|
+
"max": 40,
|
|
447
|
+
"values": {
|
|
448
|
+
"$range": [
|
|
449
|
+
3,
|
|
450
|
+
8
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"plan": {
|
|
455
|
+
"type": "company_id",
|
|
456
|
+
"frequency": "month",
|
|
457
|
+
"timing": "fixed",
|
|
458
|
+
"max": 10,
|
|
459
|
+
"values": [
|
|
460
|
+
"free",
|
|
461
|
+
"basic",
|
|
462
|
+
"premium",
|
|
463
|
+
"enterprise"
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
@@ -4,8 +4,9 @@ import dayjs from "dayjs";
|
|
|
4
4
|
import utc from "dayjs/plugin/utc.js";
|
|
5
5
|
dayjs.extend(utc);
|
|
6
6
|
import { uid, comma } from 'ak-tools';
|
|
7
|
-
import { pickAWinner, weighNumRange, date, integer, weighChoices } from "
|
|
7
|
+
import { pickAWinner, weighNumRange, date, integer, weighChoices } from "../../lib/utils/utils.js";
|
|
8
8
|
|
|
9
|
+
/** @typedef {import("../../types").Dungeon} Config */
|
|
9
10
|
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"];
|
|
10
11
|
|
|
11
12
|
const videoCategories = ["funny", "educational", "inspirational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"];
|
|
@@ -48,7 +49,7 @@ const videoCategories = ["funny", "educational", "inspirational", "music", "news
|
|
|
48
49
|
* Expected: visible volume of abandoned cart events
|
|
49
50
|
*/
|
|
50
51
|
|
|
51
|
-
/** @type {import('
|
|
52
|
+
/** @type {import('../../types').Dungeon} */
|
|
52
53
|
const config = {
|
|
53
54
|
token: "",
|
|
54
55
|
seed: "simple is best",
|
|
@@ -78,7 +79,7 @@ const config = {
|
|
|
78
79
|
currency: ["USD", "CAD", "EUR", "BTC", "ETH", "JPY"],
|
|
79
80
|
coupon: weighChoices(["none", "none", "none", "none", "10%OFF", "20%OFF", "10%OFF", "20%OFF", "30%OFF", "40%OFF", "50%OFF"]),
|
|
80
81
|
numItems: weighNumRange(1, 10),
|
|
81
|
-
|
|
82
|
+
discount_applied: [false],
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
{
|
|
@@ -97,8 +98,8 @@ const config = {
|
|
|
97
98
|
event: "page view",
|
|
98
99
|
weight: 10,
|
|
99
100
|
properties: {
|
|
100
|
-
page:
|
|
101
|
-
utm_source:
|
|
101
|
+
page: ["/", "/", "/help", "/account", "/watch", "/listen", "/product", "/people", "/peace"],
|
|
102
|
+
utm_source: ["$organic", "$organic", "$organic", "$organic", "google", "google", "google", "facebook", "facebook", "twitter", "linkedin"],
|
|
102
103
|
}
|
|
103
104
|
},
|
|
104
105
|
{
|
|
@@ -110,8 +111,8 @@ const config = {
|
|
|
110
111
|
watchTimeSec: weighNumRange(10, 600, .25),
|
|
111
112
|
quality: ["2160p", "1440p", "1080p", "720p", "480p", "360p", "240p"],
|
|
112
113
|
format: ["mp4", "avi", "mov", "mpg"],
|
|
113
|
-
uploader_id: chance.guid.bind(chance)
|
|
114
|
-
|
|
114
|
+
uploader_id: chance.guid.bind(chance),
|
|
115
|
+
is_weekend: [false],
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
118
|
{
|
|
@@ -143,6 +144,14 @@ const config = {
|
|
|
143
144
|
experiment_ids: ["1234", "5678", "9012", "3456", "7890"],
|
|
144
145
|
multiVariate: [true, false]
|
|
145
146
|
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
event: "cart_abandoned",
|
|
150
|
+
weight: 0,
|
|
151
|
+
isStrictEvent: true,
|
|
152
|
+
properties: {
|
|
153
|
+
amount: weighNumRange(5, 500, .25),
|
|
154
|
+
}
|
|
146
155
|
}
|
|
147
156
|
],
|
|
148
157
|
superProps: {
|
|
@@ -156,7 +165,8 @@ const config = {
|
|
|
156
165
|
userProps: {
|
|
157
166
|
title: chance.profession.bind(chance),
|
|
158
167
|
luckyNumber: weighNumRange(42, 420, .3),
|
|
159
|
-
spiritAnimal:
|
|
168
|
+
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"],
|
|
169
|
+
spendTier: ["budget"],
|
|
160
170
|
},
|
|
161
171
|
scdProps: {
|
|
162
172
|
role: {
|
|
@@ -257,11 +267,11 @@ const config = {
|
|
|
257
267
|
const lastAdd = record.filter(e => e.event === "add to cart").pop();
|
|
258
268
|
if (lastAdd) {
|
|
259
269
|
record.push({
|
|
270
|
+
...lastAdd,
|
|
260
271
|
event: "cart_abandoned",
|
|
261
272
|
time: dayjs(lastAdd.time).add(30, "minute").toISOString(),
|
|
262
273
|
user_id: lastAdd.user_id,
|
|
263
|
-
|
|
264
|
-
amount: lastAdd.amount
|
|
274
|
+
amount: lastAdd.amount,
|
|
265
275
|
});
|
|
266
276
|
}
|
|
267
277
|
}
|