@walkeros/web-destination-snowplow 4.8.1 → 4.8.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/web-destination-snowplow",
4
- "version": "4.8.1",
4
+ "version": "4.8.2",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
@@ -61,9 +61,21 @@
61
61
  "type": "object",
62
62
  "properties": {
63
63
  "collectorUrl": {
64
- "description": "Snowplow collector endpoint URL",
64
+ "type": "string",
65
+ "description": "Snowplow collector endpoint URL"
66
+ },
67
+ "scriptUrl": {
68
+ "description": "URL of the Snowplow JavaScript tracker script, used with loadScript. Defaults to the jsdelivr CDN with the @latest tag; pin a version in production.",
65
69
  "type": "string"
66
70
  },
71
+ "tracker": {
72
+ "description": "Browser-tracker functions for bundled mode (newTracker, trackSelfDescribingEvent and the optional others), set with $code: references",
73
+ "type": "object",
74
+ "propertyNames": {
75
+ "type": "string"
76
+ },
77
+ "additionalProperties": {}
78
+ },
67
79
  "appId": {
68
80
  "description": "Application identifier",
69
81
  "type": "string"
@@ -76,10 +88,6 @@
76
88
  "description": "Platform identifier",
77
89
  "type": "string"
78
90
  },
79
- "pageViewTracking": {
80
- "description": "Enable automatic page view tracking",
81
- "type": "boolean"
82
- },
83
91
  "snowplow": {
84
92
  "description": "Snowplow-specific ecommerce configuration",
85
93
  "type": "object",
@@ -268,8 +276,80 @@
268
276
  "description": "Global context entities",
269
277
  "type": "array",
270
278
  "items": {}
279
+ },
280
+ "trackPageView": {
281
+ "description": "Call trackPageView once right after the tracker starts",
282
+ "type": "boolean"
283
+ },
284
+ "pageViewEvent": {
285
+ "description": "Event name that calls trackPageView instead of a self-describing event (like page view)",
286
+ "type": "string"
287
+ },
288
+ "userId": {
289
+ "description": "walkerOS mapping value resolving to the user id, set once on the first event where it resolves"
290
+ },
291
+ "page": {
292
+ "description": "Page context for setPageType (ecommerce plugin)",
293
+ "type": "object",
294
+ "properties": {
295
+ "type": {
296
+ "description": "Mapping value resolving to the page type"
297
+ },
298
+ "language": {
299
+ "description": "Mapping value resolving to the page language"
300
+ },
301
+ "locale": {
302
+ "description": "Mapping value resolving to the page locale"
303
+ }
304
+ },
305
+ "required": [
306
+ "type"
307
+ ],
308
+ "additionalProperties": false,
309
+ "title": "page"
310
+ },
311
+ "consent": {
312
+ "description": "Consent event tracking through the Enhanced Consent plugin, used by the consent handler",
313
+ "type": "object",
314
+ "properties": {
315
+ "required": {
316
+ "description": "walkerOS consent groups to check",
317
+ "type": "array",
318
+ "items": {
319
+ "type": "string"
320
+ }
321
+ },
322
+ "basisForProcessing": {
323
+ "description": "Legal basis for processing under GDPR (default consent)",
324
+ "type": "string"
325
+ },
326
+ "consentUrl": {
327
+ "description": "URL of the privacy policy or consent document",
328
+ "type": "string"
329
+ },
330
+ "consentVersion": {
331
+ "description": "Version of the consent document",
332
+ "type": "string"
333
+ },
334
+ "domainsApplied": {
335
+ "description": "Domains where this consent applies",
336
+ "type": "array",
337
+ "items": {
338
+ "type": "string"
339
+ }
340
+ },
341
+ "gdprApplies": {
342
+ "description": "Whether GDPR applies to this user",
343
+ "type": "boolean"
344
+ }
345
+ },
346
+ "additionalProperties": false,
347
+ "title": "consent"
271
348
  }
272
349
  },
350
+ "required": [
351
+ "collectorUrl"
352
+ ],
273
353
  "additionalProperties": false
274
354
  }
275
355
  },
