@walkeros/web-destination-d8a 4.1.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.
@@ -0,0 +1,633 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/web-destination-d8a",
4
+ "version": "4.1.0",
5
+ "type": "destination",
6
+ "platform": [
7
+ "web"
8
+ ],
9
+ "docs": "https://www.walkeros.io/docs/destinations/web/d8a",
10
+ "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/d8a/src"
11
+ },
12
+ "schemas": {
13
+ "mapping": {
14
+ "$schema": "http://json-schema.org/draft-07/schema#",
15
+ "type": "object",
16
+ "properties": {},
17
+ "additionalProperties": false
18
+ },
19
+ "settings": {
20
+ "$schema": "http://json-schema.org/draft-07/schema#",
21
+ "type": "object",
22
+ "properties": {
23
+ "property_id": {
24
+ "type": "string",
25
+ "description": "d8a property ID"
26
+ },
27
+ "server_container_url": {
28
+ "type": "string",
29
+ "format": "uri",
30
+ "description": "d8a collector URL for the property"
31
+ },
32
+ "como": {
33
+ "anyOf": [
34
+ {
35
+ "type": "boolean"
36
+ },
37
+ {
38
+ "type": "object",
39
+ "propertyNames": {
40
+ "type": "string"
41
+ },
42
+ "additionalProperties": {
43
+ "anyOf": [
44
+ {
45
+ "type": "string"
46
+ },
47
+ {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ ],
57
+ "description": "Consent mode configuration: false (disabled), true (use defaults), or custom mapping"
58
+ },
59
+ "data": {
60
+ "description": "Custom data mapping configuration"
61
+ },
62
+ "dataLayerName": {
63
+ "type": "string",
64
+ "description": "Name of the d8a command queue (default: d8aLayer)"
65
+ },
66
+ "globalName": {
67
+ "type": "string",
68
+ "description": "Name of the global d8a function (default: d8a)"
69
+ },
70
+ "send_page_view": {
71
+ "type": "boolean",
72
+ "description": "Enable automatic pageview tracking"
73
+ },
74
+ "snakeCase": {
75
+ "type": "boolean",
76
+ "description": "Convert event names to snake_case (like true)"
77
+ },
78
+ "debug_mode": {
79
+ "type": "boolean",
80
+ "description": "Enable debug mode"
81
+ },
82
+ "cookie_domain": {
83
+ "type": "string",
84
+ "description": "Cookie domain strategy: auto, none, or a specific domain"
85
+ },
86
+ "cookie_path": {
87
+ "type": "string",
88
+ "description": "Cookie path"
89
+ },
90
+ "cookie_expires": {
91
+ "type": "number",
92
+ "description": "Cookie lifetime in seconds"
93
+ },
94
+ "cookie_flags": {
95
+ "type": "string",
96
+ "description": "Raw cookie flags"
97
+ },
98
+ "cookie_prefix": {
99
+ "type": "string",
100
+ "description": "Cookie name prefix"
101
+ },
102
+ "cookie_update": {
103
+ "type": "boolean",
104
+ "description": "Refresh cookie expirations on activity"
105
+ },
106
+ "session_timeout_ms": {
107
+ "type": "number",
108
+ "description": "Session timeout window in milliseconds"
109
+ },
110
+ "session_engagement_time_sec": {
111
+ "type": "number",
112
+ "description": "Minimum engaged time in seconds"
113
+ },
114
+ "flush_interval_ms": {
115
+ "type": "number",
116
+ "description": "Flush interval in milliseconds"
117
+ },
118
+ "max_batch_size": {
119
+ "type": "number",
120
+ "description": "Maximum batch size"
121
+ },
122
+ "user_id": {
123
+ "type": "string",
124
+ "description": "GA4-style user ID"
125
+ },
126
+ "client_id": {
127
+ "type": "string",
128
+ "description": "Client ID override"
129
+ },
130
+ "campaign_id": {
131
+ "type": "string"
132
+ },
133
+ "campaign_source": {
134
+ "type": "string"
135
+ },
136
+ "campaign_medium": {
137
+ "type": "string"
138
+ },
139
+ "campaign_name": {
140
+ "type": "string"
141
+ },
142
+ "campaign_term": {
143
+ "type": "string"
144
+ },
145
+ "campaign_content": {
146
+ "type": "string"
147
+ },
148
+ "page_location": {
149
+ "type": "string"
150
+ },
151
+ "page_title": {
152
+ "type": "string"
153
+ },
154
+ "page_referrer": {
155
+ "type": "string"
156
+ },
157
+ "content_group": {
158
+ "type": "string"
159
+ },
160
+ "language": {
161
+ "type": "string"
162
+ },
163
+ "screen_resolution": {
164
+ "type": "string"
165
+ },
166
+ "ignore_referrer": {
167
+ "type": "boolean"
168
+ },
169
+ "site_search_enabled": {
170
+ "type": "boolean"
171
+ },
172
+ "site_search_query_params": {
173
+ "anyOf": [
174
+ {
175
+ "type": "string"
176
+ },
177
+ {
178
+ "type": "array",
179
+ "items": {
180
+ "type": "string"
181
+ }
182
+ }
183
+ ]
184
+ },
185
+ "outbound_clicks_enabled": {
186
+ "type": "boolean"
187
+ },
188
+ "outbound_exclude_domains": {
189
+ "anyOf": [
190
+ {
191
+ "type": "string"
192
+ },
193
+ {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "string"
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ "file_downloads_enabled": {
202
+ "type": "boolean"
203
+ },
204
+ "file_download_extensions": {
205
+ "anyOf": [
206
+ {
207
+ "type": "string"
208
+ },
209
+ {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "string"
213
+ }
214
+ }
215
+ ]
216
+ }
217
+ },
218
+ "required": [
219
+ "property_id",
220
+ "server_container_url"
221
+ ],
222
+ "additionalProperties": false
223
+ }
224
+ },
225
+ "examples": {
226
+ "env": {
227
+ "init": {
228
+ "installD8a": {
229
+ "$code": "e=>{const a=null==e?void 0:e.windowRef,t=(null==e?void 0:e.globalName)||\"d8a\",i=(null==e?void 0:e.dataLayerName)||\"d8aLayer\";return a&&(a[i]=a[i]||[],a[t]=a[t]||g()),{dataLayerName:i,globalName:t,consumer:{start:()=>{},stop:()=>{},getState:()=>({}),setOnEvent:()=>{},setOnConfig:()=>{}},dispatcher:{enqueueEvent:()=>{},flush:async()=>({sent:0}),flushNow:async()=>({sent:0}),attachLifecycleFlush:()=>{}}}}"
230
+ },
231
+ "window": {}
232
+ },
233
+ "push": {
234
+ "installD8a": {
235
+ "$code": "e=>{const a=null==e?void 0:e.windowRef,t=(null==e?void 0:e.globalName)||\"d8a\",i=(null==e?void 0:e.dataLayerName)||\"d8aLayer\";return a&&(a[i]=a[i]||[],a[t]=a[t]||g()),{dataLayerName:i,globalName:t,consumer:{start:()=>{},stop:()=>{},getState:()=>({}),setOnEvent:()=>{},setOnConfig:()=>{}},dispatcher:{enqueueEvent:()=>{},flush:async()=>({sent:0}),flushNow:async()=>({sent:0}),attachLifecycleFlush:()=>{}}}}"
236
+ },
237
+ "window": {
238
+ "d8a": {
239
+ "$code": "()=>{}"
240
+ },
241
+ "d8aLayer": []
242
+ }
243
+ },
244
+ "simulation": [
245
+ "call:window.d8a"
246
+ ]
247
+ },
248
+ "step": {
249
+ "addToCart": {
250
+ "title": "Add to cart",
251
+ "description": "A product add event is mapped to the d8a add_to_cart event with item details and value.",
252
+ "in": {
253
+ "name": "product add",
254
+ "data": {
255
+ "id": "ers",
256
+ "name": "Everyday Ruck Snack",
257
+ "color": "black",
258
+ "size": "l",
259
+ "price": 420
260
+ },
261
+ "context": {
262
+ "shopping": [
263
+ "intent",
264
+ 0
265
+ ]
266
+ },
267
+ "globals": {
268
+ "pagegroup": "shop"
269
+ },
270
+ "custom": {
271
+ "completely": "random"
272
+ },
273
+ "user": {
274
+ "id": "us3r",
275
+ "device": "c00k13",
276
+ "session": "s3ss10n"
277
+ },
278
+ "nested": [],
279
+ "consent": {
280
+ "functional": true
281
+ },
282
+ "id": "23516757b8604dac",
283
+ "trigger": "click",
284
+ "entity": "product",
285
+ "action": "add",
286
+ "timestamp": 1700000301,
287
+ "timing": 3.14,
288
+ "source": {
289
+ "type": "collector",
290
+ "schema": "4"
291
+ }
292
+ },
293
+ "mapping": {
294
+ "name": "add_to_cart",
295
+ "include": [
296
+ "data"
297
+ ],
298
+ "data": {
299
+ "map": {
300
+ "currency": {
301
+ "value": "EUR",
302
+ "key": "data.currency"
303
+ },
304
+ "value": "data.price",
305
+ "items": {
306
+ "loop": [
307
+ "this",
308
+ {
309
+ "map": {
310
+ "item_id": "data.id",
311
+ "item_variant": "data.color",
312
+ "quantity": {
313
+ "value": 1,
314
+ "key": "data.quantity"
315
+ }
316
+ }
317
+ }
318
+ ]
319
+ }
320
+ }
321
+ }
322
+ },
323
+ "out": [
324
+ [
325
+ "d8a",
326
+ "event",
327
+ "add_to_cart",
328
+ {
329
+ "currency": "EUR",
330
+ "value": 420,
331
+ "items": [
332
+ {
333
+ "item_id": "ers",
334
+ "item_variant": "black",
335
+ "quantity": 1
336
+ }
337
+ ],
338
+ "data_id": "ers",
339
+ "data_name": "Everyday Ruck Snack",
340
+ "data_color": "black",
341
+ "data_size": "l",
342
+ "data_price": 420,
343
+ "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
344
+ }
345
+ ]
346
+ ]
347
+ },
348
+ "consentMode": {
349
+ "title": "Consent mode",
350
+ "description": "A walker consent command updates d8a using gtag consent mode parameters.",
351
+ "command": "consent",
352
+ "in": {
353
+ "marketing": true,
354
+ "functional": true
355
+ },
356
+ "out": [
357
+ [
358
+ "d8a",
359
+ "consent",
360
+ "default",
361
+ {
362
+ "ad_storage": "denied",
363
+ "ad_user_data": "denied",
364
+ "ad_personalization": "denied",
365
+ "analytics_storage": "denied"
366
+ }
367
+ ],
368
+ [
369
+ "d8a",
370
+ "consent",
371
+ "update",
372
+ {
373
+ "ad_storage": "granted",
374
+ "ad_user_data": "granted",
375
+ "ad_personalization": "granted",
376
+ "analytics_storage": "granted"
377
+ }
378
+ ]
379
+ ]
380
+ },
381
+ "init": {
382
+ "title": "Initialization",
383
+ "description": "The destination installs d8a and configures a property with its server container URL.",
384
+ "in": {
385
+ "settings": {
386
+ "property_id": "80e1d6d0-560d-419f-ac2a-fe9281e93386",
387
+ "server_container_url": "https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c"
388
+ }
389
+ },
390
+ "out": [
391
+ [
392
+ "d8a",
393
+ "js",
394
+ {}
395
+ ],
396
+ [
397
+ "d8a",
398
+ "config",
399
+ "80e1d6d0-560d-419f-ac2a-fe9281e93386",
400
+ {
401
+ "server_container_url": "https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c"
402
+ }
403
+ ]
404
+ ]
405
+ },
406
+ "pageView": {
407
+ "title": "Page view",
408
+ "description": "A page view event is forwarded as a d8a page_view event.",
409
+ "in": {
410
+ "name": "page view",
411
+ "data": {
412
+ "domain": "www.example.com",
413
+ "title": "walkerOS documentation",
414
+ "referrer": "https://www.walkeros.io/",
415
+ "search": "?foo=bar",
416
+ "hash": "#hash",
417
+ "id": "/docs/"
418
+ },
419
+ "context": {
420
+ "dev": [
421
+ "test",
422
+ 1
423
+ ]
424
+ },
425
+ "globals": {
426
+ "pagegroup": "docs"
427
+ },
428
+ "custom": {
429
+ "completely": "random"
430
+ },
431
+ "user": {
432
+ "id": "us3r",
433
+ "device": "c00k13",
434
+ "session": "s3ss10n"
435
+ },
436
+ "nested": [
437
+ {
438
+ "entity": "child",
439
+ "data": {
440
+ "is": "subordinated"
441
+ }
442
+ }
443
+ ],
444
+ "consent": {
445
+ "functional": true
446
+ },
447
+ "id": "757ae8d849eca468",
448
+ "trigger": "load",
449
+ "entity": "page",
450
+ "action": "view",
451
+ "timestamp": 1700000300,
452
+ "timing": 3.14,
453
+ "source": {
454
+ "type": "collector",
455
+ "schema": "4"
456
+ }
457
+ },
458
+ "out": [
459
+ [
460
+ "d8a",
461
+ "event",
462
+ "page_view",
463
+ {
464
+ "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
465
+ }
466
+ ]
467
+ ]
468
+ },
469
+ "purchase": {
470
+ "title": "Purchase",
471
+ "description": "An order complete event is mapped to the d8a purchase event with transaction details and nested product items.",
472
+ "in": {
473
+ "name": "order complete",
474
+ "data": {
475
+ "id": "0rd3r1d",
476
+ "currency": "EUR",
477
+ "shipping": 5.22,
478
+ "taxes": 73.76,
479
+ "total": 555
480
+ },
481
+ "context": {
482
+ "shopping": [
483
+ "complete",
484
+ 0
485
+ ]
486
+ },
487
+ "globals": {
488
+ "pagegroup": "shop"
489
+ },
490
+ "custom": {
491
+ "completely": "random"
492
+ },
493
+ "user": {
494
+ "id": "us3r",
495
+ "device": "c00k13",
496
+ "session": "s3ss10n"
497
+ },
498
+ "nested": [
499
+ {
500
+ "entity": "product",
501
+ "data": {
502
+ "id": "ers",
503
+ "name": "Everyday Ruck Snack",
504
+ "color": "black",
505
+ "size": "l",
506
+ "price": 420
507
+ },
508
+ "context": {
509
+ "shopping": [
510
+ "complete",
511
+ 0
512
+ ]
513
+ },
514
+ "nested": []
515
+ },
516
+ {
517
+ "entity": "product",
518
+ "data": {
519
+ "id": "cc",
520
+ "name": "Cool Cap",
521
+ "size": "one size",
522
+ "price": 42
523
+ },
524
+ "context": {
525
+ "shopping": [
526
+ "complete",
527
+ 0
528
+ ]
529
+ },
530
+ "nested": []
531
+ },
532
+ {
533
+ "entity": "gift",
534
+ "data": {
535
+ "name": "Surprise"
536
+ },
537
+ "context": {
538
+ "shopping": [
539
+ "complete",
540
+ 0
541
+ ]
542
+ },
543
+ "nested": []
544
+ }
545
+ ],
546
+ "consent": {
547
+ "functional": true
548
+ },
549
+ "id": "68b32eb145e4fcbd",
550
+ "trigger": "load",
551
+ "entity": "order",
552
+ "action": "complete",
553
+ "timestamp": 1700000302,
554
+ "timing": 3.14,
555
+ "source": {
556
+ "type": "collector",
557
+ "schema": "4"
558
+ }
559
+ },
560
+ "mapping": {
561
+ "name": "purchase",
562
+ "include": [
563
+ "data",
564
+ "context"
565
+ ],
566
+ "data": {
567
+ "map": {
568
+ "transaction_id": "data.id",
569
+ "value": "data.total",
570
+ "tax": "data.taxes",
571
+ "shipping": "data.shipping",
572
+ "currency": {
573
+ "key": "data.currency",
574
+ "value": "EUR"
575
+ },
576
+ "items": {
577
+ "loop": [
578
+ "nested",
579
+ {
580
+ "condition": {
581
+ "$code": "e=>{const a=e;return k(e)&&\"product\"===a.entity}"
582
+ },
583
+ "map": {
584
+ "item_id": "data.id",
585
+ "item_name": "data.name",
586
+ "quantity": {
587
+ "key": "data.quantity",
588
+ "value": 1
589
+ }
590
+ }
591
+ }
592
+ ]
593
+ }
594
+ }
595
+ }
596
+ },
597
+ "out": [
598
+ [
599
+ "d8a",
600
+ "event",
601
+ "purchase",
602
+ {
603
+ "transaction_id": "0rd3r1d",
604
+ "value": 555,
605
+ "tax": 73.76,
606
+ "shipping": 5.22,
607
+ "currency": "EUR",
608
+ "items": [
609
+ {
610
+ "item_id": "ers",
611
+ "item_name": "Everyday Ruck Snack",
612
+ "quantity": 1
613
+ },
614
+ {
615
+ "item_id": "cc",
616
+ "item_name": "Cool Cap",
617
+ "quantity": 1
618
+ }
619
+ ],
620
+ "data_id": "0rd3r1d",
621
+ "data_currency": "EUR",
622
+ "data_shipping": 5.22,
623
+ "data_taxes": 73.76,
624
+ "data_total": 555,
625
+ "context_shopping": "complete",
626
+ "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
627
+ }
628
+ ]
629
+ ]
630
+ }
631
+ }
632
+ }
633
+ }
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@walkeros/web-destination-d8a",
3
+ "description": "d8a web destination for walkerOS",
4
+ "version": "4.1.0",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./examples": {
16
+ "types": "./dist/examples/index.d.ts",
17
+ "import": "./dist/examples/index.mjs",
18
+ "require": "./dist/examples/index.js"
19
+ },
20
+ "./dev": {
21
+ "types": "./dist/dev.d.ts",
22
+ "import": "./dist/dev.mjs",
23
+ "require": "./dist/dev.js"
24
+ },
25
+ "./walkerOS.json": "./dist/walkerOS.json"
26
+ },
27
+ "files": [
28
+ "dist/**"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsup --silent",
32
+ "clean": "rm -rf .turbo && rm -rf dist",
33
+ "dev": "jest --watchAll --colors",
34
+ "typecheck": "tsc --noEmit",
35
+ "lint": "eslint \"**/*.ts*\"",
36
+ "test": "jest",
37
+ "update": "npx npm-check-updates -u && npm update"
38
+ },
39
+ "dependencies": {
40
+ "@d8a-tech/wt": "^1.2.1",
41
+ "@walkeros/core": "4.1.0",
42
+ "@walkeros/web-core": "4.1.0"
43
+ },
44
+ "devDependencies": {
45
+ "@walkeros/collector": "4.1.0"
46
+ },
47
+ "repository": {
48
+ "url": "git+https://github.com/elbwalker/walkerOS.git",
49
+ "directory": "packages/web/destinations/d8a"
50
+ },
51
+ "author": "elbwalker <hello@elbwalker.com>",
52
+ "homepage": "https://github.com/elbwalker/walkerOS#readme",
53
+ "bugs": {
54
+ "url": "https://github.com/elbwalker/walkerOS/issues"
55
+ },
56
+ "walkerOS": {
57
+ "type": "destination",
58
+ "platform": [
59
+ "web"
60
+ ],
61
+ "docs": "https://www.walkeros.io/docs/destinations/web/d8a"
62
+ },
63
+ "keywords": [
64
+ "walkerOS",
65
+ "walkerOS-destination",
66
+ "destination",
67
+ "web",
68
+ "d8a",
69
+ "analytics"
70
+ ],
71
+ "funding": [
72
+ {
73
+ "type": "GitHub Sponsors",
74
+ "url": "https://github.com/sponsors/elbwalker"
75
+ }
76
+ ]
77
+ }