make-mp-data 3.0.3 → 3.0.5
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 +46 -0
- package/dungeons/array-of-object-lookup-schema.json +327 -0
- package/dungeons/array-of-object-lookup.js +29 -9
- package/dungeons/capstone/capstone-ic3.js +291 -0
- package/dungeons/capstone/capstone-ic4.js +598 -0
- package/dungeons/capstone/capstone-ic5.js +668 -0
- package/dungeons/capstone/generate-product-lookup.js +309 -0
- package/dungeons/ecommerce-schema.json +462 -0
- package/dungeons/{copilot.js → ecommerce.js} +79 -17
- package/dungeons/education-schema.json +2409 -0
- package/dungeons/education.js +226 -462
- package/dungeons/fintech-schema.json +14034 -0
- package/dungeons/fintech.js +134 -413
- package/dungeons/foobar-schema.json +403 -0
- package/dungeons/foobar.js +27 -4
- package/dungeons/food-delivery-schema.json +192 -0
- package/dungeons/food-delivery.js +602 -0
- package/dungeons/food-schema.json +1152 -0
- package/dungeons/food.js +173 -406
- package/dungeons/gaming-schema.json +1270 -0
- package/dungeons/gaming.js +182 -42
- package/dungeons/insurance-application-schema.json +204 -0
- package/dungeons/insurance-application.js +605 -0
- package/dungeons/media-schema.json +906 -0
- package/dungeons/media.js +250 -420
- package/dungeons/retention-cadence-schema.json +78 -0
- package/dungeons/retention-cadence.js +35 -1
- package/dungeons/rpg-schema.json +4526 -0
- package/dungeons/rpg.js +171 -429
- package/dungeons/sanity-schema.json +255 -0
- package/dungeons/sanity.js +21 -10
- package/dungeons/sass-schema.json +1291 -0
- package/dungeons/sass.js +241 -368
- package/dungeons/scd-schema.json +919 -0
- package/dungeons/scd.js +41 -13
- package/dungeons/simple-schema.json +608 -0
- package/dungeons/simple.js +52 -15
- package/dungeons/simplest-schema.json +1418 -0
- package/dungeons/simplest.js +392 -0
- package/dungeons/social-schema.json +1118 -0
- package/dungeons/social.js +150 -391
- package/dungeons/text-generation-schema.json +3096 -0
- package/dungeons/text-generation.js +71 -0
- package/index.js +8 -6
- package/lib/core/config-validator.js +28 -8
- package/lib/core/storage.js +5 -5
- package/lib/generators/events.js +4 -4
- package/lib/orchestrators/mixpanel-sender.js +16 -13
- package/lib/orchestrators/user-loop.js +14 -6
- package/lib/templates/soup-presets.js +188 -0
- package/lib/utils/utils.js +52 -6
- package/package.json +1 -1
- package/types.d.ts +20 -3
- package/dungeons/adspend.js +0 -130
- package/dungeons/anon.js +0 -128
- package/dungeons/benchmark-heavy.js +0 -240
- package/dungeons/benchmark-light.js +0 -140
- package/dungeons/big.js +0 -226
- package/dungeons/business.js +0 -391
- package/dungeons/complex.js +0 -428
- package/dungeons/experiments.js +0 -137
- package/dungeons/funnels.js +0 -309
- package/dungeons/mil.js +0 -323
- package/dungeons/mirror.js +0 -161
- package/dungeons/soup-test.js +0 -52
- package/dungeons/streaming.js +0 -372
- package/dungeons/strict-event-test.js +0 -30
- package/dungeons/student-teacher.js +0 -438
- package/dungeons/too-big-events.js +0 -203
- package/dungeons/user-agent.js +0 -209
package/dungeons/food.js
CHANGED
|
@@ -10,63 +10,142 @@ const chance = u.initChance(SEED);
|
|
|
10
10
|
const num_users = 5_000;
|
|
11
11
|
const days = 100;
|
|
12
12
|
|
|
13
|
-
/** @typedef {import("
|
|
13
|
+
/** @typedef {import("../types.d.ts").Dungeon} Config */
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
*
|
|
15
|
+
/*
|
|
16
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
17
|
+
* DATASET OVERVIEW
|
|
18
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
17
19
|
*
|
|
18
|
-
* QuickBite
|
|
19
|
-
*
|
|
20
|
-
*
|
|
20
|
+
* QuickBite — a food delivery platform (DoorDash/Uber Eats style).
|
|
21
|
+
* Users browse restaurants, build carts, place orders, track deliveries,
|
|
22
|
+
* and rate their experiences.
|
|
21
23
|
*
|
|
22
|
-
*
|
|
23
|
-
* Users sign up (email, Google, Apple, Facebook) and immediately enter a discovery flow.
|
|
24
|
-
* They browse restaurants by cuisine, sort by distance/rating/price, search for specific
|
|
25
|
-
* dishes, and eventually land on a restaurant page. From there, they build a cart by adding
|
|
26
|
-
* items (entrees, appetizers, drinks, desserts, sides) with customizations. Checkout
|
|
27
|
-
* captures payment, tip, and delivery details. After ordering, users track their delivery
|
|
28
|
-
* through multiple statuses (confirmed, preparing, picked up, en route, delivered).
|
|
24
|
+
* Scale: 5,000 users · 600K events · 100 days · 17 event types
|
|
29
25
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* with varying delivery times and ratings. This models a realistic marketplace with
|
|
34
|
-
* restaurant-level analytics via group profiles.
|
|
26
|
+
* Core loop:
|
|
27
|
+
* sign up → browse/search restaurants → add items to cart →
|
|
28
|
+
* checkout → order placed → track delivery → rate → reorder
|
|
35
29
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* and searching (by restaurant name, cuisine type, or specific dish). The search-to-order
|
|
39
|
-
* funnel captures intent-driven behavior vs. casual browsing.
|
|
30
|
+
* Restaurant ecosystem: 200 restaurants across 8 cuisine types,
|
|
31
|
+
* four price tiers ($–$$$$), modeled as group profiles.
|
|
40
32
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
33
|
+
* Monetization: delivery fees, QuickBite+ subscription ($9.99/mo or
|
|
34
|
+
* $79.99/yr for free delivery), and promotional coupons.
|
|
35
|
+
*
|
|
36
|
+
* Support & retention: support tickets (missing items, wrong orders,
|
|
37
|
+
* late delivery, quality, refunds) and reorder events model service
|
|
38
|
+
* quality and repeat behavior.
|
|
39
|
+
*
|
|
40
|
+
* Subscription tiers: Free vs QuickBite+ create a natural A/B
|
|
41
|
+
* comparison for monetization and retention analysis.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
46
|
+
* ANALYTICS HOOKS (8 architected patterns)
|
|
47
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
46
48
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* 1. LUNCH RUSH CONVERSION (funnel-pre)
|
|
50
|
+
* Funnel conversion boosted during meal hours: lunch 1.4x, dinner 1.2x.
|
|
51
|
+
* Mixpanel:
|
|
52
|
+
* • Funnels → "checkout started" → "order placed" → "order delivered"
|
|
53
|
+
* Breakdown: "lunch_rush" → expect ~84% vs ~60% baseline
|
|
54
|
+
* • Same funnel, breakdown: "dinner_rush" → expect ~72% vs ~60%
|
|
51
55
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
+
* 2. COUPON INJECTION (funnel-post)
|
|
57
|
+
* Free-tier users get coupon_applied spliced into funnels 30% of the time.
|
|
58
|
+
* Mixpanel:
|
|
59
|
+
* • Insights → "coupon applied" → breakdown "coupon_injected"
|
|
60
|
+
* → ~30% of Free-tier coupons are injected
|
|
61
|
+
* • Insights → "coupon applied" → breakdown "subscription_tier"
|
|
62
|
+
* → Free users have more coupon events
|
|
56
63
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
64
|
+
* 3. LATE NIGHT MUNCHIES (event)
|
|
65
|
+
* 10PM–2AM: 70% American cuisine, 1.3x item prices, late_night_order=true.
|
|
66
|
+
* Mixpanel:
|
|
67
|
+
* • Insights → "restaurant viewed" → breakdown "cuisine_type"
|
|
68
|
+
* filter: late_night_order=true → ~70% American vs ~12% daytime
|
|
69
|
+
* • Insights → "item added to cart" → avg "item_price"
|
|
70
|
+
* breakdown: "late_night_order" → 1.3x higher at night
|
|
71
|
+
*
|
|
72
|
+
* 4. RAINY WEEK SURGE (event + everything)
|
|
73
|
+
* Days 20–27: delivery fees 2x, surge_pricing=true, 40% order duplication.
|
|
74
|
+
* Mixpanel:
|
|
75
|
+
* • Insights (line) → "order placed" → daily → visible spike days 20–27
|
|
76
|
+
* • Insights → "order placed" → avg "delivery_fee"
|
|
77
|
+
* breakdown: "surge_pricing" → 2x higher
|
|
61
78
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
79
|
+
* 5. REFERRAL POWER USERS (everything)
|
|
80
|
+
* Referred users: 2x reorders, food_rating 4–5 stars, referral_user=true.
|
|
81
|
+
* Mixpanel:
|
|
82
|
+
* • Insights → "reorder initiated" → per user
|
|
83
|
+
* breakdown: "referral_user" → ~2x more reorders
|
|
84
|
+
* • Insights → "order rated" → avg "food_rating"
|
|
85
|
+
* breakdown: "referral_user" → 4–5 vs ~3.5 baseline
|
|
86
|
+
*
|
|
87
|
+
* 6. TRIAL CONVERSION (everything)
|
|
88
|
+
* Trial subs with 3+ orders in 14 days retained; others lose 60% of events.
|
|
89
|
+
* Mixpanel:
|
|
90
|
+
* • Insights → any event → per user
|
|
91
|
+
* breakdown: "trial_retained" → sustained vs ~60% drop
|
|
92
|
+
* • Retention → "subscription started" (trial=true) → "order placed"
|
|
93
|
+
* → sharp drop after day 14 for non-retained
|
|
94
|
+
*
|
|
95
|
+
* 7. SUPPORT TICKET CHURN (user)
|
|
96
|
+
* 15% of users flagged is_high_risk=true with churn_risk_score 70–100.
|
|
97
|
+
* Mixpanel:
|
|
98
|
+
* • Insights → any event → unique users
|
|
99
|
+
* breakdown: user "is_high_risk" → ~15% high-risk
|
|
100
|
+
* • Insights → breakdown: user "churn_risk_score"
|
|
101
|
+
* → bimodal: 85% at 0–40, 15% at 70–100
|
|
102
|
+
*
|
|
103
|
+
* 8. FIRST ORDER BONUS (funnel-pre)
|
|
104
|
+
* New users get 1.4x conversion boost on checkout→order funnel.
|
|
105
|
+
* Mixpanel:
|
|
106
|
+
* • Funnels → "checkout started" → "order placed" → "order delivered"
|
|
107
|
+
* breakdown: "first_order_bonus" → 1.4x higher conversion
|
|
108
|
+
* • Insights → "order placed" → breakdown "first_order_bonus"
|
|
109
|
+
* → ~50% tagged (hash-based user split)
|
|
110
|
+
*
|
|
111
|
+
* ───────────────────────────────────────────────────────────────────────────────
|
|
112
|
+
* ADVANCED ANALYSIS IDEAS
|
|
113
|
+
* ───────────────────────────────────────────────────────────────────────────────
|
|
114
|
+
*
|
|
115
|
+
* Cross-hook patterns:
|
|
116
|
+
* • The Perfect Customer: referral (5) + trial retained (6) + lunch rush (1)
|
|
117
|
+
* + low churn risk (7) → exceptional LTV and retention
|
|
118
|
+
* • Rainy Night Double Whammy: late-night (3) + rainy week (4)
|
|
119
|
+
* → compounded surge pricing?
|
|
120
|
+
* • Coupon-Driven Trial: injected coupons (2) → trial starts (6)?
|
|
121
|
+
* • Referral + First Order: hooks 5 + 8 → highest conversion rates
|
|
122
|
+
* • Support and Churn: high-risk (7) + support tickets during rainy week (4)
|
|
123
|
+
*
|
|
124
|
+
* Cohort analysis:
|
|
125
|
+
* • Signup week (rainy week cohort behaves differently)
|
|
126
|
+
* • Referral vs organic lifecycle
|
|
127
|
+
* • Free vs QuickBite+ across all metrics
|
|
128
|
+
* • City-level cuisine and ordering patterns
|
|
129
|
+
*
|
|
130
|
+
* Funnel analysis:
|
|
131
|
+
* • Onboarding: account created → first restaurant view, by signup method
|
|
132
|
+
* • Order: checkout → delivery, by platform / tier / time of day
|
|
133
|
+
* • Discovery: search type → conversion to ordering
|
|
134
|
+
*
|
|
135
|
+
* ───────────────────────────────────────────────────────────────────────────────
|
|
136
|
+
* EXPECTED METRICS SUMMARY
|
|
137
|
+
* ───────────────────────────────────────────────────────────────────────────────
|
|
138
|
+
*
|
|
139
|
+
* Hook | Metric | Baseline | Hook Effect | Ratio
|
|
140
|
+
* ──────────────────────|──────────────────────|──────────|─────────────|──────
|
|
141
|
+
* Lunch Rush | Funnel conversion | 60% | 84% | 1.4x
|
|
142
|
+
* Coupon Injection | Free user coupons | 0% | 30% | N/A
|
|
143
|
+
* Late Night Munchies | American cuisine % | ~15% | 70% | ~4.7x
|
|
144
|
+
* Rainy Week Surge | Order volume | 100% | 140% | 1.4x
|
|
145
|
+
* Referral Power Users | Reorder frequency | 1x | 2x | 2.0x
|
|
146
|
+
* Trial Conversion | Post-trial retention | 100% | 40% | 0.4x
|
|
147
|
+
* Support Ticket Churn | High-risk users | 0% | 15% | N/A
|
|
148
|
+
* First Order Bonus | New user conversion | 1x | 1.4x | 1.4x
|
|
70
149
|
*/
|
|
71
150
|
|
|
72
151
|
// Generate consistent IDs for lookup tables and event properties
|
|
@@ -168,7 +247,7 @@ const config = {
|
|
|
168
247
|
weight: 1,
|
|
169
248
|
isFirstEvent: true,
|
|
170
249
|
properties: {
|
|
171
|
-
"signup_method":
|
|
250
|
+
"signup_method": ["email", "google", "apple", "facebook"],
|
|
172
251
|
"referral_code": u.pickAWinner([true, false], 0.3),
|
|
173
252
|
}
|
|
174
253
|
},
|
|
@@ -176,7 +255,7 @@ const config = {
|
|
|
176
255
|
event: "restaurant browsed",
|
|
177
256
|
weight: 18,
|
|
178
257
|
properties: {
|
|
179
|
-
"cuisine_type":
|
|
258
|
+
"cuisine_type": [
|
|
180
259
|
"American",
|
|
181
260
|
"Italian",
|
|
182
261
|
"Chinese",
|
|
@@ -185,8 +264,8 @@ const config = {
|
|
|
185
264
|
"Indian",
|
|
186
265
|
"Thai",
|
|
187
266
|
"Mediterranean"
|
|
188
|
-
]
|
|
189
|
-
"sort_by":
|
|
267
|
+
],
|
|
268
|
+
"sort_by": ["recommended", "distance", "rating", "price"],
|
|
190
269
|
"filter_applied": u.pickAWinner([true, false], 0.4),
|
|
191
270
|
}
|
|
192
271
|
},
|
|
@@ -195,7 +274,7 @@ const config = {
|
|
|
195
274
|
weight: 15,
|
|
196
275
|
properties: {
|
|
197
276
|
"restaurant_id": u.pickAWinner(restaurantIds),
|
|
198
|
-
"cuisine_type":
|
|
277
|
+
"cuisine_type": [
|
|
199
278
|
"American",
|
|
200
279
|
"Italian",
|
|
201
280
|
"Chinese",
|
|
@@ -204,10 +283,10 @@ const config = {
|
|
|
204
283
|
"Indian",
|
|
205
284
|
"Thai",
|
|
206
285
|
"Mediterranean"
|
|
207
|
-
]
|
|
286
|
+
],
|
|
208
287
|
"avg_rating": u.weighNumRange(1, 5, 0.8, 30),
|
|
209
288
|
"delivery_time_est_mins": u.weighNumRange(15, 90, 1.2, 40),
|
|
210
|
-
"price_tier":
|
|
289
|
+
"price_tier": ["$", "$$", "$$$", "$$$$"],
|
|
211
290
|
}
|
|
212
291
|
},
|
|
213
292
|
{
|
|
@@ -215,7 +294,7 @@ const config = {
|
|
|
215
294
|
weight: 14,
|
|
216
295
|
properties: {
|
|
217
296
|
"item_id": u.pickAWinner(itemIds),
|
|
218
|
-
"item_category":
|
|
297
|
+
"item_category": ["entree", "appetizer", "drink", "dessert", "side"],
|
|
219
298
|
"item_price": u.weighNumRange(3, 65, 1.0, 40),
|
|
220
299
|
"customization_count": u.weighNumRange(0, 5, 1.5, 20),
|
|
221
300
|
}
|
|
@@ -225,7 +304,7 @@ const config = {
|
|
|
225
304
|
weight: 5,
|
|
226
305
|
properties: {
|
|
227
306
|
"item_id": u.pickAWinner(itemIds),
|
|
228
|
-
"removal_reason":
|
|
307
|
+
"removal_reason": ["changed_mind", "too_expensive", "substitution"],
|
|
229
308
|
}
|
|
230
309
|
},
|
|
231
310
|
{
|
|
@@ -233,7 +312,7 @@ const config = {
|
|
|
233
312
|
weight: 4,
|
|
234
313
|
properties: {
|
|
235
314
|
"coupon_code": u.pickAWinner(couponCodes),
|
|
236
|
-
"discount_type":
|
|
315
|
+
"discount_type": ["percent", "flat", "free_delivery"],
|
|
237
316
|
"discount_value": u.weighNumRange(5, 50, 1.2, 20),
|
|
238
317
|
}
|
|
239
318
|
},
|
|
@@ -251,7 +330,7 @@ const config = {
|
|
|
251
330
|
weight: 10,
|
|
252
331
|
properties: {
|
|
253
332
|
"order_id": u.pickAWinner(orderIds),
|
|
254
|
-
"payment_method":
|
|
333
|
+
"payment_method": ["credit_card", "apple_pay", "google_pay", "paypal", "cash"],
|
|
255
334
|
"order_total": u.weighNumRange(10, 200, 0.8, 40),
|
|
256
335
|
"tip_amount": u.weighNumRange(0, 30, 1.5, 20),
|
|
257
336
|
"delivery_fee": u.weighNumRange(0, 12, 1.0, 20),
|
|
@@ -262,7 +341,7 @@ const config = {
|
|
|
262
341
|
weight: 13,
|
|
263
342
|
properties: {
|
|
264
343
|
"order_id": u.pickAWinner(orderIds),
|
|
265
|
-
"order_status":
|
|
344
|
+
"order_status": ["confirmed", "preparing", "picked_up", "en_route", "delivered"],
|
|
266
345
|
"eta_mins": u.weighNumRange(5, 60, 1.0, 30),
|
|
267
346
|
}
|
|
268
347
|
},
|
|
@@ -295,7 +374,7 @@ const config = {
|
|
|
295
374
|
"wings", "curry", "pho", "burritos", "steak"
|
|
296
375
|
]),
|
|
297
376
|
"results_count": u.weighNumRange(0, 50, 0.8, 30),
|
|
298
|
-
"search_type":
|
|
377
|
+
"search_type": ["restaurant", "cuisine", "dish"],
|
|
299
378
|
}
|
|
300
379
|
},
|
|
301
380
|
{
|
|
@@ -303,8 +382,8 @@ const config = {
|
|
|
303
382
|
weight: 8,
|
|
304
383
|
properties: {
|
|
305
384
|
"promo_id": () => `promo_${v.uid(5)}`,
|
|
306
|
-
"promo_type":
|
|
307
|
-
"promo_value":
|
|
385
|
+
"promo_type": ["banner", "push", "in_feed"],
|
|
386
|
+
"promo_value": ["10%", "15%", "20%", "25%", "30%", "40%", "50%"],
|
|
308
387
|
}
|
|
309
388
|
},
|
|
310
389
|
{
|
|
@@ -320,7 +399,7 @@ const config = {
|
|
|
320
399
|
event: "subscription cancelled",
|
|
321
400
|
weight: 1,
|
|
322
401
|
properties: {
|
|
323
|
-
"reason":
|
|
402
|
+
"reason": ["too_expensive", "not_ordering_enough", "found_alternative", "bad_experience"],
|
|
324
403
|
"months_subscribed": u.weighNumRange(1, 24, 1.5, 15),
|
|
325
404
|
}
|
|
326
405
|
},
|
|
@@ -328,7 +407,7 @@ const config = {
|
|
|
328
407
|
event: "support ticket",
|
|
329
408
|
weight: 3,
|
|
330
409
|
properties: {
|
|
331
|
-
"issue_type":
|
|
410
|
+
"issue_type": ["missing_item", "wrong_order", "late_delivery", "quality_issue", "refund_request"],
|
|
332
411
|
"order_id": u.pickAWinner(orderIds),
|
|
333
412
|
}
|
|
334
413
|
},
|
|
@@ -343,13 +422,13 @@ const config = {
|
|
|
343
422
|
],
|
|
344
423
|
|
|
345
424
|
superProps: {
|
|
346
|
-
platform:
|
|
425
|
+
platform: ["iOS", "Android", "Web"],
|
|
347
426
|
subscription_tier: u.pickAWinner(["Free", "Free", "Free", "Free", "QuickBite+"]),
|
|
348
|
-
city:
|
|
427
|
+
city: ["New York", "Los Angeles", "Chicago", "Houston", "Phoenix", "San Francisco"],
|
|
349
428
|
},
|
|
350
429
|
|
|
351
430
|
userProps: {
|
|
352
|
-
"preferred_cuisine":
|
|
431
|
+
"preferred_cuisine": [
|
|
353
432
|
"American",
|
|
354
433
|
"Italian",
|
|
355
434
|
"Chinese",
|
|
@@ -358,7 +437,7 @@ const config = {
|
|
|
358
437
|
"Indian",
|
|
359
438
|
"Thai",
|
|
360
439
|
"Mediterranean"
|
|
361
|
-
]
|
|
440
|
+
],
|
|
362
441
|
"avg_order_value": u.weighNumRange(15, 80, 0.8, 40),
|
|
363
442
|
"orders_per_month": u.weighNumRange(1, 20, 1.5, 10),
|
|
364
443
|
"favorite_restaurant_count": u.weighNumRange(1, 10),
|
|
@@ -371,7 +450,7 @@ const config = {
|
|
|
371
450
|
groupProps: {
|
|
372
451
|
restaurant_id: {
|
|
373
452
|
"name": () => `${chance.pickone(["The", "Big", "Lucky", "Golden", "Fresh", "Urban"])} ${chance.pickone(["Kitchen", "Grill", "Bowl", "Wok", "Bistro", "Plate", "Table", "Fork"])}`,
|
|
374
|
-
"cuisine":
|
|
453
|
+
"cuisine": [
|
|
375
454
|
"American",
|
|
376
455
|
"Italian",
|
|
377
456
|
"Chinese",
|
|
@@ -380,7 +459,7 @@ const config = {
|
|
|
380
459
|
"Indian",
|
|
381
460
|
"Thai",
|
|
382
461
|
"Mediterranean"
|
|
383
|
-
]
|
|
462
|
+
],
|
|
384
463
|
"avg_rating": u.weighNumRange(1, 5, 0.8, 30),
|
|
385
464
|
"delivery_radius_mi": u.weighNumRange(1, 15, 1.0, 10),
|
|
386
465
|
}
|
|
@@ -415,7 +494,7 @@ const config = {
|
|
|
415
494
|
// ═══════════════════════════════════════════════════════════════════
|
|
416
495
|
if (type === "funnel-pre") {
|
|
417
496
|
if (meta && meta.firstEventTime) {
|
|
418
|
-
const hour = dayjs(meta.firstEventTime).hour();
|
|
497
|
+
const hour = dayjs.unix(meta.firstEventTime).hour();
|
|
419
498
|
|
|
420
499
|
record.props = record.props || {};
|
|
421
500
|
|
|
@@ -450,7 +529,7 @@ const config = {
|
|
|
450
529
|
const userId = meta && meta.user && (meta.user.distinct_id || String(meta.user));
|
|
451
530
|
const isNewUser = userId && userId.charCodeAt(0) % 2 === 0;
|
|
452
531
|
if (isNewUser) {
|
|
453
|
-
record.conversionRate =
|
|
532
|
+
record.conversionRate = Math.min(98, record.conversionRate * 1.4);
|
|
454
533
|
record.props.first_order_bonus = true;
|
|
455
534
|
} else {
|
|
456
535
|
record.props.first_order_bonus = false;
|
|
@@ -484,6 +563,9 @@ const config = {
|
|
|
484
563
|
event: "coupon applied",
|
|
485
564
|
time: midTime,
|
|
486
565
|
user_id: firstEvent.user_id,
|
|
566
|
+
subscription_tier: firstEvent.subscription_tier,
|
|
567
|
+
platform: firstEvent.platform,
|
|
568
|
+
city: firstEvent.city,
|
|
487
569
|
coupon_code: chance.pickone(couponCodes),
|
|
488
570
|
discount_type: chance.pickone(["percent", "flat", "free_delivery"]),
|
|
489
571
|
discount_value: chance.integer({ min: 10, max: 30 }),
|
|
@@ -535,23 +617,7 @@ const config = {
|
|
|
535
617
|
if (EVENT_TIME.isAfter(RAINY_WEEK_START) && EVENT_TIME.isBefore(RAINY_WEEK_END)) {
|
|
536
618
|
record.delivery_fee = (record.delivery_fee || 5) * 2;
|
|
537
619
|
record.surge_pricing = true;
|
|
538
|
-
|
|
539
|
-
// 40% chance to duplicate the event (more orders during rain)
|
|
540
|
-
if (chance.bool({ likelihood: 40 })) {
|
|
541
|
-
const duplicateEvent = {
|
|
542
|
-
event: "order placed",
|
|
543
|
-
time: EVENT_TIME.add(chance.integer({ min: 5, max: 60 }), 'minutes').toISOString(),
|
|
544
|
-
user_id: record.user_id,
|
|
545
|
-
order_id: chance.pickone(orderIds),
|
|
546
|
-
payment_method: chance.pickone(["credit_card", "apple_pay", "google_pay"]),
|
|
547
|
-
order_total: chance.integer({ min: 15, max: 120 }),
|
|
548
|
-
tip_amount: chance.integer({ min: 0, max: 20 }),
|
|
549
|
-
delivery_fee: chance.integer({ min: 6, max: 24 }),
|
|
550
|
-
surge_pricing: true,
|
|
551
|
-
rainy_week: true,
|
|
552
|
-
};
|
|
553
|
-
return [record, duplicateEvent];
|
|
554
|
-
}
|
|
620
|
+
record.rainy_week = true;
|
|
555
621
|
} else {
|
|
556
622
|
record.surge_pricing = false;
|
|
557
623
|
}
|
|
@@ -645,6 +711,24 @@ const config = {
|
|
|
645
711
|
}
|
|
646
712
|
}
|
|
647
713
|
}
|
|
714
|
+
|
|
715
|
+
// ═══════════════════════════════════════════════════════════════
|
|
716
|
+
// HOOK 4: RAINY WEEK SURGE - duplicate order events (everything)
|
|
717
|
+
// Events tagged surge_pricing=true in the event hook get a 40%
|
|
718
|
+
// chance of duplication here, creating visible demand spikes.
|
|
719
|
+
// ═══════════════════════════════════════════════════════════════
|
|
720
|
+
const rainyDuplicates = [];
|
|
721
|
+
userEvents.forEach((event) => {
|
|
722
|
+
if (event.surge_pricing === true && event.event === "order placed" && chance.bool({ likelihood: 40 })) {
|
|
723
|
+
const dup = JSON.parse(JSON.stringify(event));
|
|
724
|
+
dup.time = dayjs(event.time).add(chance.integer({ min: 5, max: 60 }), 'minutes').toISOString();
|
|
725
|
+
dup.rainy_week = true;
|
|
726
|
+
rainyDuplicates.push(dup);
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
if (rainyDuplicates.length > 0) {
|
|
730
|
+
userEvents.push(...rainyDuplicates);
|
|
731
|
+
}
|
|
648
732
|
}
|
|
649
733
|
|
|
650
734
|
// ═══════════════════════════════════════════════════════════════════
|
|
@@ -668,320 +752,3 @@ const config = {
|
|
|
668
752
|
};
|
|
669
753
|
|
|
670
754
|
export default config;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
674
|
-
* NEEDLE IN A HAYSTACK - QUICKBITE FOOD DELIVERY ANALYTICS
|
|
675
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
676
|
-
*
|
|
677
|
-
* A food delivery app dungeon with 8 deliberately architected analytics
|
|
678
|
-
* insights hidden in the data. This dungeon is designed to showcase advanced
|
|
679
|
-
* product analytics patterns and demonstrate how to find "needles" (meaningful
|
|
680
|
-
* insights) in "haystacks" (large datasets).
|
|
681
|
-
*
|
|
682
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
683
|
-
* DATASET OVERVIEW
|
|
684
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
685
|
-
*
|
|
686
|
-
* - 5,000 users over 100 days
|
|
687
|
-
* - 360K events across 17 event types
|
|
688
|
-
* - 3 funnels (onboarding, order completion, discovery to order)
|
|
689
|
-
* - Group analytics (restaurants)
|
|
690
|
-
* - Lookup tables (menu items, coupon codes)
|
|
691
|
-
* - Subscription tiers (Free, QuickBite+)
|
|
692
|
-
*
|
|
693
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
694
|
-
* THE 8 ARCHITECTED HOOKS
|
|
695
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
696
|
-
*
|
|
697
|
-
* Each hook creates a specific, discoverable analytics insight that simulates
|
|
698
|
-
* real-world product behavior patterns.
|
|
699
|
-
*
|
|
700
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
701
|
-
* 1. LUNCH RUSH CONVERSION (funnel-pre)
|
|
702
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
703
|
-
*
|
|
704
|
-
* PATTERN: Funnel conversion rates are boosted during meal-time hours.
|
|
705
|
-
* Lunch (11AM-1PM) gets a 1.4x multiplier; dinner (5PM-8PM) gets 1.2x.
|
|
706
|
-
* Events during these windows carry lunch_rush or dinner_rush properties.
|
|
707
|
-
*
|
|
708
|
-
* HOW TO FIND IT:
|
|
709
|
-
* - Break down funnel conversion by hour of day
|
|
710
|
-
* - Compare conversion rates during 11AM-1PM vs. off-peak hours
|
|
711
|
-
* - Filter events where lunch_rush = true or dinner_rush = true
|
|
712
|
-
*
|
|
713
|
-
* EXPECTED INSIGHT: Lunch hour funnels convert ~40% better than baseline.
|
|
714
|
-
* Dinner hour funnels convert ~20% better. Clear time-of-day pattern in
|
|
715
|
-
* the checkout-to-order-to-delivery pipeline.
|
|
716
|
-
*
|
|
717
|
-
* REAL-WORLD ANALOGUE: Food delivery apps see massive demand spikes during
|
|
718
|
-
* traditional meal times. Users ordering during these windows have higher
|
|
719
|
-
* intent and thus higher conversion rates.
|
|
720
|
-
*
|
|
721
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
722
|
-
* 2. COUPON INJECTION (funnel-post)
|
|
723
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
724
|
-
*
|
|
725
|
-
* PATTERN: Free-tier users get coupon_applied events spliced into their
|
|
726
|
-
* funnel sequences 30% of the time. These injected coupons carry the
|
|
727
|
-
* coupon_injected: true property to distinguish them from organic usage.
|
|
728
|
-
*
|
|
729
|
-
* HOW TO FIND IT:
|
|
730
|
-
* - Segment by subscription_tier = "Free"
|
|
731
|
-
* - Look for coupon_applied events with coupon_injected = true
|
|
732
|
-
* - Compare funnel completion rates for Free users with/without coupons
|
|
733
|
-
*
|
|
734
|
-
* EXPECTED INSIGHT: ~30% of Free users receive promotional coupons mid-funnel.
|
|
735
|
-
* These users should show different downstream conversion behavior, simulating
|
|
736
|
-
* how promotional nudges affect the purchase funnel.
|
|
737
|
-
*
|
|
738
|
-
* REAL-WORLD ANALOGUE: Apps frequently inject promotional offers (push
|
|
739
|
-
* notifications, in-app banners) to non-paying users during key funnel
|
|
740
|
-
* moments to boost conversion.
|
|
741
|
-
*
|
|
742
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
743
|
-
* 3. LATE NIGHT MUNCHIES (event)
|
|
744
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
745
|
-
*
|
|
746
|
-
* PATTERN: Between 10PM and 2AM, restaurant views and cart additions skew
|
|
747
|
-
* 70% toward American (fast food) cuisine. Item prices are boosted by 1.3x.
|
|
748
|
-
* Events carry late_night_order: true.
|
|
749
|
-
*
|
|
750
|
-
* HOW TO FIND IT:
|
|
751
|
-
* - Break down restaurant_viewed by hour of day and cuisine_type
|
|
752
|
-
* - Compare cuisine distribution at 10PM-2AM vs. daytime
|
|
753
|
-
* - Filter late_night_order = true and compare average item_price
|
|
754
|
-
*
|
|
755
|
-
* EXPECTED INSIGHT: Late-night orders are overwhelmingly fast food with
|
|
756
|
-
* higher average prices. The cuisine distribution at night is dramatically
|
|
757
|
-
* different from daytime patterns.
|
|
758
|
-
*
|
|
759
|
-
* REAL-WORLD ANALOGUE: Late-night food delivery is dominated by fast food
|
|
760
|
-
* and comfort food. Many platforms charge late-night surcharges or see
|
|
761
|
-
* naturally inflated basket sizes during these hours.
|
|
762
|
-
*
|
|
763
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
764
|
-
* 4. RAINY WEEK SURGE (event)
|
|
765
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
766
|
-
*
|
|
767
|
-
* PATTERN: During days 20-27 of the dataset, a simulated rainy week causes:
|
|
768
|
-
* - Delivery fees double on order_placed events
|
|
769
|
-
* - surge_pricing: true flag added
|
|
770
|
-
* - 40% chance of duplicate order events (demand surge)
|
|
771
|
-
*
|
|
772
|
-
* HOW TO FIND IT:
|
|
773
|
-
* - Chart order_placed event count by day
|
|
774
|
-
* - Filter days 20-27 and compare delivery_fee averages
|
|
775
|
-
* - Look for surge_pricing = true and rainy_week = true properties
|
|
776
|
-
*
|
|
777
|
-
* EXPECTED INSIGHT: Clear spike in order volume around days 20-27, with
|
|
778
|
-
* doubled delivery fees and surge pricing markers. The demand surge is
|
|
779
|
-
* visible as a ~40% increase in order_placed event volume.
|
|
780
|
-
*
|
|
781
|
-
* REAL-WORLD ANALOGUE: Weather events drive significant demand surges for
|
|
782
|
-
* food delivery. Platforms respond with surge pricing on delivery fees,
|
|
783
|
-
* and order volume increases as people avoid going out.
|
|
784
|
-
*
|
|
785
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
786
|
-
* 5. REFERRAL POWER USERS (everything)
|
|
787
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
788
|
-
*
|
|
789
|
-
* PATTERN: Users whose account_created event has referral_code = true:
|
|
790
|
-
* - Get 2x more reorder_initiated events (higher loyalty)
|
|
791
|
-
* - Have food_rating boosted to 4-5 (higher satisfaction)
|
|
792
|
-
* - Carry referral_user: true on affected events
|
|
793
|
-
*
|
|
794
|
-
* HOW TO FIND IT:
|
|
795
|
-
* - Segment users by: referral_code = true on account_created
|
|
796
|
-
* - Compare: reorder_initiated event count per user
|
|
797
|
-
* - Compare: average food_rating on order_rated events
|
|
798
|
-
*
|
|
799
|
-
* EXPECTED INSIGHT: Referred users reorder roughly 2x more often and rate
|
|
800
|
-
* food 4-5 stars consistently. They represent a higher-LTV, more-satisfied
|
|
801
|
-
* segment of the user base.
|
|
802
|
-
*
|
|
803
|
-
* REAL-WORLD ANALOGUE: Referral programs consistently produce higher-quality
|
|
804
|
-
* users. Referred customers have lower acquisition costs, higher retention,
|
|
805
|
-
* and higher satisfaction because they come with built-in social proof.
|
|
806
|
-
*
|
|
807
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
808
|
-
* 6. TRIAL CONVERSION (everything)
|
|
809
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
810
|
-
*
|
|
811
|
-
* PATTERN: Users with subscription_started where trial = true are evaluated:
|
|
812
|
-
* - If they place 3+ orders in their first 14 days: retained (all events kept)
|
|
813
|
-
* - If fewer than 3 orders: churned (60% of events after day 14 removed)
|
|
814
|
-
* - Retained users carry trial_retained: true
|
|
815
|
-
*
|
|
816
|
-
* HOW TO FIND IT:
|
|
817
|
-
* - Segment users by: subscription_started with trial = true
|
|
818
|
-
* - Count order_placed events within first 14 days per user
|
|
819
|
-
* - Compare: event volume after day 14 for 3+ orders vs. <3 orders
|
|
820
|
-
* - Look for trial_retained = true property
|
|
821
|
-
*
|
|
822
|
-
* EXPECTED INSIGHT: Trial users who place 3+ early orders show sustained
|
|
823
|
-
* engagement. Those who don't show a dramatic drop-off after day 14, with
|
|
824
|
-
* 60% fewer events. The "magic number" for trial conversion is 3 orders.
|
|
825
|
-
*
|
|
826
|
-
* REAL-WORLD ANALOGUE: Subscription services often find a "magic number"
|
|
827
|
-
* of early actions that predict long-term retention. For food delivery,
|
|
828
|
-
* this is typically a threshold of orders during the trial period.
|
|
829
|
-
*
|
|
830
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
831
|
-
* 7. SUPPORT TICKET CHURN (user)
|
|
832
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
833
|
-
*
|
|
834
|
-
* PATTERN: 15% of users are flagged as is_high_risk = true with a
|
|
835
|
-
* churn_risk_score between 70-100. The remaining 85% get scores of 0-40.
|
|
836
|
-
* This creates a binary segmentation opportunity for retention teams.
|
|
837
|
-
*
|
|
838
|
-
* HOW TO FIND IT:
|
|
839
|
-
* - Segment users by: is_high_risk = true
|
|
840
|
-
* - Compare: churn_risk_score distribution
|
|
841
|
-
* - Cross-reference: support_ticket event frequency for high-risk users
|
|
842
|
-
* - Compare: retention and ordering behavior by risk segment
|
|
843
|
-
*
|
|
844
|
-
* EXPECTED INSIGHT: 15% of users have churn scores above 70, creating a
|
|
845
|
-
* clear at-risk segment. These users likely correlate with higher support
|
|
846
|
-
* ticket rates and lower order frequency.
|
|
847
|
-
*
|
|
848
|
-
* REAL-WORLD ANALOGUE: Customer health scoring is used by subscription
|
|
849
|
-
* businesses to identify at-risk users for proactive retention outreach.
|
|
850
|
-
* ML models in production generate similar risk scores from behavioral data.
|
|
851
|
-
*
|
|
852
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
853
|
-
* 8. FIRST ORDER BONUS (funnel-pre)
|
|
854
|
-
* ───────────────────────────────────────────────────────────────────────────────
|
|
855
|
-
*
|
|
856
|
-
* PATTERN: For the Order Completion funnel (checkout started -> order placed
|
|
857
|
-
* -> order delivered), new users (born in dataset) get their conversion rate
|
|
858
|
-
* boosted to 90%. Events carry first_order_bonus: true.
|
|
859
|
-
*
|
|
860
|
-
* HOW TO FIND IT:
|
|
861
|
-
* - Segment the Order Completion funnel by new vs. existing users
|
|
862
|
-
* - Compare: conversion rates for new users vs. returning users
|
|
863
|
-
* - Filter: first_order_bonus = true
|
|
864
|
-
*
|
|
865
|
-
* EXPECTED INSIGHT: New users convert at ~90% through the order funnel,
|
|
866
|
-
* dramatically higher than the 60% baseline. This simulates first-order
|
|
867
|
-
* promotions (free delivery, $10 off) that most food delivery apps offer.
|
|
868
|
-
*
|
|
869
|
-
* REAL-WORLD ANALOGUE: Every major food delivery app offers aggressive
|
|
870
|
-
* first-order incentives. These dramatically boost initial conversion but
|
|
871
|
-
* the real question is whether those users return (see Hook #6).
|
|
872
|
-
*
|
|
873
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
874
|
-
* ADVANCED ANALYSIS IDEAS
|
|
875
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
876
|
-
*
|
|
877
|
-
* CROSS-HOOK PATTERNS:
|
|
878
|
-
*
|
|
879
|
-
* 1. The Perfect Customer: Users who:
|
|
880
|
-
* - Signed up via referral (Hook #5)
|
|
881
|
-
* - Started a trial and placed 3+ early orders (Hook #6)
|
|
882
|
-
* - Order during lunch rush (Hook #1)
|
|
883
|
-
* - Have low churn risk score (Hook #7)
|
|
884
|
-
* These users should have exceptional LTV and retention metrics.
|
|
885
|
-
*
|
|
886
|
-
* 2. Rainy Night Double Whammy: Do late-night orders during rainy week
|
|
887
|
-
* (Hook #3 + Hook #4) show compounded surge pricing effects?
|
|
888
|
-
*
|
|
889
|
-
* 3. Coupon-Driven Trial Conversion: Do free users who receive injected
|
|
890
|
-
* coupons (Hook #2) eventually start trials (Hook #6)?
|
|
891
|
-
*
|
|
892
|
-
* 4. Referral + First Order: Referred users (Hook #5) who also get the
|
|
893
|
-
* first order bonus (Hook #8) should have the highest conversion rates.
|
|
894
|
-
*
|
|
895
|
-
* 5. Support Tickets and Churn Risk: Do high-risk users (Hook #7) file
|
|
896
|
-
* more support tickets, and does this correlate with rainy week
|
|
897
|
-
* late deliveries (Hook #4)?
|
|
898
|
-
*
|
|
899
|
-
* COHORT ANALYSIS:
|
|
900
|
-
*
|
|
901
|
-
* - Cohort by signup week: Users who started during rainy week (days 20-27)
|
|
902
|
-
* should show different ordering patterns
|
|
903
|
-
* - Cohort by referral source: Referred vs. organic user lifecycle comparison
|
|
904
|
-
* - Cohort by subscription tier: Free vs. QuickBite+ across all metrics
|
|
905
|
-
* - Cohort by city: Do different cities show different cuisine preferences
|
|
906
|
-
* and ordering patterns?
|
|
907
|
-
*
|
|
908
|
-
* FUNNEL ANALYSIS:
|
|
909
|
-
*
|
|
910
|
-
* - Onboarding Funnel: How quickly do users go from account creation to
|
|
911
|
-
* first restaurant view? Break down by signup method.
|
|
912
|
-
* - Order Funnel: Compare checkout-to-delivery completion by platform,
|
|
913
|
-
* subscription tier, and time of day.
|
|
914
|
-
* - Discovery Funnel: How does search type (restaurant vs. cuisine vs. dish)
|
|
915
|
-
* affect downstream conversion to ordering?
|
|
916
|
-
*
|
|
917
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
918
|
-
* EXPECTED METRICS SUMMARY
|
|
919
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
920
|
-
*
|
|
921
|
-
* Hook | Metric | Baseline | Hook Effect | Ratio
|
|
922
|
-
* ──────────────────────|──────────────────────|──────────|─────────────|──────
|
|
923
|
-
* Lunch Rush | Funnel conversion | 60% | 84% | 1.4x
|
|
924
|
-
* Coupon Injection | Free user coupons | 0% | 30% | N/A
|
|
925
|
-
* Late Night Munchies | American cuisine % | ~15% | 70% | ~4.7x
|
|
926
|
-
* Rainy Week Surge | Order volume | 100% | 140% | 1.4x
|
|
927
|
-
* Referral Power Users | Reorder frequency | 1x | 2x | 2.0x
|
|
928
|
-
* Trial Conversion | Post-trial retention | 100% | 40% | 0.4x
|
|
929
|
-
* Support Ticket Churn | High-risk users | 0% | 15% | N/A
|
|
930
|
-
* First Order Bonus | New user conversion | 60% | 90% | 1.5x
|
|
931
|
-
*
|
|
932
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
933
|
-
* HOW TO RUN THIS DUNGEON
|
|
934
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
935
|
-
*
|
|
936
|
-
* From the dm4 root directory:
|
|
937
|
-
*
|
|
938
|
-
* npm start
|
|
939
|
-
*
|
|
940
|
-
* Or programmatically:
|
|
941
|
-
*
|
|
942
|
-
* import generate from './index.js';
|
|
943
|
-
* import config from './dungeons/harness-food.js';
|
|
944
|
-
* const results = await generate(config);
|
|
945
|
-
*
|
|
946
|
-
* OUTPUT FILES (with writeToDisk: false, format: "json", gzip: true):
|
|
947
|
-
*
|
|
948
|
-
* - needle-haystack-food__events.json.gz - All event data
|
|
949
|
-
* - needle-haystack-food__user_profiles.json.gz - User profiles
|
|
950
|
-
* - needle-haystack-food__group_profiles.json.gz - Restaurant profiles
|
|
951
|
-
* - needle-haystack-food__item_id_lookup.json.gz - Menu item catalog
|
|
952
|
-
* - needle-haystack-food__coupon_code_lookup.json.gz - Coupon catalog
|
|
953
|
-
*
|
|
954
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
955
|
-
* TESTING YOUR ANALYTICS PLATFORM
|
|
956
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
957
|
-
*
|
|
958
|
-
* This dungeon is perfect for testing:
|
|
959
|
-
*
|
|
960
|
-
* 1. Time-of-Day Analysis: Can you detect the lunch and dinner rush patterns?
|
|
961
|
-
* 2. Promotional Impact: Can you measure the effect of injected coupons?
|
|
962
|
-
* 3. Behavioral Shifts: Can you discover the late-night cuisine preferences?
|
|
963
|
-
* 4. Anomaly Detection: Can you spot the rainy week demand surge?
|
|
964
|
-
* 5. Referral Analysis: Can you quantify the referral user advantage?
|
|
965
|
-
* 6. Trial Optimization: Can you find the "magic number" of early orders?
|
|
966
|
-
* 7. Churn Prediction: Can you identify high-risk users before they leave?
|
|
967
|
-
* 8. New User Funnels: Can you measure the first-order bonus impact?
|
|
968
|
-
*
|
|
969
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
970
|
-
* WHY "NEEDLE IN A HAYSTACK"?
|
|
971
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
972
|
-
*
|
|
973
|
-
* Each hook is a "needle" - a meaningful, actionable insight hidden in a
|
|
974
|
-
* "haystack" of 360K events. The challenge is:
|
|
975
|
-
*
|
|
976
|
-
* 1. FINDING the needles (discovery)
|
|
977
|
-
* 2. VALIDATING they're real patterns (statistical significance)
|
|
978
|
-
* 3. UNDERSTANDING why they matter (business impact)
|
|
979
|
-
* 4. ACTING on them (product decisions)
|
|
980
|
-
*
|
|
981
|
-
* This mirrors real-world product analytics: your data contains valuable insights,
|
|
982
|
-
* but you need the right tools and skills to find them.
|
|
983
|
-
*
|
|
984
|
-
* Happy Hunting!
|
|
985
|
-
*
|
|
986
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
987
|
-
*/
|