@@ -278,12 +358,15 @@
278
358
  "init": {
279
359
  "window": {},
280
360
  "document": {
361
+ "querySelectorAll": {
362
+ "$code": "()=>[...t]"
363
+ },
281
364
  "createElement": {
282
- "$code": "()=>({src:\"\",async:!1,setAttribute:()=>{},removeAttribute:()=>{}})"
365
+ "$code": "()=>{const t=new Map,r={src:\"\",async:!1,getAttribute:e=>{var s;return\"src\"===e?r.src:null!=(s=t.get(e))?s:null},setAttribute:(e,r)=>{t.set(e,r)},addEventListener:(t,s)=>{var n;\"load\"===t&&e.set(r,[...null!=(n=e.get(r))?n:[],s])}};return r}"
283
366
  },
284
367
  "head": {
285
368
  "appendChild": {
286
- "$code": "()=>{}"
369
+ "$code": "r=>{var s;t.push(r),(null!=(s=e.get(r))?s:[]).forEach(t=>t())}"
287
370
  }
288
371
  }
289
372
  }
@@ -295,12 +378,15 @@
295
378
  }
296
379
  },
297
380
  "document": {
381
+ "querySelectorAll": {
382
+ "$code": "()=>[...t]"
383
+ },
298
384
  "createElement": {
299
- "$code": "()=>({src:\"\",async:!1,setAttribute:()=>{},removeAttribute:()=>{}})"
385
+ "$code": "()=>{const t=new Map,r={src:\"\",async:!1,getAttribute:e=>{var s;return\"src\"===e?r.src:null!=(s=t.get(e))?s:null},setAttribute:(e,r)=>{t.set(e,r)},addEventListener:(t,s)=>{var n;\"load\"===t&&e.set(r,[...null!=(n=e.get(r))?n:[],s])}};return r}"
300
386
  },
301
387
  "head": {
302
388
  "appendChild": {
303
- "$code": "()=>{}"
389
+ "$code": "r=>{var s;t.push(r),(null!=(s=e.get(r))?s:[]).forEach(t=>t())}"
304
390
  }
305
391
  }
306
392
  }
@@ -343,7 +429,7 @@
343
429
  "consent": {
344
430
  "functional": true
345
431
  },
346
- "id": "ec5842a0af82aeee",
432
+ "id": "83e860384d50953f",
347
433
  "trigger": "click",
348
434
  "entity": "product",
349
435
  "action": "add",
@@ -517,7 +603,7 @@
517
603
  "consent": {
518
604
  "functional": true
519
605
  },
520
- "id": "baf0776908c23875",
606
+ "id": "edd536aa21d5af2e",
521
607
  "trigger": "load",
522
608
  "entity": "checkout",
523
609
  "action": "view",
@@ -566,6 +652,20 @@
566
652
  ]
567
653
  ]
568
654
  },
655
+ "consentRevoke": {
656
+ "public": false,
657
+ "description": "For a destination with config.consent { marketing: true } and activityTracking, revoking marketing calls disableActivityTracking, so sp.js stops its page pings; a grant enables them again.",
658
+ "command": "consent",
659
+ "in": {
660
+ "marketing": false
661
+ },
662
+ "out": [
663
+ [
664
+ "window.snowplow",
665
+ "disableActivityTracking"
666
+ ]
667
+ ]
668
+ },
569
669
  "contextLoop": {
570
670
  "title": "Transaction with products",
571
671
  "description": "A transaction event adds one Snowplow product context per nested product via a loop mapping.",
@@ -576,7 +676,7 @@
576
676
  "currency": "EUR",
577
677
  "shipping": 5.22,
578
678
  "taxes": 73.76,
579
- "total": 555
679
+ "value": 555
580
680
  },
581
681
  "context": {
582
682
  "shopping": [
@@ -646,7 +746,7 @@
646
746
  "consent": {
647
747
  "functional": true
648
748
  },
649
- "id": "a06716a14986ca21",
749
+ "id": "235d0d7bd7a213f2",
650
750
  "trigger": "load",
651
751
  "entity": "order",
652
752
  "action": "complete",
@@ -667,7 +767,7 @@
667
767
  "schema": "iglu:com.snowplowanalytics.snowplow.ecommerce/transaction/jsonschema/1-0-0",
668
768
  "data": {
669
769
  "transaction_id": "data.id",
670
- "revenue": "data.total",
770
+ "revenue": "data.value",
671
771
  "currency": "data.currency"
672
772
  }
673
773
  },
@@ -799,7 +899,7 @@
799
899
  "consent": {
800
900
  "functional": true
801
901
  },
802
- "id": "26785389749c4329",
902
+ "id": "f0cc5f6fec3d8eeb",
803
903
  "trigger": "load",
804
904
  "entity": "page",
805
905
  "action": "view",
@@ -851,7 +951,7 @@
851
951
  "consent": {
852
952
  "functional": true
853
953
  },
854
- "id": "8b1fffc075ee8107",
954
+ "id": "db22fb16c70f663d",
855
955
  "trigger": "load",
856
956
  "entity": "product",
857
957
  "action": "view",
@@ -948,7 +1048,7 @@
948
1048
  "consent": {
949
1049
  "functional": true
950
1050
  },
951
- "id": "dc65e59ec69eed52",
1051
+ "id": "1264bd65afd24f10",
952
1052
  "trigger": "visible",
953
1053
  "entity": "promotion",
954
1054
  "action": "visible",
@@ -1002,6 +1102,58 @@
1002
1102
  ]
