@walkeros/web-destination-optimizely 3.4.0-next-1776749829492

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,641 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/web-destination-optimizely",
4
+ "version": "3.4.0-next-1776749829492",
5
+ "type": "destination",
6
+ "platform": [
7
+ "web"
8
+ ],
9
+ "docs": "https://www.walkeros.io/docs/destinations/web/optimizely",
10
+ "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/optimizely/src"
11
+ },
12
+ "schemas": {
13
+ "mapping": {
14
+ "$schema": "http://json-schema.org/draft-07/schema#",
15
+ "type": "object",
16
+ "properties": {
17
+ "eventKey": {
18
+ "type": "string",
19
+ "description": "Override event key sent to Optimizely. If omitted, the walkerOS event name is used. Must match an event created in your Optimizely project."
20
+ },
21
+ "revenue": {
22
+ "description": "Revenue mapping. Resolves to an integer in cents (e.g. 7281 = $72.81). Passed as eventTags.revenue to trackEvent()."
23
+ },
24
+ "value": {
25
+ "description": "Numeric value mapping. Resolves to a float. Passed as eventTags.value to trackEvent()."
26
+ },
27
+ "eventTags": {
28
+ "description": "Additional event tags. Resolves to Record<string, unknown>. Spread into the eventTags object passed to trackEvent()."
29
+ },
30
+ "attributes": {
31
+ "description": "Per-event user attributes override. Resolves to Record<string, unknown>. Applied via setAttribute() before this event's trackEvent() call."
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "settings": {
37
+ "$schema": "http://json-schema.org/draft-07/schema#",
38
+ "type": "object",
39
+ "properties": {
40
+ "sdkKey": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "description": "Your Optimizely Feature Experimentation SDK key. Find it in your Optimizely project under Settings > Environments."
44
+ },
45
+ "userId": {
46
+ "description": "walkerOS mapping value to resolve userId for experiment bucketing. Example: \"user.id\" or { key: \"user.id\", value: \"user.device\" } for fallback."
47
+ },
48
+ "attributes": {
49
+ "description": "User attributes for audience targeting. Resolves to Record<string, unknown>. Applied to every event via createUserContext()."
50
+ },
51
+ "updateInterval": {
52
+ "type": "integer",
53
+ "exclusiveMinimum": 0,
54
+ "maximum": 9007199254740991,
55
+ "description": "Polling interval for datafile updates in milliseconds. Default: 60000."
56
+ },
57
+ "autoUpdate": {
58
+ "type": "boolean",
59
+ "description": "Auto-update datafile via polling. Default: true."
60
+ },
61
+ "batchSize": {
62
+ "type": "integer",
63
+ "exclusiveMinimum": 0,
64
+ "maximum": 9007199254740991,
65
+ "description": "Batch event processor: number of events per batch. Default: 10."
66
+ },
67
+ "flushInterval": {
68
+ "type": "integer",
69
+ "exclusiveMinimum": 0,
70
+ "maximum": 9007199254740991,
71
+ "description": "Batch event processor: flush interval in milliseconds. Default: 1000."
72
+ },
73
+ "skipOdp": {
74
+ "type": "boolean",
75
+ "description": "Skip Optimizely Data Platform (ODP) manager initialization. Default: true. Set to false only if you use ODP."
76
+ }
77
+ },
78
+ "required": [
79
+ "sdkKey"
80
+ ],
81
+ "additionalProperties": false
82
+ }
83
+ },
84
+ "examples": {
85
+ "env": {
86
+ "init": {
87
+ "optimizely": {
88
+ "createInstance": {
89
+ "$code": "()=>Ih()"
90
+ },
91
+ "createPollingProjectConfigManager": {
92
+ "$code": "()=>({})"
93
+ },
94
+ "createBatchEventProcessor": {
95
+ "$code": "()=>({})"
96
+ }
97
+ }
98
+ },
99
+ "push": {
100
+ "optimizely": {
101
+ "createInstance": {
102
+ "$code": "()=>Ih()"
103
+ },
104
+ "createPollingProjectConfigManager": {
105
+ "$code": "()=>({})"
106
+ },
107
+ "createBatchEventProcessor": {
108
+ "$code": "()=>({})"
109
+ }
110
+ }
111
+ },
112
+ "simulation": [
113
+ "call:optimizely.createInstance",
114
+ "call:optimizely.client.onReady",
115
+ "call:optimizely.client.createUserContext",
116
+ "call:optimizely.userContext.trackEvent",
117
+ "call:optimizely.userContext.setAttribute",
118
+ "call:optimizely.client.close"
119
+ ]
120
+ },
121
+ "step": {
122
+ "attributesOnlySkipTrack": {
123
+ "in": {
124
+ "name": "profile update",
125
+ "data": {
126
+ "plan": "premium",
127
+ "country": "DE"
128
+ },
129
+ "context": {
130
+ "dev": [
131
+ "test",
132
+ 1
133
+ ]
134
+ },
135
+ "globals": {
136
+ "lang": "elb"
137
+ },
138
+ "custom": {
139
+ "completely": "random"
140
+ },
141
+ "user": {
142
+ "id": "us3r",
143
+ "device": "c00k13",
144
+ "session": "s3ss10n"
145
+ },
146
+ "nested": [
147
+ {
148
+ "entity": "child",
149
+ "data": {
150
+ "is": "subordinated"
151
+ },
152
+ "nested": [],
153
+ "context": {
154
+ "element": [
155
+ "child",
156
+ 0
157
+ ]
158
+ }
159
+ }
160
+ ],
161
+ "consent": {
162
+ "functional": true
163
+ },
164
+ "id": "1700000105-gr0up-1",
165
+ "trigger": "test",
166
+ "entity": "profile",
167
+ "action": "update",
168
+ "timestamp": 1700000105,
169
+ "timing": 3.14,
170
+ "group": "gr0up",
171
+ "count": 1,
172
+ "version": {
173
+ "source": "3.4.0-next-1776749829492",
174
+ "tagging": 1
175
+ },
176
+ "source": {
177
+ "type": "web",
178
+ "id": "https://localhost:80",
179
+ "previous_id": "http://remotehost:9001"
180
+ }
181
+ },
182
+ "mapping": {
183
+ "skip": true,
184
+ "settings": {
185
+ "attributes": {
186
+ "map": {
187
+ "plan": "data.plan",
188
+ "country": "data.country"
189
+ }
190
+ }
191
+ }
192
+ },
193
+ "out": [
194
+ [
195
+ "optimizely.setAttribute",
196
+ "plan",
197
+ "premium"
198
+ ],
199
+ [
200
+ "optimizely.setAttribute",
201
+ "country",
202
+ "DE"
203
+ ]
204
+ ]
205
+ },
206
+ "consentGranted": {
207
+ "command": "consent",
208
+ "in": {
209
+ "analytics": true
210
+ },
211
+ "settings": {},
212
+ "out": []
213
+ },
214
+ "consentRevoked": {
215
+ "command": "consent",
216
+ "in": {
217
+ "analytics": false
218
+ },
219
+ "settings": {},
220
+ "out": [
221
+ [
222
+ "optimizely.close"
223
+ ]
224
+ ]
225
+ },
226
+ "defaultEventForwarding": {
227
+ "in": {
228
+ "name": "page view",
229
+ "data": {
230
+ "domain": "www.example.com",
231
+ "title": "walkerOS documentation",
232
+ "referrer": "https://www.walkeros.io/",
233
+ "search": "?foo=bar",
234
+ "hash": "#hash",
235
+ "id": "/docs/"
236
+ },
237
+ "context": {
238
+ "dev": [
239
+ "test",
240
+ 1
241
+ ]
242
+ },
243
+ "globals": {
244
+ "pagegroup": "docs"
245
+ },
246
+ "custom": {
247
+ "completely": "random"
248
+ },
249
+ "user": {
250
+ "id": "us3r",
251
+ "device": "c00k13",
252
+ "session": "s3ss10n"
253
+ },
254
+ "nested": [
255
+ {
256
+ "entity": "child",
257
+ "data": {
258
+ "is": "subordinated"
259
+ },
260
+ "nested": [],
261
+ "context": {
262
+ "element": [
263
+ "child",
264
+ 0
265
+ ]
266
+ }
267
+ }
268
+ ],
269
+ "consent": {
270
+ "functional": true
271
+ },
272
+ "id": "1700000100-gr0up-1",
273
+ "trigger": "load",
274
+ "entity": "page",
275
+ "action": "view",
276
+ "timestamp": 1700000100,
277
+ "timing": 3.14,
278
+ "group": "gr0up",
279
+ "count": 1,
280
+ "version": {
281
+ "source": "3.4.0-next-1776749829492",
282
+ "tagging": 1
283
+ },
284
+ "source": {
285
+ "type": "web",
286
+ "id": "https://localhost:80",
287
+ "previous_id": "http://remotehost:9001"
288
+ }
289
+ },
290
+ "out": [
291
+ [
292
+ "optimizely.trackEvent",
293
+ "page view",
294
+ {}
295
+ ]
296
+ ]
297
+ },
298
+ "mappedEventName": {
299
+ "in": {
300
+ "name": "product view",
301
+ "data": {
302
+ "id": "ers",
303
+ "name": "Everyday Ruck Snack",
304
+ "color": "black",
305
+ "size": "l",
306
+ "price": 420
307
+ },
308
+ "context": {
309
+ "shopping": [
310
+ "detail",
311
+ 0
312
+ ]
313
+ },
314
+ "globals": {
315
+ "pagegroup": "shop"
316
+ },
317
+ "custom": {
318
+ "completely": "random"
319
+ },
320
+ "user": {
321
+ "id": "us3r",
322
+ "device": "c00k13",
323
+ "session": "s3ss10n"
324
+ },
325
+ "nested": [],
326
+ "consent": {
327
+ "functional": true
328
+ },
329
+ "id": "1700000101-gr0up-1",
330
+ "trigger": "load",
331
+ "entity": "product",
332
+ "action": "view",
333
+ "timestamp": 1700000101,
334
+ "timing": 3.14,
335
+ "group": "gr0up",
336
+ "count": 1,
337
+ "version": {
338
+ "source": "3.4.0-next-1776749829492",
339
+ "tagging": 1
340
+ },
341
+ "source": {
342
+ "type": "web",
343
+ "id": "https://localhost:80",
344
+ "previous_id": "http://remotehost:9001"
345
+ }
346
+ },
347
+ "mapping": {
348
+ "name": "product_viewed"
349
+ },
350
+ "out": [
351
+ [
352
+ "optimizely.trackEvent",
353
+ "product_viewed",
354
+ {}
355
+ ]
356
+ ]
357
+ },
358
+ "orderCompleteRevenue": {
359
+ "in": {
360
+ "name": "order complete",
361
+ "data": {
362
+ "revenue_cents": 55500,
363
+ "total": 555,
364
+ "currency": "EUR",
365
+ "item_count": 3
366
+ },
367
+ "context": {
368
+ "shopping": [
369
+ "complete",
370
+ 0
371
+ ]
372
+ },
373
+ "globals": {
374
+ "pagegroup": "shop"
375
+ },
376
+ "custom": {
377
+ "completely": "random"
378
+ },
379
+ "user": {
380
+ "id": "us3r",
381
+ "device": "c00k13",
382
+ "session": "s3ss10n"
383
+ },
384
+ "nested": [
385
+ {
386
+ "entity": "product",
387
+ "data": {
388
+ "id": "ers",
389
+ "name": "Everyday Ruck Snack",
390
+ "color": "black",
391
+ "size": "l",
392
+ "price": 420
393
+ },
394
+ "context": {
395
+ "shopping": [
396
+ "complete",
397
+ 0
398
+ ]
399
+ },
400
+ "nested": []
401
+ },
402
+ {
403
+ "entity": "product",
404
+ "data": {
405
+ "id": "cc",
406
+ "name": "Cool Cap",
407
+ "size": "one size",
408
+ "price": 42
409
+ },
410
+ "context": {
411
+ "shopping": [
412
+ "complete",
413
+ 0
414
+ ]
415
+ },
416
+ "nested": []
417
+ },
418
+ {
419
+ "entity": "gift",
420
+ "data": {
421
+ "name": "Surprise"
422
+ },
423
+ "context": {
424
+ "shopping": [
425
+ "complete",
426
+ 0
427
+ ]
428
+ },
429
+ "nested": []
430
+ }
431
+ ],
432
+ "consent": {
433
+ "functional": true
434
+ },
435
+ "id": "1700000102-gr0up-1",
436
+ "trigger": "load",
437
+ "entity": "order",
438
+ "action": "complete",
439
+ "timestamp": 1700000102,
440
+ "timing": 3.14,
441
+ "group": "gr0up",
442
+ "count": 1,
443
+ "version": {
444
+ "source": "3.4.0-next-1776749829492",
445
+ "tagging": 1
446
+ },
447
+ "source": {
448
+ "type": "web",
449
+ "id": "https://localhost:80",
450
+ "previous_id": "http://remotehost:9001"
451
+ }
452
+ },
453
+ "mapping": {
454
+ "name": "purchase",
455
+ "settings": {
456
+ "revenue": "data.revenue_cents",
457
+ "value": "data.total",
458
+ "eventTags": {
459
+ "map": {
460
+ "currency": "data.currency",
461
+ "item_count": "data.item_count"
462
+ }
463
+ }
464
+ }
465
+ },
466
+ "out": [
467
+ [
468
+ "optimizely.trackEvent",
469
+ "purchase",
470
+ {
471
+ "revenue": 55500,
472
+ "value": 555,
473
+ "currency": "EUR",
474
+ "item_count": 3
475
+ }
476
+ ]
477
+ ]
478
+ },
479
+ "signupWithAttributes": {
480
+ "in": {
481
+ "name": "user signup",
482
+ "data": {
483
+ "method": "google",
484
+ "source": "referral"
485
+ },
486
+ "context": {
487
+ "dev": [
488
+ "test",
489
+ 1
490
+ ]
491
+ },
492
+ "globals": {
493
+ "lang": "elb"
494
+ },
495
+ "custom": {
496
+ "completely": "random"
497
+ },
498
+ "user": {
499
+ "id": "us3r",
500
+ "device": "c00k13",
501
+ "session": "s3ss10n"
502
+ },
503
+ "nested": [
504
+ {
505
+ "entity": "child",
506
+ "data": {
507
+ "is": "subordinated"
508
+ },
509
+ "nested": [],
510
+ "context": {
511
+ "element": [
512
+ "child",
513
+ 0
514
+ ]
515
+ }
516
+ }
517
+ ],
518
+ "consent": {
519
+ "functional": true
520
+ },
521
+ "id": "1700000103-gr0up-1",
522
+ "trigger": "test",
523
+ "entity": "user",
524
+ "action": "signup",
525
+ "timestamp": 1700000103,
526
+ "timing": 3.14,
527
+ "group": "gr0up",
528
+ "count": 1,
529
+ "version": {
530
+ "source": "3.4.0-next-1776749829492",
531
+ "tagging": 1
532
+ },
533
+ "source": {
534
+ "type": "web",
535
+ "id": "https://localhost:80",
536
+ "previous_id": "http://remotehost:9001"
537
+ }
538
+ },
539
+ "mapping": {
540
+ "name": "signup",
541
+ "settings": {
542
+ "attributes": {
543
+ "map": {
544
+ "signup_method": "data.method",
545
+ "referral_source": "data.source"
546
+ }
547
+ }
548
+ }
549
+ },
550
+ "out": [
551
+ [
552
+ "optimizely.setAttribute",
553
+ "signup_method",
554
+ "google"
555
+ ],
556
+ [
557
+ "optimizely.setAttribute",
558
+ "referral_source",
559
+ "referral"
560
+ ],
561
+ [
562
+ "optimizely.trackEvent",
563
+ "signup",
564
+ {}
565
+ ]
566
+ ]
567
+ },
568
+ "wildcardIgnored": {
569
+ "in": {
570
+ "name": "debug noise",
571
+ "data": {
572
+ "string": "foo",
573
+ "number": 1,
574
+ "boolean": true,
575
+ "array": [
576
+ 0,
577
+ "text",
578
+ false
579
+ ]
580
+ },
581
+ "context": {
582
+ "dev": [
583
+ "test",
584
+ 1
585
+ ]
586
+ },
587
+ "globals": {
588
+ "lang": "elb"
589
+ },
590
+ "custom": {
591
+ "completely": "random"
592
+ },
593
+ "user": {
594
+ "id": "us3r",
595
+ "device": "c00k13",
596
+ "session": "s3ss10n"
597
+ },
598
+ "nested": [
599
+ {
600
+ "entity": "child",
601
+ "data": {
602
+ "is": "subordinated"
603
+ },
604
+ "nested": [],
605
+ "context": {
606
+ "element": [
607
+ "child",
608
+ 0
609
+ ]
610
+ }
611
+ }
612
+ ],
613
+ "consent": {
614
+ "functional": true
615
+ },
616
+ "id": "1700000104-gr0up-1",
617
+ "trigger": "test",
618
+ "entity": "debug",
619
+ "action": "noise",
620
+ "timestamp": 1700000104,
621
+ "timing": 3.14,
622
+ "group": "gr0up",
623
+ "count": 1,
624
+ "version": {
625
+ "source": "3.4.0-next-1776749829492",
626
+ "tagging": 1
627
+ },
628
+ "source": {
629
+ "type": "web",
630
+ "id": "https://localhost:80",
631
+ "previous_id": "http://remotehost:9001"
632
+ }
633
+ },
634
+ "mapping": {
635
+ "ignore": true
636
+ },
637
+ "out": []
638
+ }
639
+ }
640
+ }
641
+ }