@walkeros/web-destination-posthog 3.4.0 → 3.4.1

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.
@@ -96,7 +96,7 @@ function L(e2, t = {}, n = {}) {
96
96
  }
97
97
  function fe(e2 = {}) {
98
98
  var _a;
99
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
99
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
100
100
  if (e2.name) {
101
101
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
102
102
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -110,15 +110,20 @@ function le(e2 = "entity action", t = {}) {
110
110
 
111
111
  // src/examples/step.ts
112
112
  var defaultEventForwarding = {
113
+ title: "Default capture",
114
+ description: "A walker event becomes a PostHog capture call with the event name and empty properties.",
113
115
  in: le("product view", { timestamp: 1700000100 }),
114
116
  out: [["posthog.capture", "product view", {}]]
115
117
  };
116
118
  var wildcardIgnored = {
119
+ public: false,
117
120
  in: le("debug noise", { timestamp: 1700000101 }),
118
121
  mapping: { ignore: true },
119
122
  out: []
120
123
  };
121
124
  var destinationLevelInclude = {
125
+ title: "Include data",
126
+ description: "Destination-level include flattens the event data section into prefixed PostHog capture properties.",
122
127
  in: le("product view", { timestamp: 1700000102 }),
123
128
  configInclude: ["data"],
124
129
  out: [
@@ -136,6 +141,8 @@ var destinationLevelInclude = {
136
141
  ]
137
142
  };
138
143
  var ruleIncludeReplaces = {
144
+ title: "Rule include overrides",
145
+ description: "A per-rule include replaces the destination-level include so this event forwards only globals.",
139
146
  in: le("order complete", { timestamp: 1700000103 }),
140
147
  configInclude: ["data"],
141
148
  mapping: {
@@ -152,6 +159,8 @@ var ruleIncludeReplaces = {
152
159
  ]
153
160
  };
154
161
  var destinationLevelIdentify = {
162
+ title: "Destination identify",
163
+ description: "Destination-level identify calls posthog.identify with the user id before firing the default capture.",
155
164
  in: le("page view", { timestamp: 1700000104 }),
156
165
  settings: {
157
166
  identify: {
@@ -166,6 +175,8 @@ var destinationLevelIdentify = {
166
175
  ]
167
176
  };
168
177
  var userLoginIdentify = {
178
+ title: "User login identify",
179
+ description: "A user login fires PostHog identify with $set and $set_once person properties, skipping the capture.",
169
180
  in: le("user login", {
170
181
  timestamp: 1700000105,
171
182
  data: {
@@ -216,6 +227,8 @@ var userLoginIdentify = {
216
227
  ]
217
228
  };
218
229
  var profileUpdateSetPersonProperties = {
230
+ title: "Set person properties",
231
+ description: "A profile update calls setPersonProperties to enrich the PostHog profile without changing identity.",
219
232
  in: le("profile update", {
220
233
  timestamp: 1700000106,
221
234
  data: {
@@ -250,6 +263,8 @@ var profileUpdateSetPersonProperties = {
250
263
  ]
251
264
  };
252
265
  var userLogoutReset = {
266
+ title: "User logout reset",
267
+ description: "A user logout calls posthog.reset to clear the distinct id and generate a new anonymous one.",
253
268
  in: le("user logout", { timestamp: 1700000107 }),
254
269
  mapping: {
255
270
  skip: true,
@@ -260,6 +275,8 @@ var userLogoutReset = {
260
275
  out: [["posthog.reset"]]
261
276
  };
262
277
  var groupAssignmentWithProperties = {
278
+ title: "Group assignment",
279
+ description: "A company update assigns the user to a PostHog group and sets group properties via posthog.group.",
263
280
  in: le("company update", {
264
281
  timestamp: 1700000108,
265
282
  data: {
@@ -301,6 +318,8 @@ var groupAssignmentWithProperties = {
301
318
  ]
302
319
  };
303
320
  var orderCompleteWithInclude = {
321
+ title: "Order complete",
322
+ description: "An order complete captures order data and globals as prefixed properties for revenue analysis in PostHog.",
304
323
  in: le("order complete", { timestamp: 1700000109 }),
305
324
  mapping: {
306
325
  include: ["data", "globals"]
@@ -321,12 +340,16 @@ var orderCompleteWithInclude = {
321
340
  ]
322
341
  };
323
342
  var consentRevokeOptOut = {
343
+ title: "Consent revoked",
344
+ description: "A walker consent command with analytics denied calls posthog.opt_out_capturing to stop capture and replay.",
324
345
  command: "consent",
325
346
  in: { analytics: false },
326
347
  settings: {},
327
348
  out: [["posthog.opt_out_capturing"]]
328
349
  };
329
350
  var consentGrantOptIn = {
351
+ title: "Consent granted",
352
+ description: "A walker consent command with analytics granted calls posthog.opt_in_capturing to resume capture.",
330
353
  command: "consent",
331
354
  in: { analytics: true },
332
355
  settings: {},
@@ -75,7 +75,7 @@ function L(e2, t = {}, n = {}) {
75
75
  }
76
76
  function fe(e2 = {}) {
77
77
  var _a;
78
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
78
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
79
79
  if (e2.name) {
80
80
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
81
81
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -89,15 +89,20 @@ function le(e2 = "entity action", t = {}) {
89
89
 
90
90
  // src/examples/step.ts
91
91
  var defaultEventForwarding = {
92
+ title: "Default capture",
93
+ description: "A walker event becomes a PostHog capture call with the event name and empty properties.",
92
94
  in: le("product view", { timestamp: 1700000100 }),
93
95
  out: [["posthog.capture", "product view", {}]]
94
96
  };
95
97
  var wildcardIgnored = {
98
+ public: false,
96
99
  in: le("debug noise", { timestamp: 1700000101 }),
97
100
  mapping: { ignore: true },
98
101
  out: []
99
102
  };
100
103
  var destinationLevelInclude = {
104
+ title: "Include data",
105
+ description: "Destination-level include flattens the event data section into prefixed PostHog capture properties.",
101
106
  in: le("product view", { timestamp: 1700000102 }),
102
107
  configInclude: ["data"],
103
108
  out: [
@@ -115,6 +120,8 @@ var destinationLevelInclude = {
115
120
  ]
116
121
  };
117
122
  var ruleIncludeReplaces = {
123
+ title: "Rule include overrides",
124
+ description: "A per-rule include replaces the destination-level include so this event forwards only globals.",
118
125
  in: le("order complete", { timestamp: 1700000103 }),
119
126
  configInclude: ["data"],
120
127
  mapping: {
@@ -131,6 +138,8 @@ var ruleIncludeReplaces = {
131
138
  ]
132
139
  };
133
140
  var destinationLevelIdentify = {
141
+ title: "Destination identify",
142
+ description: "Destination-level identify calls posthog.identify with the user id before firing the default capture.",
134
143
  in: le("page view", { timestamp: 1700000104 }),
135
144
  settings: {
136
145
  identify: {
@@ -145,6 +154,8 @@ var destinationLevelIdentify = {
145
154
  ]
146
155
  };
147
156
  var userLoginIdentify = {
157
+ title: "User login identify",
158
+ description: "A user login fires PostHog identify with $set and $set_once person properties, skipping the capture.",
148
159
  in: le("user login", {
149
160
  timestamp: 1700000105,
150
161
  data: {
@@ -195,6 +206,8 @@ var userLoginIdentify = {
195
206
  ]
196
207
  };
197
208
  var profileUpdateSetPersonProperties = {
209
+ title: "Set person properties",
210
+ description: "A profile update calls setPersonProperties to enrich the PostHog profile without changing identity.",
198
211
  in: le("profile update", {
199
212
  timestamp: 1700000106,
200
213
  data: {
@@ -229,6 +242,8 @@ var profileUpdateSetPersonProperties = {
229
242
  ]
230
243
  };
231
244
  var userLogoutReset = {
245
+ title: "User logout reset",
246
+ description: "A user logout calls posthog.reset to clear the distinct id and generate a new anonymous one.",
232
247
  in: le("user logout", { timestamp: 1700000107 }),
233
248
  mapping: {
234
249
  skip: true,
@@ -239,6 +254,8 @@ var userLogoutReset = {
239
254
  out: [["posthog.reset"]]
240
255
  };
241
256
  var groupAssignmentWithProperties = {
257
+ title: "Group assignment",
258
+ description: "A company update assigns the user to a PostHog group and sets group properties via posthog.group.",
242
259
  in: le("company update", {
243
260
  timestamp: 1700000108,
244
261
  data: {
@@ -280,6 +297,8 @@ var groupAssignmentWithProperties = {
280
297
  ]
281
298
  };
282
299
  var orderCompleteWithInclude = {
300
+ title: "Order complete",
301
+ description: "An order complete captures order data and globals as prefixed properties for revenue analysis in PostHog.",
283
302
  in: le("order complete", { timestamp: 1700000109 }),
284
303
  mapping: {
285
304
  include: ["data", "globals"]
@@ -300,12 +319,16 @@ var orderCompleteWithInclude = {
300
319
  ]
301
320
  };
302
321
  var consentRevokeOptOut = {
322
+ title: "Consent revoked",
323
+ description: "A walker consent command with analytics denied calls posthog.opt_out_capturing to stop capture and replay.",
303
324
  command: "consent",
304
325
  in: { analytics: false },
305
326
  settings: {},
306
327
  out: [["posthog.opt_out_capturing"]]
307
328
  };
308
329
  var consentGrantOptIn = {
330
+ title: "Consent granted",
331
+ description: "A walker consent command with analytics granted calls posthog.opt_in_capturing to resume capture.",
309
332
  command: "consent",
310
333
  in: { analytics: true },
311
334
  settings: {},
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/web-destination-posthog",
4
- "version": "3.4.0",
4
+ "version": "3.4.1",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
@@ -213,6 +213,8 @@
213
213
  },
214
214
  "step": {
215
215
  "consentGrantOptIn": {
216
+ "title": "Consent granted",
217
+ "description": "A walker consent command with analytics granted calls posthog.opt_in_capturing to resume capture.",
216
218
  "command": "consent",
217
219
  "in": {
218
220
  "analytics": true
@@ -225,6 +227,8 @@
225
227
  ]
226
228
  },
227
229
  "consentRevokeOptOut": {
230
+ "title": "Consent revoked",
231
+ "description": "A walker consent command with analytics denied calls posthog.opt_out_capturing to stop capture and replay.",
228
232
  "command": "consent",
229
233
  "in": {
230
234
  "analytics": false
@@ -237,6 +241,8 @@
237
241
  ]
238
242
  },
239
243
  "defaultEventForwarding": {
244
+ "title": "Default capture",
245
+ "description": "A walker event becomes a PostHog capture call with the event name and empty properties.",
240
246
  "in": {
241
247
  "name": "product view",
242
248
  "data": {
@@ -276,7 +282,7 @@
276
282
  "group": "gr0up",
277
283
  "count": 1,
278
284
  "version": {
279
- "source": "3.4.0",
285
+ "source": "3.4.1",
280
286
  "tagging": 1
281
287
  },
282
288
  "source": {
@@ -294,6 +300,8 @@
294
300
  ]
295
301
  },
296
302
  "destinationLevelIdentify": {
303
+ "title": "Destination identify",
304
+ "description": "Destination-level identify calls posthog.identify with the user id before firing the default capture.",
297
305
  "in": {
298
306
  "name": "page view",
299
307
  "data": {
@@ -348,7 +356,7 @@
348
356
  "group": "gr0up",
349
357
  "count": 1,
350
358
  "version": {
351
- "source": "3.4.0",
359
+ "source": "3.4.1",
352
360
  "tagging": 1
353
361
  },
354
362
  "source": {
@@ -377,6 +385,8 @@
377
385
  ]
378
386
  },
379
387
  "destinationLevelInclude": {
388
+ "title": "Include data",
389
+ "description": "Destination-level include flattens the event data section into prefixed PostHog capture properties.",
380
390
  "in": {
381
391
  "name": "product view",
382
392
  "data": {
@@ -416,7 +426,7 @@
416
426
  "group": "gr0up",
417
427
  "count": 1,
418
428
  "version": {
419
- "source": "3.4.0",
429
+ "source": "3.4.1",
420
430
  "tagging": 1
421
431
  },
422
432
  "source": {
@@ -443,6 +453,8 @@
443
453
  ]
444
454
  },
445
455
  "groupAssignmentWithProperties": {
456
+ "title": "Group assignment",
457
+ "description": "A company update assigns the user to a PostHog group and sets group properties via posthog.group.",
446
458
  "in": {
447
459
  "name": "company update",
448
460
  "data": {
@@ -495,7 +507,7 @@
495
507
  "group": "gr0up",
496
508
  "count": 1,
497
509
  "version": {
498
- "source": "3.4.0",
510
+ "source": "3.4.1",
499
511
  "tagging": 1
500
512
  },
501
513
  "source": {
@@ -538,6 +550,8 @@
538
550
  ]
539
551
  },
540
552
  "orderCompleteWithInclude": {
553
+ "title": "Order complete",
554
+ "description": "An order complete captures order data and globals as prefixed properties for revenue analysis in PostHog.",
541
555
  "in": {
542
556
  "name": "order complete",
543
557
  "data": {
@@ -624,7 +638,7 @@
624
638
  "group": "gr0up",
625
639
  "count": 1,
626
640
  "version": {
627
- "source": "3.4.0",
641
+ "source": "3.4.1",
628
642
  "tagging": 1
629
643
  },
630
644
  "source": {
@@ -655,6 +669,8 @@
655
669
  ]
656
670
  },
657
671
  "profileUpdateSetPersonProperties": {
672
+ "title": "Set person properties",
673
+ "description": "A profile update calls setPersonProperties to enrich the PostHog profile without changing identity.",
658
674
  "in": {
659
675
  "name": "profile update",
660
676
  "data": {
@@ -705,7 +721,7 @@
705
721
  "group": "gr0up",
706
722
  "count": 1,
707
723
  "version": {
708
- "source": "3.4.0",
724
+ "source": "3.4.1",
709
725
  "tagging": 1
710
726
  },
711
727
  "source": {
@@ -745,6 +761,8 @@
745
761
  ]
746
762
  },
747
763
  "ruleIncludeReplaces": {
764
+ "title": "Rule include overrides",
765
+ "description": "A per-rule include replaces the destination-level include so this event forwards only globals.",
748
766
  "in": {
749
767
  "name": "order complete",
750
768
  "data": {
@@ -831,7 +849,7 @@
831
849
  "group": "gr0up",
832
850
  "count": 1,
833
851
  "version": {
834
- "source": "3.4.0",
852
+ "source": "3.4.1",
835
853
  "tagging": 1
836
854
  },
837
855
  "source": {
@@ -859,6 +877,8 @@
859
877
  ]
860
878
  },
861
879
  "userLoginIdentify": {
880
+ "title": "User login identify",
881
+ "description": "A user login fires PostHog identify with $set and $set_once person properties, skipping the capture.",
862
882
  "in": {
863
883
  "name": "user login",
864
884
  "data": {
@@ -912,7 +932,7 @@
912
932
  "group": "gr0up",
913
933
  "count": 1,
914
934
  "version": {
915
- "source": "3.4.0",
935
+ "source": "3.4.1",
916
936
  "tagging": 1
917
937
  },
918
938
  "source": {
@@ -961,6 +981,8 @@
961
981
  ]
962
982
  },
963
983
  "userLogoutReset": {
984
+ "title": "User logout reset",
985
+ "description": "A user logout calls posthog.reset to clear the distinct id and generate a new anonymous one.",
964
986
  "in": {
965
987
  "name": "user logout",
966
988
  "data": {
@@ -1017,7 +1039,7 @@
1017
1039
  "group": "gr0up",
1018
1040
  "count": 1,
1019
1041
  "version": {
1020
- "source": "3.4.0",
1042
+ "source": "3.4.1",
1021
1043
  "tagging": 1
1022
1044
  },
1023
1045
  "source": {
@@ -1039,6 +1061,7 @@
1039
1061
  ]
1040
1062
  },
1041
1063
  "wildcardIgnored": {
1064
+ "public": false,
1042
1065
  "in": {
1043
1066
  "name": "debug noise",
1044
1067
  "data": {
@@ -1095,7 +1118,7 @@
1095
1118
  "group": "gr0up",
1096
1119
  "count": 1,
1097
1120
  "version": {
1098
- "source": "3.4.0",
1121
+ "source": "3.4.1",
1099
1122
  "tagging": 1
1100
1123
  },
1101
1124
  "source": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-posthog",
3
3
  "description": "PostHog web destination for walkerOS (product analytics, session replay, feature flags, surveys)",
4
- "version": "3.4.0",
4
+ "version": "3.4.1",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "posthog-js": "^1.367.0",
41
- "@walkeros/web-core": "3.4.0"
41
+ "@walkeros/web-core": "3.4.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@walkeros/collector": "3.4.0"
44
+ "@walkeros/collector": "3.4.1"
45
45
  },
46
46
  "repository": {
47
47
  "url": "git+https://github.com/elbwalker/walkerOS.git",