1003
1103
  ]
1004
1104
  },
1105
+ "silentRule": {
1106
+ "public": false,
1107
+ "description": "A rule with silent: true sends no Snowplow event.",
1108
+ "in": {
1109
+ "name": "product view",
1110
+ "data": {
1111
+ "id": "ers",
1112
+ "name": "Everyday Ruck Snack",
1113
+ "color": "black",
1114
+ "size": "l",
1115
+ "price": 420
1116
+ },
1117
+ "context": {
1118
+ "shopping": [
1119
+ "detail",
1120
+ 0
1121
+ ]
1122
+ },
1123
+ "globals": {
1124
+ "pagegroup": "shop"
1125
+ },
1126
+ "custom": {
1127
+ "completely": "random"
1128
+ },
1129
+ "user": {
1130
+ "id": "us3r",
1131
+ "device": "c00k13",
1132
+ "session": "s3ss10n"
1133
+ },
1134
+ "nested": [],
1135
+ "consent": {
1136
+ "functional": true
1137
+ },
1138
+ "id": "db22fb16c70f663d",
1139
+ "trigger": "load",
1140
+ "entity": "product",
1141
+ "action": "view",
1142
+ "timestamp": 1700000405,
1143
+ "timing": 3.14,
1144
+ "source": {
1145
+ "count": 1,
1146
+ "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
1147
+ "type": "collector",
1148
+ "schema": "4"
1149
+ }
1150
+ },
1151
+ "mapping": {
1152
+ "name": "product_view",
1153
+ "silent": true
1154
+ },
1155
+ "out": []
1156
+ },
1005
1157
  "structuredEvent": {
1006
1158
  "title": "Struct event",
1007
1159
  "description": "A custom event is tracked via Snowplow trackStructEvent with category, action, label, property, and value.",
@@ -1037,7 +1189,7 @@
1037
1189
  "consent": {
1038
1190
  "functional": true
1039
1191
  },
1040
- "id": "4b6b28a422508c5f",
1192
+ "id": "f68f1601a5c2b586",
1041
1193
  "trigger": "load",
1042
1194
  "entity": "product",
1043
1195
  "action": "visible",
@@ -1088,7 +1240,7 @@
1088
1240
  "currency": "EUR",
1089
1241
  "shipping": 5.22,
1090
1242
  "taxes": 73.76,
1091
- "total": 555
1243
+ "value": 555
1092
1244
  },
1093
1245
  "context": {
1094
1246
  "shopping": [
@@ -1158,7 +1310,7 @@
1158
1310
  "consent": {
1159
1311
  "functional": true
1160
1312
  },
1161
- "id": "fe6a3be6f9972078",
1313
+ "id": "235d0d7bd7a213f2",
1162
1314
  "trigger": "load",
1163
1315
  "entity": "order",
1164
1316
  "action": "complete",
@@ -1179,7 +1331,7 @@
1179
1331
  "schema": "iglu:com.snowplowanalytics.snowplow.ecommerce/transaction/jsonschema/1-0-0",
1180
1332
  "data": {
1181
1333
  "transaction_id": "data.id",
1182
- "revenue": "data.total",
1334
+ "revenue": "data.value",
1183
1335
  "currency": {
1184
1336
  "key": "data.currency",
1185
1337
  "value": "USD"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-snowplow",
3
3
  "description": "Snowplow web destination for walkerOS",
4
- "version": "4.8.1",
4
+ "version": "4.8.2",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -38,12 +38,12 @@
38
38
  "update": "npx npm-check-updates -u && npm update"
39
39
  },
40
40
  "dependencies": {
41
- "@walkeros/core": "4.8.1",
42
- "@walkeros/web-core": "4.8.1"
41
+ "@walkeros/core": "4.8.2",
42
+ "@walkeros/web-core": "4.8.2"
43
43
  },
44
44
  "devDependencies": {
45
- "@walkeros/collector": "4.8.1",
46
- "@walkeros/config": "4.8.1",
45
+ "@walkeros/collector": "4.8.2",
46
+ "@walkeros/config": "4.8.2",
47
47
  "@snowplow/browser-tracker-core": "^4.6.8",
48
48
  "@snowplow/browser-plugin-snowplow-ecommerce": "^4.6.8"
49
49
  },