@walkeros/web-destination-segment 4.0.0 → 4.0.1-next-1778183328892
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/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.js +30 -30
- package/dist/examples/index.mjs +30 -30
- package/dist/walkerOS.json +16 -16
- package/package.json +3 -3
package/dist/examples/index.js
CHANGED
|
@@ -90,37 +90,37 @@ __export(step_exports, {
|
|
|
90
90
|
|
|
91
91
|
// ../../../core/dist/index.mjs
|
|
92
92
|
var e = Object.defineProperty;
|
|
93
|
-
var
|
|
93
|
+
var s = {};
|
|
94
94
|
((t, n) => {
|
|
95
|
-
for (var
|
|
96
|
-
})(
|
|
95
|
+
for (var r in n) e(t, r, { get: n[r], enumerable: true });
|
|
96
|
+
})(s, { Level: () => c });
|
|
97
97
|
var c = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(c || {});
|
|
98
|
-
var
|
|
99
|
-
function
|
|
100
|
-
n = { ...
|
|
101
|
-
const
|
|
102
|
-
const i = e2[
|
|
103
|
-
return n.merge && Array.isArray(i) && Array.isArray(
|
|
98
|
+
var J = { merge: true, shallow: true, extend: true };
|
|
99
|
+
function X(e2, t = {}, n = {}) {
|
|
100
|
+
n = { ...J, ...n };
|
|
101
|
+
const r = Object.entries(t).reduce((t2, [r2, o]) => {
|
|
102
|
+
const i = e2[r2];
|
|
103
|
+
return n.merge && Array.isArray(i) && Array.isArray(o) ? t2[r2] = o.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || r2 in e2) && (t2[r2] = o), t2;
|
|
104
104
|
}, {});
|
|
105
|
-
return n.shallow ? { ...e2, ...
|
|
105
|
+
return n.shallow ? { ...e2, ...r } : (Object.assign(e2, r), e2);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function be() {
|
|
108
108
|
let e2 = "";
|
|
109
109
|
for (let t = 0; t < 16; t++) e2 += (16 * Math.random() | 0).toString(16);
|
|
110
110
|
return e2;
|
|
111
111
|
}
|
|
112
112
|
function ve(e2 = {}) {
|
|
113
113
|
var _a;
|
|
114
|
-
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n =
|
|
114
|
+
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = X({ 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" } }], consent: { functional: true }, id: e2.id || be(), trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, source: { type: "collector", schema: "4" } }, e2, { merge: false });
|
|
115
115
|
if (e2.name) {
|
|
116
|
-
const [t2,
|
|
117
|
-
t2 &&
|
|
116
|
+
const [t2, r] = (_a = e2.name.split(" ")) != null ? _a : [];
|
|
117
|
+
t2 && r && (n.entity = t2, n.action = r);
|
|
118
118
|
}
|
|
119
119
|
return n;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
const n = t.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0),
|
|
123
|
-
return ve({ ...{ "cart view": { data: { currency: "EUR", value: 2 *
|
|
121
|
+
function he(e2 = "entity action", t = {}) {
|
|
122
|
+
const n = t.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), r = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, o = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } };
|
|
123
|
+
return ve({ ...{ "cart view": { data: { currency: "EUR", value: 2 * r.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...r.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: r.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...r, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...r, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...r.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: n, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...t, name: e2 });
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// src/examples/step.ts
|
|
@@ -143,19 +143,19 @@ var init2 = {
|
|
|
143
143
|
var defaultEventForwarding = {
|
|
144
144
|
title: "Default track",
|
|
145
145
|
description: "A walker event becomes a Segment analytics.track call with the event name and empty properties.",
|
|
146
|
-
in:
|
|
146
|
+
in: he("product view", { timestamp: 1700000100 }),
|
|
147
147
|
out: [["analytics.track", "product view", {}]]
|
|
148
148
|
};
|
|
149
149
|
var wildcardIgnored = {
|
|
150
150
|
public: false,
|
|
151
|
-
in:
|
|
151
|
+
in: he("debug noise", { timestamp: 1700000101 }),
|
|
152
152
|
mapping: { ignore: true },
|
|
153
153
|
out: []
|
|
154
154
|
};
|
|
155
155
|
var destinationLevelInclude = {
|
|
156
156
|
title: "Include data",
|
|
157
157
|
description: "Destination-level include flattens the event data section into prefixed Segment track properties.",
|
|
158
|
-
in:
|
|
158
|
+
in: he("product view", { timestamp: 1700000102 }),
|
|
159
159
|
configInclude: ["data"],
|
|
160
160
|
out: [
|
|
161
161
|
[
|
|
@@ -174,7 +174,7 @@ var destinationLevelInclude = {
|
|
|
174
174
|
var ruleIncludeReplaces = {
|
|
175
175
|
title: "Rule include overrides",
|
|
176
176
|
description: "A per-rule include replaces the destination-level include so this event forwards only globals.",
|
|
177
|
-
in:
|
|
177
|
+
in: he("order complete", { timestamp: 1700000103 }),
|
|
178
178
|
configInclude: ["data"],
|
|
179
179
|
mapping: {
|
|
180
180
|
include: ["globals"]
|
|
@@ -192,7 +192,7 @@ var ruleIncludeReplaces = {
|
|
|
192
192
|
var destinationLevelIdentify = {
|
|
193
193
|
title: "Destination identify",
|
|
194
194
|
description: "Destination-level identify calls analytics.identify with the resolved userId before firing the default track.",
|
|
195
|
-
in:
|
|
195
|
+
in: he("page view", { timestamp: 1700000104 }),
|
|
196
196
|
settings: {
|
|
197
197
|
identify: {
|
|
198
198
|
map: {
|
|
@@ -208,7 +208,7 @@ var destinationLevelIdentify = {
|
|
|
208
208
|
var userLoginIdentify = {
|
|
209
209
|
title: "User login identify",
|
|
210
210
|
description: "A user login fires Segment analytics.identify with userId and reserved traits such as email, name, and plan.",
|
|
211
|
-
in:
|
|
211
|
+
in: he("user login", {
|
|
212
212
|
timestamp: 1700000105,
|
|
213
213
|
data: {
|
|
214
214
|
user_id: "new-user-123",
|
|
@@ -258,7 +258,7 @@ var userLoginIdentify = {
|
|
|
258
258
|
var profileUpdateTraitsOnly = {
|
|
259
259
|
title: "Profile update",
|
|
260
260
|
description: "A profile update calls Segment analytics.identify with traits and no userId to merge traits into the current profile.",
|
|
261
|
-
in:
|
|
261
|
+
in: he("profile update", {
|
|
262
262
|
timestamp: 1700000106,
|
|
263
263
|
data: {
|
|
264
264
|
name: "Jane Q. Doe",
|
|
@@ -297,7 +297,7 @@ var profileUpdateTraitsOnly = {
|
|
|
297
297
|
var userLogoutReset = {
|
|
298
298
|
title: "User logout reset",
|
|
299
299
|
description: "A user logout calls analytics.reset to clear userId, anonymousId, and traits then generate a new anonymous id.",
|
|
300
|
-
in:
|
|
300
|
+
in: he("user logout", { timestamp: 1700000107 }),
|
|
301
301
|
mapping: {
|
|
302
302
|
silent: true,
|
|
303
303
|
settings: {
|
|
@@ -309,7 +309,7 @@ var userLogoutReset = {
|
|
|
309
309
|
var companyUpdateGroup = {
|
|
310
310
|
title: "Group company",
|
|
311
311
|
description: "A company update fires Segment analytics.group with a groupId and traits for account-level tracking.",
|
|
312
|
-
in:
|
|
312
|
+
in: he("company update", {
|
|
313
313
|
timestamp: 1700000108,
|
|
314
314
|
data: {
|
|
315
315
|
company_id: "comp-456",
|
|
@@ -353,7 +353,7 @@ var companyUpdateGroup = {
|
|
|
353
353
|
var pageViewAsPage = {
|
|
354
354
|
title: "Page view",
|
|
355
355
|
description: "A page view fires Segment analytics.page with category, name, and properties instead of a generic track.",
|
|
356
|
-
in:
|
|
356
|
+
in: he("page view", {
|
|
357
357
|
timestamp: 1700000109,
|
|
358
358
|
data: {
|
|
359
359
|
category: "docs",
|
|
@@ -391,7 +391,7 @@ var pageViewAsPage = {
|
|
|
391
391
|
var pageViewMinimal = {
|
|
392
392
|
title: "Page view minimal",
|
|
393
393
|
description: "A mapping with page: true fires an empty analytics.page call relying on Segments auto-collection.",
|
|
394
|
-
in:
|
|
394
|
+
in: he("page view", { timestamp: 1700000110 }),
|
|
395
395
|
mapping: {
|
|
396
396
|
silent: true,
|
|
397
397
|
settings: {
|
|
@@ -403,7 +403,7 @@ var pageViewMinimal = {
|
|
|
403
403
|
var orderCompletedEcommerce = {
|
|
404
404
|
title: "Order completed",
|
|
405
405
|
description: "A completed order is mapped to the Segment Spec Order Completed event with a nested products array.",
|
|
406
|
-
in:
|
|
406
|
+
in: he("order complete", { timestamp: 1700000111 }),
|
|
407
407
|
mapping: {
|
|
408
408
|
name: "Order Completed",
|
|
409
409
|
data: {
|
|
@@ -468,7 +468,7 @@ var orderCompletedEcommerce = {
|
|
|
468
468
|
var consentContextForwarded = {
|
|
469
469
|
title: "Consent context",
|
|
470
470
|
description: "Walker consent is stamped on every Segment call via context.consent.categoryPreferences for downstream filtering.",
|
|
471
|
-
in:
|
|
471
|
+
in: he("product view", {
|
|
472
472
|
timestamp: 1700000112,
|
|
473
473
|
consent: { analytics: true, marketing: true }
|
|
474
474
|
}),
|
package/dist/examples/index.mjs
CHANGED
|
@@ -69,37 +69,37 @@ __export(step_exports, {
|
|
|
69
69
|
|
|
70
70
|
// ../../../core/dist/index.mjs
|
|
71
71
|
var e = Object.defineProperty;
|
|
72
|
-
var
|
|
72
|
+
var s = {};
|
|
73
73
|
((t, n) => {
|
|
74
|
-
for (var
|
|
75
|
-
})(
|
|
74
|
+
for (var r in n) e(t, r, { get: n[r], enumerable: true });
|
|
75
|
+
})(s, { Level: () => c });
|
|
76
76
|
var c = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(c || {});
|
|
77
|
-
var
|
|
78
|
-
function
|
|
79
|
-
n = { ...
|
|
80
|
-
const
|
|
81
|
-
const i = e2[
|
|
82
|
-
return n.merge && Array.isArray(i) && Array.isArray(
|
|
77
|
+
var J = { merge: true, shallow: true, extend: true };
|
|
78
|
+
function X(e2, t = {}, n = {}) {
|
|
79
|
+
n = { ...J, ...n };
|
|
80
|
+
const r = Object.entries(t).reduce((t2, [r2, o]) => {
|
|
81
|
+
const i = e2[r2];
|
|
82
|
+
return n.merge && Array.isArray(i) && Array.isArray(o) ? t2[r2] = o.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || r2 in e2) && (t2[r2] = o), t2;
|
|
83
83
|
}, {});
|
|
84
|
-
return n.shallow ? { ...e2, ...
|
|
84
|
+
return n.shallow ? { ...e2, ...r } : (Object.assign(e2, r), e2);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function be() {
|
|
87
87
|
let e2 = "";
|
|
88
88
|
for (let t = 0; t < 16; t++) e2 += (16 * Math.random() | 0).toString(16);
|
|
89
89
|
return e2;
|
|
90
90
|
}
|
|
91
91
|
function ve(e2 = {}) {
|
|
92
92
|
var _a;
|
|
93
|
-
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n =
|
|
93
|
+
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = X({ 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" } }], consent: { functional: true }, id: e2.id || be(), trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, source: { type: "collector", schema: "4" } }, e2, { merge: false });
|
|
94
94
|
if (e2.name) {
|
|
95
|
-
const [t2,
|
|
96
|
-
t2 &&
|
|
95
|
+
const [t2, r] = (_a = e2.name.split(" ")) != null ? _a : [];
|
|
96
|
+
t2 && r && (n.entity = t2, n.action = r);
|
|
97
97
|
}
|
|
98
98
|
return n;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
const n = t.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0),
|
|
102
|
-
return ve({ ...{ "cart view": { data: { currency: "EUR", value: 2 *
|
|
100
|
+
function he(e2 = "entity action", t = {}) {
|
|
101
|
+
const n = t.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), r = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, o = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } };
|
|
102
|
+
return ve({ ...{ "cart view": { data: { currency: "EUR", value: 2 * r.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...r.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: r.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...r, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...r, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...r.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: n, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...t, name: e2 });
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/examples/step.ts
|
|
@@ -122,19 +122,19 @@ var init2 = {
|
|
|
122
122
|
var defaultEventForwarding = {
|
|
123
123
|
title: "Default track",
|
|
124
124
|
description: "A walker event becomes a Segment analytics.track call with the event name and empty properties.",
|
|
125
|
-
in:
|
|
125
|
+
in: he("product view", { timestamp: 1700000100 }),
|
|
126
126
|
out: [["analytics.track", "product view", {}]]
|
|
127
127
|
};
|
|
128
128
|
var wildcardIgnored = {
|
|
129
129
|
public: false,
|
|
130
|
-
in:
|
|
130
|
+
in: he("debug noise", { timestamp: 1700000101 }),
|
|
131
131
|
mapping: { ignore: true },
|
|
132
132
|
out: []
|
|
133
133
|
};
|
|
134
134
|
var destinationLevelInclude = {
|
|
135
135
|
title: "Include data",
|
|
136
136
|
description: "Destination-level include flattens the event data section into prefixed Segment track properties.",
|
|
137
|
-
in:
|
|
137
|
+
in: he("product view", { timestamp: 1700000102 }),
|
|
138
138
|
configInclude: ["data"],
|
|
139
139
|
out: [
|
|
140
140
|
[
|
|
@@ -153,7 +153,7 @@ var destinationLevelInclude = {
|
|
|
153
153
|
var ruleIncludeReplaces = {
|
|
154
154
|
title: "Rule include overrides",
|
|
155
155
|
description: "A per-rule include replaces the destination-level include so this event forwards only globals.",
|
|
156
|
-
in:
|
|
156
|
+
in: he("order complete", { timestamp: 1700000103 }),
|
|
157
157
|
configInclude: ["data"],
|
|
158
158
|
mapping: {
|
|
159
159
|
include: ["globals"]
|
|
@@ -171,7 +171,7 @@ var ruleIncludeReplaces = {
|
|
|
171
171
|
var destinationLevelIdentify = {
|
|
172
172
|
title: "Destination identify",
|
|
173
173
|
description: "Destination-level identify calls analytics.identify with the resolved userId before firing the default track.",
|
|
174
|
-
in:
|
|
174
|
+
in: he("page view", { timestamp: 1700000104 }),
|
|
175
175
|
settings: {
|
|
176
176
|
identify: {
|
|
177
177
|
map: {
|
|
@@ -187,7 +187,7 @@ var destinationLevelIdentify = {
|
|
|
187
187
|
var userLoginIdentify = {
|
|
188
188
|
title: "User login identify",
|
|
189
189
|
description: "A user login fires Segment analytics.identify with userId and reserved traits such as email, name, and plan.",
|
|
190
|
-
in:
|
|
190
|
+
in: he("user login", {
|
|
191
191
|
timestamp: 1700000105,
|
|
192
192
|
data: {
|
|
193
193
|
user_id: "new-user-123",
|
|
@@ -237,7 +237,7 @@ var userLoginIdentify = {
|
|
|
237
237
|
var profileUpdateTraitsOnly = {
|
|
238
238
|
title: "Profile update",
|
|
239
239
|
description: "A profile update calls Segment analytics.identify with traits and no userId to merge traits into the current profile.",
|
|
240
|
-
in:
|
|
240
|
+
in: he("profile update", {
|
|
241
241
|
timestamp: 1700000106,
|
|
242
242
|
data: {
|
|
243
243
|
name: "Jane Q. Doe",
|
|
@@ -276,7 +276,7 @@ var profileUpdateTraitsOnly = {
|
|
|
276
276
|
var userLogoutReset = {
|
|
277
277
|
title: "User logout reset",
|
|
278
278
|
description: "A user logout calls analytics.reset to clear userId, anonymousId, and traits then generate a new anonymous id.",
|
|
279
|
-
in:
|
|
279
|
+
in: he("user logout", { timestamp: 1700000107 }),
|
|
280
280
|
mapping: {
|
|
281
281
|
silent: true,
|
|
282
282
|
settings: {
|
|
@@ -288,7 +288,7 @@ var userLogoutReset = {
|
|
|
288
288
|
var companyUpdateGroup = {
|
|
289
289
|
title: "Group company",
|
|
290
290
|
description: "A company update fires Segment analytics.group with a groupId and traits for account-level tracking.",
|
|
291
|
-
in:
|
|
291
|
+
in: he("company update", {
|
|
292
292
|
timestamp: 1700000108,
|
|
293
293
|
data: {
|
|
294
294
|
company_id: "comp-456",
|
|
@@ -332,7 +332,7 @@ var companyUpdateGroup = {
|
|
|
332
332
|
var pageViewAsPage = {
|
|
333
333
|
title: "Page view",
|
|
334
334
|
description: "A page view fires Segment analytics.page with category, name, and properties instead of a generic track.",
|
|
335
|
-
in:
|
|
335
|
+
in: he("page view", {
|
|
336
336
|
timestamp: 1700000109,
|
|
337
337
|
data: {
|
|
338
338
|
category: "docs",
|
|
@@ -370,7 +370,7 @@ var pageViewAsPage = {
|
|
|
370
370
|
var pageViewMinimal = {
|
|
371
371
|
title: "Page view minimal",
|
|
372
372
|
description: "A mapping with page: true fires an empty analytics.page call relying on Segments auto-collection.",
|
|
373
|
-
in:
|
|
373
|
+
in: he("page view", { timestamp: 1700000110 }),
|
|
374
374
|
mapping: {
|
|
375
375
|
silent: true,
|
|
376
376
|
settings: {
|
|
@@ -382,7 +382,7 @@ var pageViewMinimal = {
|
|
|
382
382
|
var orderCompletedEcommerce = {
|
|
383
383
|
title: "Order completed",
|
|
384
384
|
description: "A completed order is mapped to the Segment Spec Order Completed event with a nested products array.",
|
|
385
|
-
in:
|
|
385
|
+
in: he("order complete", { timestamp: 1700000111 }),
|
|
386
386
|
mapping: {
|
|
387
387
|
name: "Order Completed",
|
|
388
388
|
data: {
|
|
@@ -447,7 +447,7 @@ var orderCompletedEcommerce = {
|
|
|
447
447
|
var consentContextForwarded = {
|
|
448
448
|
title: "Consent context",
|
|
449
449
|
description: "Walker consent is stamped on every Segment call via context.consent.categoryPreferences for downstream filtering.",
|
|
450
|
-
in:
|
|
450
|
+
in: he("product view", {
|
|
451
451
|
timestamp: 1700000112,
|
|
452
452
|
consent: { analytics: true, marketing: true }
|
|
453
453
|
}),
|
package/dist/walkerOS.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$meta": {
|
|
3
3
|
"package": "@walkeros/web-destination-segment",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.1-next-1778183328892",
|
|
5
5
|
"type": "destination",
|
|
6
6
|
"platform": [
|
|
7
7
|
"web"
|
|
@@ -98,14 +98,14 @@
|
|
|
98
98
|
"init": {
|
|
99
99
|
"analytics": {
|
|
100
100
|
"load": {
|
|
101
|
-
"$code": "()=>({track:
|
|
101
|
+
"$code": "()=>({track:_h,identify:_h,group:_h,page:_h,alias:_h,reset:_h,setAnonymousId:_h})"
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"push": {
|
|
106
106
|
"analytics": {
|
|
107
107
|
"load": {
|
|
108
|
-
"$code": "()=>({track:
|
|
108
|
+
"$code": "()=>({track:_h,identify:_h,group:_h,page:_h,alias:_h,reset:_h,setAnonymousId:_h})"
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
},
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"consent": {
|
|
162
162
|
"functional": true
|
|
163
163
|
},
|
|
164
|
-
"id": "
|
|
164
|
+
"id": "ab36a6194dfc1f3a",
|
|
165
165
|
"trigger": "test",
|
|
166
166
|
"entity": "company",
|
|
167
167
|
"action": "update",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"analytics": true,
|
|
238
238
|
"marketing": true
|
|
239
239
|
},
|
|
240
|
-
"id": "
|
|
240
|
+
"id": "fc31bb74a626777f",
|
|
241
241
|
"trigger": "load",
|
|
242
242
|
"entity": "product",
|
|
243
243
|
"action": "view",
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
"consent": {
|
|
333
333
|
"functional": true
|
|
334
334
|
},
|
|
335
|
-
"id": "
|
|
335
|
+
"id": "ec06364cefb31c90",
|
|
336
336
|
"trigger": "load",
|
|
337
337
|
"entity": "product",
|
|
338
338
|
"action": "view",
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
"consent": {
|
|
393
393
|
"functional": true
|
|
394
394
|
},
|
|
395
|
-
"id": "
|
|
395
|
+
"id": "eec9679dc21cc531",
|
|
396
396
|
"trigger": "load",
|
|
397
397
|
"entity": "page",
|
|
398
398
|
"action": "view",
|
|
@@ -456,7 +456,7 @@
|
|
|
456
456
|
"consent": {
|
|
457
457
|
"functional": true
|
|
458
458
|
},
|
|
459
|
-
"id": "
|
|
459
|
+
"id": "7758252adebc302d",
|
|
460
460
|
"trigger": "load",
|
|
461
461
|
"entity": "product",
|
|
462
462
|
"action": "view",
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
"consent": {
|
|
585
585
|
"functional": true
|
|
586
586
|
},
|
|
587
|
-
"id": "
|
|
587
|
+
"id": "c3940139ad73cecf",
|
|
588
588
|
"trigger": "load",
|
|
589
589
|
"entity": "order",
|
|
590
590
|
"action": "complete",
|
|
@@ -701,7 +701,7 @@
|
|
|
701
701
|
"consent": {
|
|
702
702
|
"functional": true
|
|
703
703
|
},
|
|
704
|
-
"id": "
|
|
704
|
+
"id": "3edd6f91b1ab7da8",
|
|
705
705
|
"trigger": "load",
|
|
706
706
|
"entity": "page",
|
|
707
707
|
"action": "view",
|
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
"consent": {
|
|
781
781
|
"functional": true
|
|
782
782
|
},
|
|
783
|
-
"id": "
|
|
783
|
+
"id": "f6fd2e27fac507ed",
|
|
784
784
|
"trigger": "load",
|
|
785
785
|
"entity": "page",
|
|
786
786
|
"action": "view",
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
"consent": {
|
|
842
842
|
"functional": true
|
|
843
843
|
},
|
|
844
|
-
"id": "
|
|
844
|
+
"id": "00a8af3a0ac0a38c",
|
|
845
845
|
"trigger": "test",
|
|
846
846
|
"entity": "profile",
|
|
847
847
|
"action": "update",
|
|
@@ -960,7 +960,7 @@
|
|
|
960
960
|
"consent": {
|
|
961
961
|
"functional": true
|
|
962
962
|
},
|
|
963
|
-
"id": "
|
|
963
|
+
"id": "a632b27ca280f5e1",
|
|
964
964
|
"trigger": "load",
|
|
965
965
|
"entity": "order",
|
|
966
966
|
"action": "complete",
|
|
@@ -1030,7 +1030,7 @@
|
|
|
1030
1030
|
"consent": {
|
|
1031
1031
|
"functional": true
|
|
1032
1032
|
},
|
|
1033
|
-
"id": "
|
|
1033
|
+
"id": "175fc1382af32de9",
|
|
1034
1034
|
"trigger": "test",
|
|
1035
1035
|
"entity": "user",
|
|
1036
1036
|
"action": "login",
|
|
@@ -1123,7 +1123,7 @@
|
|
|
1123
1123
|
"consent": {
|
|
1124
1124
|
"functional": true
|
|
1125
1125
|
},
|
|
1126
|
-
"id": "
|
|
1126
|
+
"id": "79675ec4245c4ffb",
|
|
1127
1127
|
"trigger": "test",
|
|
1128
1128
|
"entity": "user",
|
|
1129
1129
|
"action": "logout",
|
|
@@ -1188,7 +1188,7 @@
|
|
|
1188
1188
|
"consent": {
|
|
1189
1189
|
"functional": true
|
|
1190
1190
|
},
|
|
1191
|
-
"id": "
|
|
1191
|
+
"id": "a0a7fac26db8a214",
|
|
1192
1192
|
"trigger": "test",
|
|
1193
1193
|
"entity": "debug",
|
|
1194
1194
|
"action": "noise",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/web-destination-segment",
|
|
3
3
|
"description": "Segment CDP web destination for walkerOS (@segment/analytics-next, full Segment Spec)",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.1-next-1778183328892",
|
|
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
|
"@segment/analytics-next": "^1.82.0",
|
|
41
|
-
"@walkeros/web-core": "4.0.
|
|
41
|
+
"@walkeros/web-core": "4.0.1-next-1778183328892"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@walkeros/collector": "4.0.
|
|
44
|
+
"@walkeros/collector": "4.0.1-next-1778183328892"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
47
47
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|