@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
package/README.md
CHANGED
|
@@ -44,16 +44,16 @@ the main export accepts multiple input formats. use whatever fits your workflow:
|
|
|
44
44
|
|
|
45
45
|
```javascript
|
|
46
46
|
// load a dungeon file from disk
|
|
47
|
-
const result = await DUNGEON_MASTER('./dungeons/simple.js');
|
|
47
|
+
const result = await DUNGEON_MASTER('./dungeons/technical/simple.js');
|
|
48
48
|
|
|
49
49
|
// load a JSON dungeon (exported from the UI)
|
|
50
|
-
const result = await DUNGEON_MASTER('./dungeons/simple-schema.json');
|
|
50
|
+
const result = await DUNGEON_MASTER('./dungeons/technical/simple-schema.json');
|
|
51
51
|
|
|
52
52
|
// run multiple dungeons
|
|
53
53
|
const results = await DUNGEON_MASTER([
|
|
54
|
-
'./dungeons/gaming.js',
|
|
55
|
-
'./dungeons/media.js',
|
|
56
|
-
'./dungeons/food-delivery.js'
|
|
54
|
+
'./dungeons/vertical/gaming.js',
|
|
55
|
+
'./dungeons/vertical/media.js',
|
|
56
|
+
'./dungeons/vertical/food-delivery.js'
|
|
57
57
|
]);
|
|
58
58
|
|
|
59
59
|
// pass raw javascript as a string
|
|
@@ -70,7 +70,7 @@ const result = await DUNGEON_MASTER(`
|
|
|
70
70
|
`);
|
|
71
71
|
|
|
72
72
|
// override any config when loading from files
|
|
73
|
-
const result = await DUNGEON_MASTER('./dungeons/
|
|
73
|
+
const result = await DUNGEON_MASTER('./dungeons/vertical/fintech.js', {
|
|
74
74
|
numUsers: 100, // shrink for testing
|
|
75
75
|
writeToDisk: true,
|
|
76
76
|
verbose: true
|
|
@@ -95,7 +95,7 @@ console.log(result.importResults);
|
|
|
95
95
|
|
|
96
96
|
a dungeon is a javascript file that exports a configuration object. it defines your entire data model: events, funnels, user properties, group analytics, SCDs, and a hook function that engineers discoverable patterns into the data.
|
|
97
97
|
|
|
98
|
-
see `dungeons/` for
|
|
98
|
+
see `dungeons/vertical/` for customer-facing story dungeons (18 events, 8 hooks) and `dungeons/technical/` for feature-testing dungeons (mirrors, groups, scale, anonymous users).
|
|
99
99
|
|
|
100
100
|
```javascript
|
|
101
101
|
// dungeons/my-app.js
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"events": [
|
|
3
|
+
{
|
|
4
|
+
"event": "sign up",
|
|
5
|
+
"isFirstEvent": true,
|
|
6
|
+
"properties": {
|
|
7
|
+
"method": [
|
|
8
|
+
"email",
|
|
9
|
+
"google",
|
|
10
|
+
"facebook",
|
|
11
|
+
"github"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"event": "page view",
|
|
17
|
+
"weight": 10,
|
|
18
|
+
"properties": {
|
|
19
|
+
"page": [
|
|
20
|
+
"/",
|
|
21
|
+
"/pricing",
|
|
22
|
+
"/features",
|
|
23
|
+
"/docs",
|
|
24
|
+
"/blog",
|
|
25
|
+
"/signup"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"event": "purchase",
|
|
31
|
+
"weight": 2,
|
|
32
|
+
"properties": {
|
|
33
|
+
"amount": {
|
|
34
|
+
"$range": [
|
|
35
|
+
108,
|
|
36
|
+
392
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"currency": [
|
|
40
|
+
"USD",
|
|
41
|
+
"EUR",
|
|
42
|
+
"GBP"
|
|
43
|
+
],
|
|
44
|
+
"item_count": {
|
|
45
|
+
"$range": [
|
|
46
|
+
2,
|
|
47
|
+
7
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"event": "ad click",
|
|
54
|
+
"weight": 6,
|
|
55
|
+
"properties": {
|
|
56
|
+
"partner": [
|
|
57
|
+
"google",
|
|
58
|
+
"facebook",
|
|
59
|
+
"linkedin",
|
|
60
|
+
"twitter",
|
|
61
|
+
"bing",
|
|
62
|
+
"tiktok"
|
|
63
|
+
],
|
|
64
|
+
"ad_format": [
|
|
65
|
+
"banner",
|
|
66
|
+
"video",
|
|
67
|
+
"carousel",
|
|
68
|
+
"native",
|
|
69
|
+
"search"
|
|
70
|
+
],
|
|
71
|
+
"placement": [
|
|
72
|
+
"feed",
|
|
73
|
+
"sidebar",
|
|
74
|
+
"header",
|
|
75
|
+
"interstitial"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"event": "search",
|
|
81
|
+
"weight": 5,
|
|
82
|
+
"properties": {
|
|
83
|
+
"query_length": {
|
|
84
|
+
"$range": [
|
|
85
|
+
3,
|
|
86
|
+
28
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"results_count": {
|
|
90
|
+
"$range": [
|
|
91
|
+
21,
|
|
92
|
+
79
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"event": "share",
|
|
99
|
+
"weight": 3,
|
|
100
|
+
"properties": {
|
|
101
|
+
"platform": [
|
|
102
|
+
"twitter",
|
|
103
|
+
"facebook",
|
|
104
|
+
"linkedin",
|
|
105
|
+
"email"
|
|
106
|
+
],
|
|
107
|
+
"content_type": [
|
|
108
|
+
"product",
|
|
109
|
+
"page",
|
|
110
|
+
"deal"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"userProps": {
|
|
116
|
+
"plan": [
|
|
117
|
+
"free",
|
|
118
|
+
"starter",
|
|
119
|
+
"pro",
|
|
120
|
+
"enterprise"
|
|
121
|
+
],
|
|
122
|
+
"signup_source": [
|
|
123
|
+
"organic",
|
|
124
|
+
"paid",
|
|
125
|
+
"referral"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import Chance from 'chance';
|
|
2
|
+
let chance = new Chance();
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import utc from "dayjs/plugin/utc.js";
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
import { uid, comma } from 'ak-tools';
|
|
7
|
+
import { weighNumRange, date, integer, weighChoices } from "../../lib/utils/utils.js";
|
|
8
|
+
|
|
9
|
+
/** @typedef {import("../../types").Dungeon} Config */
|
|
10
|
+
/**
|
|
11
|
+
* ═══════════════════════════════════════════════════════════════
|
|
12
|
+
* TECHNICAL TEST: Ad Spend & Campaign Attribution
|
|
13
|
+
* ═══════════════════════════════════════════════════════════════
|
|
14
|
+
*
|
|
15
|
+
* Tests Mixpanel ad spend data generation and campaign attribution.
|
|
16
|
+
* - 1,000 users, 50K events, 90 days
|
|
17
|
+
* - hasAdSpend: true — generates cost, CPC, CTR, impressions, clicks
|
|
18
|
+
* - hasCampaigns: true — adds UTM parameters to events
|
|
19
|
+
* - hasBrowser: true — required for campaign tracking
|
|
20
|
+
* - 6 events: signup, page view, purchase, ad click, search, share
|
|
21
|
+
*
|
|
22
|
+
* No hooks. Focus is on verifying ad spend event structure
|
|
23
|
+
* and campaign attribution properties flow through correctly.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** @type {import('../../types').Dungeon} */
|
|
27
|
+
const config = {
|
|
28
|
+
seed: "ad spend test",
|
|
29
|
+
name: "ad-spend",
|
|
30
|
+
numDays: 90,
|
|
31
|
+
numEvents: 50_000,
|
|
32
|
+
numUsers: 1_000,
|
|
33
|
+
format: 'json',
|
|
34
|
+
region: "US",
|
|
35
|
+
hasAnonIds: true,
|
|
36
|
+
hasSessionIds: true,
|
|
37
|
+
hasAdSpend: true,
|
|
38
|
+
hasLocation: false,
|
|
39
|
+
hasAndroidDevices: false,
|
|
40
|
+
hasIOSDevices: false,
|
|
41
|
+
hasDesktopDevices: true,
|
|
42
|
+
hasBrowser: true,
|
|
43
|
+
hasCampaigns: true,
|
|
44
|
+
isAnonymous: false,
|
|
45
|
+
alsoInferFunnels: false,
|
|
46
|
+
concurrency: 1,
|
|
47
|
+
writeToDisk: false,
|
|
48
|
+
|
|
49
|
+
events: [
|
|
50
|
+
{
|
|
51
|
+
event: "sign up",
|
|
52
|
+
weight: 1,
|
|
53
|
+
isFirstEvent: true,
|
|
54
|
+
properties: {
|
|
55
|
+
method: ["email", "google", "facebook", "github"],
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
event: "page view",
|
|
60
|
+
weight: 10,
|
|
61
|
+
properties: {
|
|
62
|
+
page: ["/", "/pricing", "/features", "/docs", "/blog", "/signup"],
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
event: "purchase",
|
|
67
|
+
weight: 2,
|
|
68
|
+
properties: {
|
|
69
|
+
amount: weighNumRange(10, 500, .25),
|
|
70
|
+
currency: ["USD", "EUR", "GBP"],
|
|
71
|
+
item_count: weighNumRange(1, 8),
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
event: "ad click",
|
|
76
|
+
weight: 6,
|
|
77
|
+
properties: {
|
|
78
|
+
partner: ["google", "facebook", "linkedin", "twitter", "bing", "tiktok"],
|
|
79
|
+
ad_format: ["banner", "video", "carousel", "native", "search"],
|
|
80
|
+
placement: ["feed", "sidebar", "header", "interstitial"],
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
event: "search",
|
|
85
|
+
weight: 5,
|
|
86
|
+
properties: {
|
|
87
|
+
query_length: weighNumRange(1, 30),
|
|
88
|
+
results_count: weighNumRange(0, 100, .25),
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
event: "share",
|
|
93
|
+
weight: 3,
|
|
94
|
+
properties: {
|
|
95
|
+
platform: ["twitter", "facebook", "linkedin", "email"],
|
|
96
|
+
content_type: ["product", "page", "deal"],
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
funnels: [],
|
|
101
|
+
superProps: {},
|
|
102
|
+
userProps: {
|
|
103
|
+
plan: ["free", "starter", "pro", "enterprise"],
|
|
104
|
+
signup_source: ["organic", "organic", "organic", "paid", "paid", "referral"],
|
|
105
|
+
},
|
|
106
|
+
scdProps: {},
|
|
107
|
+
mirrorProps: {},
|
|
108
|
+
groupKeys: [],
|
|
109
|
+
groupProps: {},
|
|
110
|
+
lookupTables: [],
|
|
111
|
+
hook: function (record, type, meta) {
|
|
112
|
+
return record;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export default config;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"events": [
|
|
3
|
+
{
|
|
4
|
+
"event": "page view",
|
|
5
|
+
"weight": 10,
|
|
6
|
+
"properties": {
|
|
7
|
+
"page": [
|
|
8
|
+
"/",
|
|
9
|
+
"/features",
|
|
10
|
+
"/pricing",
|
|
11
|
+
"/docs",
|
|
12
|
+
"/blog"
|
|
13
|
+
],
|
|
14
|
+
"referrer": [
|
|
15
|
+
"direct",
|
|
16
|
+
"google",
|
|
17
|
+
"twitter",
|
|
18
|
+
"linkedin"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"event": "signup",
|
|
24
|
+
"isFirstEvent": true,
|
|
25
|
+
"properties": {
|
|
26
|
+
"method": [
|
|
27
|
+
"email",
|
|
28
|
+
"google",
|
|
29
|
+
"github",
|
|
30
|
+
"sso"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"event": "feature used",
|
|
36
|
+
"weight": 7,
|
|
37
|
+
"properties": {
|
|
38
|
+
"feature": [
|
|
39
|
+
"dashboard",
|
|
40
|
+
"reports",
|
|
41
|
+
"settings",
|
|
42
|
+
"export",
|
|
43
|
+
"import",
|
|
44
|
+
"search"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"event": "purchase",
|
|
50
|
+
"weight": 2,
|
|
51
|
+
"properties": {
|
|
52
|
+
"amount": {
|
|
53
|
+
"$range": [
|
|
54
|
+
114,
|
|
55
|
+
397
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"plan": [
|
|
59
|
+
"monthly",
|
|
60
|
+
"annual"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"event": "button click",
|
|
66
|
+
"weight": 8,
|
|
67
|
+
"properties": {
|
|
68
|
+
"button": [
|
|
69
|
+
"cta",
|
|
70
|
+
"nav",
|
|
71
|
+
"menu",
|
|
72
|
+
"submit",
|
|
73
|
+
"cancel",
|
|
74
|
+
"back"
|
|
75
|
+
],
|
|
76
|
+
"location": [
|
|
77
|
+
"header",
|
|
78
|
+
"body",
|
|
79
|
+
"footer",
|
|
80
|
+
"sidebar"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"userProps": {
|
|
86
|
+
"plan": [
|
|
87
|
+
"free",
|
|
88
|
+
"pro",
|
|
89
|
+
"enterprise"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anonymous Users — tests anonymous user mode, anonIds, and identity merge.
|
|
3
|
+
*
|
|
4
|
+
* Exercises: isAnonymous mode, hasAnonIds for anonymous-to-identified
|
|
5
|
+
* user flows, long 180-day timespan for tail behavior.
|
|
6
|
+
*
|
|
7
|
+
* - 1000 users, 50K events, 180 days
|
|
8
|
+
* - isAnonymous: true, hasAnonIds: true
|
|
9
|
+
* - Simple events with signup as isFirstEvent (identity resolution point)
|
|
10
|
+
* - No hooks, minimal config
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import Chance from 'chance';
|
|
14
|
+
let chance = new Chance();
|
|
15
|
+
import { weighNumRange, weighChoices } from "../../lib/utils/utils.js";
|
|
16
|
+
|
|
17
|
+
/** @typedef {import("../../types").Dungeon} Config */
|
|
18
|
+
/** @type {import('../../types').Dungeon} */
|
|
19
|
+
const config = {
|
|
20
|
+
token: "",
|
|
21
|
+
seed: "anonymous-users",
|
|
22
|
+
numDays: 180,
|
|
23
|
+
numEvents: 50_000,
|
|
24
|
+
numUsers: 1_000,
|
|
25
|
+
format: "json",
|
|
26
|
+
region: "US",
|
|
27
|
+
isAnonymous: true,
|
|
28
|
+
hasAnonIds: true,
|
|
29
|
+
hasSessionIds: true,
|
|
30
|
+
hasAdSpend: false,
|
|
31
|
+
hasLocation: false,
|
|
32
|
+
hasAndroidDevices: true,
|
|
33
|
+
hasIOSDevices: true,
|
|
34
|
+
hasDesktopDevices: true,
|
|
35
|
+
hasBrowser: true,
|
|
36
|
+
hasCampaigns: false,
|
|
37
|
+
alsoInferFunnels: false,
|
|
38
|
+
concurrency: 1,
|
|
39
|
+
writeToDisk: false,
|
|
40
|
+
|
|
41
|
+
events: [
|
|
42
|
+
{
|
|
43
|
+
event: "page view",
|
|
44
|
+
weight: 10,
|
|
45
|
+
properties: {
|
|
46
|
+
page: ["/", "/", "/features", "/pricing", "/docs", "/blog"],
|
|
47
|
+
referrer: weighChoices(["direct", "direct", "direct", "google", "google", "twitter", "linkedin"]),
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
event: "signup",
|
|
52
|
+
weight: 1,
|
|
53
|
+
isFirstEvent: true,
|
|
54
|
+
properties: {
|
|
55
|
+
method: ["email", "google", "github", "sso"],
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
event: "feature used",
|
|
60
|
+
weight: 7,
|
|
61
|
+
properties: {
|
|
62
|
+
feature: ["dashboard", "reports", "settings", "export", "import", "search"],
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
event: "purchase",
|
|
67
|
+
weight: 2,
|
|
68
|
+
properties: {
|
|
69
|
+
amount: weighNumRange(10, 500, .25),
|
|
70
|
+
plan: ["monthly", "annual"],
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
event: "button click",
|
|
75
|
+
weight: 8,
|
|
76
|
+
properties: {
|
|
77
|
+
button: ["cta", "nav", "menu", "submit", "cancel", "back"],
|
|
78
|
+
location: ["header", "body", "footer", "sidebar"],
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
|
|
83
|
+
funnels: [],
|
|
84
|
+
|
|
85
|
+
superProps: {},
|
|
86
|
+
|
|
87
|
+
userProps: {
|
|
88
|
+
plan: weighChoices(["free", "free", "free", "pro", "pro", "enterprise"]),
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
scdProps: {},
|
|
92
|
+
mirrorProps: {},
|
|
93
|
+
groupKeys: [],
|
|
94
|
+
groupProps: {},
|
|
95
|
+
lookupTables: [],
|
|
96
|
+
|
|
97
|
+
hook: function (record, type, meta) {
|
|
98
|
+
return record;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default config;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"events": [
|
|
3
|
+
{
|
|
4
|
+
"event": "checkout",
|
|
5
|
+
"weight": 2,
|
|
6
|
+
"properties": {
|
|
7
|
+
"currency": [
|
|
8
|
+
"USD",
|
|
9
|
+
"CAD",
|
|
10
|
+
"EUR",
|
|
11
|
+
"BTC",
|
|
12
|
+
"ETH",
|
|
13
|
+
"JPY"
|
|
14
|
+
],
|
|
15
|
+
"coupon": [
|
|
16
|
+
"none",
|
|
17
|
+
"10%OFF",
|
|
18
|
+
"20%OFF",
|
|
19
|
+
"30%OFF",
|
|
20
|
+
"40%OFF",
|
|
21
|
+
"50%OFF"
|
|
22
|
+
],
|
|
23
|
+
"cart": {
|
|
24
|
+
"$type": "object[]",
|
|
25
|
+
"$keys": [
|
|
26
|
+
"product_id",
|
|
27
|
+
"product_url"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"discount_applied": [
|
|
31
|
+
false
|
|
32
|
+
],
|
|
33
|
+
"discount_percent": [
|
|
34
|
+
0
|
|
35
|
+
],
|
|
36
|
+
"user_segment": [
|
|
37
|
+
"regular"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"event": "add to cart",
|
|
43
|
+
"weight": 4,
|
|
44
|
+
"properties": {
|
|
45
|
+
"item": {
|
|
46
|
+
"$type": "object[]",
|
|
47
|
+
"$keys": [
|
|
48
|
+
"product_id",
|
|
49
|
+
"product_url"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"user_segment": [
|
|
53
|
+
"regular"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"event": "view item",
|
|
59
|
+
"weight": 8,
|
|
60
|
+
"properties": {
|
|
61
|
+
"item": {
|
|
62
|
+
"$type": "object[]",
|
|
63
|
+
"$keys": [
|
|
64
|
+
"product_id",
|
|
65
|
+
"product_url"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"user_segment": [
|
|
69
|
+
"regular"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"event": "save item",
|
|
75
|
+
"weight": 5,
|
|
76
|
+
"properties": {
|
|
77
|
+
"item": {
|
|
78
|
+
"$type": "object[]",
|
|
79
|
+
"$keys": [
|
|
80
|
+
"product_id",
|
|
81
|
+
"product_url"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"save_context": [
|
|
85
|
+
"weekday_intent"
|
|
86
|
+
],
|
|
87
|
+
"user_segment": [
|
|
88
|
+
"regular"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"superProps": {
|
|
94
|
+
"theme": [
|
|
95
|
+
"light",
|
|
96
|
+
"dark",
|
|
97
|
+
"custom"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"userProps": {
|
|
101
|
+
"spiritAnimal": [
|
|
102
|
+
"duck",
|
|
103
|
+
"dog",
|
|
104
|
+
"otter",
|
|
105
|
+
"penguin",
|
|
106
|
+
"cat",
|
|
107
|
+
"elephant",
|
|
108
|
+
"lion",
|
|
109
|
+
"cheetah",
|
|
110
|
+
"giraffe",
|
|
111
|
+
"zebra",
|
|
112
|
+
"rhino",
|
|
113
|
+
"hippo",
|
|
114
|
+
"whale",
|
|
115
|
+
"dolphin",
|
|
116
|
+
"shark",
|
|
117
|
+
"octopus",
|
|
118
|
+
"squid",
|
|
119
|
+
"jellyfish",
|
|
120
|
+
"starfish",
|
|
121
|
+
"seahorse",
|
|
122
|
+
"crab",
|
|
123
|
+
"lobster",
|
|
124
|
+
"shrimp",
|
|
125
|
+
"clam",
|
|
126
|
+
"snail",
|
|
127
|
+
"slug",
|
|
128
|
+
"butterfly",
|
|
129
|
+
"moth",
|
|
130
|
+
"bee",
|
|
131
|
+
"wasp",
|
|
132
|
+
"ant",
|
|
133
|
+
"beetle",
|
|
134
|
+
"ladybug",
|
|
135
|
+
"caterpillar",
|
|
136
|
+
"centipede",
|
|
137
|
+
"millipede",
|
|
138
|
+
"scorpion",
|
|
139
|
+
"spider",
|
|
140
|
+
"tarantula",
|
|
141
|
+
"tick",
|
|
142
|
+
"mite",
|
|
143
|
+
"mosquito",
|
|
144
|
+
"fly",
|
|
145
|
+
"dragonfly",
|
|
146
|
+
"damselfly",
|
|
147
|
+
"grasshopper",
|
|
148
|
+
"cricket",
|
|
149
|
+
"locust",
|
|
150
|
+
"mantis",
|
|
151
|
+
"cockroach",
|
|
152
|
+
"termite",
|
|
153
|
+
"praying mantis",
|
|
154
|
+
"walking stick",
|
|
155
|
+
"stick bug",
|
|
156
|
+
"leaf insect",
|
|
157
|
+
"lacewing",
|
|
158
|
+
"aphid",
|
|
159
|
+
"cicada",
|
|
160
|
+
"thrips",
|
|
161
|
+
"psyllid",
|
|
162
|
+
"scale insect",
|
|
163
|
+
"whitefly",
|
|
164
|
+
"mealybug",
|
|
165
|
+
"planthopper",
|
|
166
|
+
"leafhopper",
|
|
167
|
+
"treehopper",
|
|
168
|
+
"flea",
|
|
169
|
+
"louse",
|
|
170
|
+
"bedbug",
|
|
171
|
+
"flea beetle",
|
|
172
|
+
"weevil",
|
|
173
|
+
"longhorn beetle",
|
|
174
|
+
"leaf beetle",
|
|
175
|
+
"tiger beetle",
|
|
176
|
+
"ground beetle",
|
|
177
|
+
"lady beetle",
|
|
178
|
+
"firefly",
|
|
179
|
+
"click beetle",
|
|
180
|
+
"rove beetle",
|
|
181
|
+
"scarab beetle",
|
|
182
|
+
"dung beetle",
|
|
183
|
+
"stag beetle",
|
|
184
|
+
"rhinoceros beetle",
|
|
185
|
+
"hercules beetle",
|
|
186
|
+
"goliath beetle",
|
|
187
|
+
"jewel beetle",
|
|
188
|
+
"tortoise beetle"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|