@walkeros/server-destination-amplitude 3.3.0-next-1776098542393

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,1060 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-destination-amplitude",
4
+ "version": "3.2.0",
5
+ "type": "destination",
6
+ "platform": [
7
+ "server"
8
+ ],
9
+ "docs": "https://www.walkeros.io/docs/destinations/server/amplitude",
10
+ "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/amplitude/src"
11
+ },
12
+ "schemas": {
13
+ "mapping": {
14
+ "$schema": "http://json-schema.org/draft-07/schema#",
15
+ "type": "object",
16
+ "properties": {
17
+ "identify": {
18
+ "description": "Per-event identity mapping. Resolves to an object with any of: user_id, device_id, session_id, set, setOnce, add, append, prepend, preInsert, postInsert, remove, unset, clearAll."
19
+ },
20
+ "revenue": {
21
+ "description": "Revenue mapping. Resolves to a single object or (via loop) an array, each with: productId, price, quantity, revenueType, currency, revenue, receipt, receiptSig, eventProperties. One amplitude.revenue() call fires per item."
22
+ },
23
+ "group": {
24
+ "description": "Group assignment. Resolves to { type, name } -> amplitude.setGroup(type, name, eventOptions)."
25
+ },
26
+ "groupIdentify": {
27
+ "description": "Group properties. Resolves to { type, name, set?, setOnce?, ... } -> amplitude.groupIdentify(type, name, identify, eventOptions)."
28
+ },
29
+ "eventOptions": {
30
+ "description": "Per-rule EventOptions override. Resolves to { time?, insert_id?, ip?, ... }. Overrides destination-level eventOptions for this rule."
31
+ },
32
+ "include": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ },
37
+ "description": "Per-rule include override. Replaces destination-level include for this rule."
38
+ }
39
+ },
40
+ "additionalProperties": false
41
+ },
42
+ "settings": {
43
+ "$schema": "http://json-schema.org/draft-07/schema#",
44
+ "type": "object",
45
+ "properties": {
46
+ "apiKey": {
47
+ "type": "string",
48
+ "minLength": 1,
49
+ "description": "Your Amplitude project API key. Find it in your Amplitude project settings under \"General\" -> \"API Keys\"."
50
+ },
51
+ "serverZone": {
52
+ "type": "string",
53
+ "enum": [
54
+ "US",
55
+ "EU"
56
+ ],
57
+ "description": "Amplitude data residency zone. Use EU for European data residency. Default: US."
58
+ },
59
+ "flushIntervalMillis": {
60
+ "type": "integer",
61
+ "exclusiveMinimum": 0,
62
+ "maximum": 9007199254740991,
63
+ "description": "How often (in ms) to flush the event queue. Default: 10000."
64
+ },
65
+ "flushQueueSize": {
66
+ "type": "integer",
67
+ "exclusiveMinimum": 0,
68
+ "maximum": 9007199254740991,
69
+ "description": "Max queued events before a flush. Default: 200."
70
+ },
71
+ "flushMaxRetries": {
72
+ "type": "integer",
73
+ "minimum": 0,
74
+ "maximum": 9007199254740991,
75
+ "description": "Max retries on failed flush. Default: 12."
76
+ },
77
+ "useBatch": {
78
+ "type": "boolean",
79
+ "description": "Use the Amplitude batch endpoint for higher rate limits. Recommended for high-volume server flows. Default: false."
80
+ },
81
+ "minIdLength": {
82
+ "type": "integer",
83
+ "exclusiveMinimum": 0,
84
+ "maximum": 9007199254740991,
85
+ "description": "Minimum length for user_id and device_id fields."
86
+ },
87
+ "serverUrl": {
88
+ "type": "string",
89
+ "format": "uri",
90
+ "description": "Custom server URL for proxies or self-hosted endpoints."
91
+ },
92
+ "optOut": {
93
+ "type": "boolean",
94
+ "description": "Initial opt-out state. When true, no events are sent. Default: false."
95
+ },
96
+ "enableRequestBodyCompression": {
97
+ "type": "boolean",
98
+ "description": "Enable gzip compression for request payloads. Default: false."
99
+ },
100
+ "identify": {
101
+ "description": "walkerOS mapping value resolving to per-event identity. Keys: user_id, device_id, session_id, set, setOnce, add, append, prepend, preInsert, postInsert, remove, unset, clearAll."
102
+ },
103
+ "eventOptions": {
104
+ "description": "walkerOS mapping value resolving to per-event EventOptions. Keys: time, insert_id, ip, city, country, region, language, platform, os_name, os_version, device_brand, device_model, app_version, user_agent."
105
+ },
106
+ "include": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "string"
110
+ },
111
+ "description": "walkerOS event sections to include as event_properties (like ['data', 'globals'])."
112
+ }
113
+ },
114
+ "required": [
115
+ "apiKey"
116
+ ],
117
+ "additionalProperties": false
118
+ }
119
+ },
120
+ "examples": {
121
+ "env": {
122
+ "init": {
123
+ "amplitude": {
124
+ "init": {
125
+ "$code": "()=>({promise:Promise.resolve()})"
126
+ },
127
+ "track": {
128
+ "$code": "()=>{}"
129
+ },
130
+ "identify": {
131
+ "$code": "()=>{}"
132
+ },
133
+ "revenue": {
134
+ "$code": "()=>{}"
135
+ },
136
+ "setOptOut": {
137
+ "$code": "()=>{}"
138
+ },
139
+ "setGroup": {
140
+ "$code": "()=>{}"
141
+ },
142
+ "groupIdentify": {
143
+ "$code": "()=>{}"
144
+ },
145
+ "flush": {
146
+ "$code": "()=>({promise:Promise.resolve()})"
147
+ },
148
+ "Identify": {
149
+ "$code": "class{set(){return this}setOnce(){return this}add(){return this}append(){return this}prepend(){return this}preInsert(){return this}postInsert(){return this}remove(){return this}unset(){return this}clearAll(){return this}}"
150
+ },
151
+ "Revenue": {
152
+ "$code": "class{setProductId(){return this}setPrice(){return this}setQuantity(){return this}setRevenueType(){return this}setCurrency(){return this}setRevenue(){return this}setReceipt(){return this}setReceiptSig(){return this}setEventProperties(){return this}}"
153
+ }
154
+ }
155
+ },
156
+ "push": {
157
+ "amplitude": {
158
+ "init": {
159
+ "$code": "()=>({promise:Promise.resolve()})"
160
+ },
161
+ "track": {
162
+ "$code": "()=>{}"
163
+ },
164
+ "identify": {
165
+ "$code": "()=>{}"
166
+ },
167
+ "revenue": {
168
+ "$code": "()=>{}"
169
+ },
170
+ "setOptOut": {
171
+ "$code": "()=>{}"
172
+ },
173
+ "setGroup": {
174
+ "$code": "()=>{}"
175
+ },
176
+ "groupIdentify": {
177
+ "$code": "()=>{}"
178
+ },
179
+ "flush": {
180
+ "$code": "()=>({promise:Promise.resolve()})"
181
+ },
182
+ "Identify": {
183
+ "$code": "class{set(){return this}setOnce(){return this}add(){return this}append(){return this}prepend(){return this}preInsert(){return this}postInsert(){return this}remove(){return this}unset(){return this}clearAll(){return this}}"
184
+ },
185
+ "Revenue": {
186
+ "$code": "class{setProductId(){return this}setPrice(){return this}setQuantity(){return this}setRevenueType(){return this}setCurrency(){return this}setRevenue(){return this}setReceipt(){return this}setReceiptSig(){return this}setEventProperties(){return this}}"
187
+ }
188
+ }
189
+ },
190
+ "simulation": [
191
+ "call:amplitude.init",
192
+ "call:amplitude.track",
193
+ "call:amplitude.identify",
194
+ "call:amplitude.revenue",
195
+ "call:amplitude.setOptOut",
196
+ "call:amplitude.setGroup",
197
+ "call:amplitude.groupIdentify"
198
+ ]
199
+ },
200
+ "step": {
201
+ "consentGrantOptIn": {
202
+ "command": "consent",
203
+ "in": {
204
+ "analytics": true
205
+ },
206
+ "settings": {},
207
+ "out": [
208
+ "amplitude.setOptOut",
209
+ false
210
+ ]
211
+ },
212
+ "consentRevokeOptOut": {
213
+ "command": "consent",
214
+ "in": {
215
+ "analytics": false
216
+ },
217
+ "settings": {},
218
+ "out": [
219
+ "amplitude.setOptOut",
220
+ true
221
+ ]
222
+ },
223
+ "defaultEventForwarding": {
224
+ "in": {
225
+ "name": "product view",
226
+ "data": {
227
+ "id": "ers",
228
+ "name": "Everyday Ruck Snack",
229
+ "color": "black",
230
+ "size": "l",
231
+ "price": 420
232
+ },
233
+ "context": {
234
+ "shopping": [
235
+ "detail",
236
+ 0
237
+ ]
238
+ },
239
+ "globals": {
240
+ "pagegroup": "shop"
241
+ },
242
+ "custom": {
243
+ "completely": "random"
244
+ },
245
+ "user": {
246
+ "id": "us3r",
247
+ "device": "c00k13",
248
+ "session": "s3ss10n"
249
+ },
250
+ "nested": [],
251
+ "consent": {
252
+ "functional": true
253
+ },
254
+ "id": "1700000100-gr0up-1",
255
+ "trigger": "load",
256
+ "entity": "product",
257
+ "action": "view",
258
+ "timestamp": 1700000100,
259
+ "timing": 3.14,
260
+ "group": "gr0up",
261
+ "count": 1,
262
+ "version": {
263
+ "source": "3.2.0",
264
+ "tagging": 1
265
+ },
266
+ "source": {
267
+ "type": "web",
268
+ "id": "https://localhost:80",
269
+ "previous_id": "http://remotehost:9001"
270
+ }
271
+ },
272
+ "out": [
273
+ "amplitude.track",
274
+ "product view",
275
+ {}
276
+ ]
277
+ },
278
+ "destinationLevelIdentify": {
279
+ "in": {
280
+ "name": "page view",
281
+ "data": {
282
+ "domain": "www.example.com",
283
+ "title": "walkerOS documentation",
284
+ "referrer": "https://www.walkeros.io/",
285
+ "search": "?foo=bar",
286
+ "hash": "#hash",
287
+ "id": "/docs/"
288
+ },
289
+ "context": {
290
+ "dev": [
291
+ "test",
292
+ 1
293
+ ]
294
+ },
295
+ "globals": {
296
+ "pagegroup": "docs"
297
+ },
298
+ "custom": {
299
+ "completely": "random"
300
+ },
301
+ "user": {
302
+ "id": "us3r",
303
+ "device": "c00k13",
304
+ "session": "s3ss10n"
305
+ },
306
+ "nested": [
307
+ {
308
+ "entity": "child",
309
+ "data": {
310
+ "is": "subordinated"
311
+ },
312
+ "nested": [],
313
+ "context": {
314
+ "element": [
315
+ "child",
316
+ 0
317
+ ]
318
+ }
319
+ }
320
+ ],
321
+ "consent": {
322
+ "functional": true
323
+ },
324
+ "id": "1700000104-gr0up-1",
325
+ "trigger": "load",
326
+ "entity": "page",
327
+ "action": "view",
328
+ "timestamp": 1700000104,
329
+ "timing": 3.14,
330
+ "group": "gr0up",
331
+ "count": 1,
332
+ "version": {
333
+ "source": "3.2.0",
334
+ "tagging": 1
335
+ },
336
+ "source": {
337
+ "type": "web",
338
+ "id": "https://localhost:80",
339
+ "previous_id": "http://remotehost:9001"
340
+ }
341
+ },
342
+ "settings": {
343
+ "identify": {
344
+ "map": {
345
+ "user_id": "user.id",
346
+ "device_id": "user.device",
347
+ "session_id": "user.session"
348
+ }
349
+ }
350
+ },
351
+ "out": [
352
+ "amplitude.track",
353
+ "page view",
354
+ {},
355
+ {
356
+ "user_id": "us3r",
357
+ "device_id": "c00k13",
358
+ "session_id": 394324160
359
+ }
360
+ ]
361
+ },
362
+ "destinationLevelInclude": {
363
+ "in": {
364
+ "name": "product view",
365
+ "data": {
366
+ "id": "ers",
367
+ "name": "Everyday Ruck Snack",
368
+ "color": "black",
369
+ "size": "l",
370
+ "price": 420
371
+ },
372
+ "context": {
373
+ "shopping": [
374
+ "detail",
375
+ 0
376
+ ]
377
+ },
378
+ "globals": {
379
+ "pagegroup": "shop"
380
+ },
381
+ "custom": {
382
+ "completely": "random"
383
+ },
384
+ "user": {
385
+ "id": "us3r",
386
+ "device": "c00k13",
387
+ "session": "s3ss10n"
388
+ },
389
+ "nested": [],
390
+ "consent": {
391
+ "functional": true
392
+ },
393
+ "id": "1700000102-gr0up-1",
394
+ "trigger": "load",
395
+ "entity": "product",
396
+ "action": "view",
397
+ "timestamp": 1700000102,
398
+ "timing": 3.14,
399
+ "group": "gr0up",
400
+ "count": 1,
401
+ "version": {
402
+ "source": "3.2.0",
403
+ "tagging": 1
404
+ },
405
+ "source": {
406
+ "type": "web",
407
+ "id": "https://localhost:80",
408
+ "previous_id": "http://remotehost:9001"
409
+ }
410
+ },
411
+ "configInclude": [
412
+ "data"
413
+ ],
414
+ "out": [
415
+ "amplitude.track",
416
+ "product view",
417
+ {
418
+ "data_id": "ers",
419
+ "data_name": "Everyday Ruck Snack",
420
+ "data_color": "black",
421
+ "data_size": "l",
422
+ "data_price": 420
423
+ }
424
+ ]
425
+ },
426
+ "eventOptionsTimeInsertId": {
427
+ "in": {
428
+ "name": "page view",
429
+ "data": {
430
+ "domain": "www.example.com",
431
+ "title": "walkerOS documentation",
432
+ "referrer": "https://www.walkeros.io/",
433
+ "search": "?foo=bar",
434
+ "hash": "#hash",
435
+ "id": "/docs/"
436
+ },
437
+ "context": {
438
+ "dev": [
439
+ "test",
440
+ 1
441
+ ]
442
+ },
443
+ "globals": {
444
+ "pagegroup": "docs"
445
+ },
446
+ "custom": {
447
+ "completely": "random"
448
+ },
449
+ "user": {
450
+ "id": "us3r",
451
+ "device": "c00k13",
452
+ "session": "s3ss10n"
453
+ },
454
+ "nested": [
455
+ {
456
+ "entity": "child",
457
+ "data": {
458
+ "is": "subordinated"
459
+ },
460
+ "nested": [],
461
+ "context": {
462
+ "element": [
463
+ "child",
464
+ 0
465
+ ]
466
+ }
467
+ }
468
+ ],
469
+ "consent": {
470
+ "functional": true
471
+ },
472
+ "id": "1700000110-gr0up-1",
473
+ "trigger": "load",
474
+ "entity": "page",
475
+ "action": "view",
476
+ "timestamp": 1700000110,
477
+ "timing": 3.14,
478
+ "group": "gr0up",
479
+ "count": 1,
480
+ "version": {
481
+ "source": "3.2.0",
482
+ "tagging": 1
483
+ },
484
+ "source": {
485
+ "type": "web",
486
+ "id": "https://localhost:80",
487
+ "previous_id": "http://remotehost:9001"
488
+ }
489
+ },
490
+ "settings": {
491
+ "eventOptions": {
492
+ "map": {
493
+ "time": "timestamp",
494
+ "insert_id": "id"
495
+ }
496
+ }
497
+ },
498
+ "out": [
499
+ "amplitude.track",
500
+ "page view",
501
+ {},
502
+ {
503
+ "time": 1700000110,
504
+ "insert_id": "1700000110-gr0up-1"
505
+ }
506
+ ]
507
+ },
508
+ "groupAssignmentWithProperties": {
509
+ "in": {
510
+ "name": "company update",
511
+ "data": {
512
+ "company": "Acme",
513
+ "industry": "tech",
514
+ "employee_count": 50,
515
+ "founded_year": 2020
516
+ },
517
+ "context": {
518
+ "dev": [
519
+ "test",
520
+ 1
521
+ ]
522
+ },
523
+ "globals": {
524
+ "lang": "elb"
525
+ },
526
+ "custom": {
527
+ "completely": "random"
528
+ },
529
+ "user": {
530
+ "id": "us3r",
531
+ "device": "c00k13",
532
+ "session": "s3ss10n"
533
+ },
534
+ "nested": [
535
+ {
536
+ "entity": "child",
537
+ "data": {
538
+ "is": "subordinated"
539
+ },
540
+ "nested": [],
541
+ "context": {
542
+ "element": [
543
+ "child",
544
+ 0
545
+ ]
546
+ }
547
+ }
548
+ ],
549
+ "consent": {
550
+ "functional": true
551
+ },
552
+ "id": "1700000109-gr0up-1",
553
+ "trigger": "test",
554
+ "entity": "company",
555
+ "action": "update",
556
+ "timestamp": 1700000109,
557
+ "timing": 3.14,
558
+ "group": "gr0up",
559
+ "count": 1,
560
+ "version": {
561
+ "source": "3.2.0",
562
+ "tagging": 1
563
+ },
564
+ "source": {
565
+ "type": "web",
566
+ "id": "https://localhost:80",
567
+ "previous_id": "http://remotehost:9001"
568
+ }
569
+ },
570
+ "mapping": {
571
+ "skip": true,
572
+ "settings": {
573
+ "group": {
574
+ "map": {
575
+ "type": {
576
+ "value": "company"
577
+ },
578
+ "name": "data.company"
579
+ }
580
+ },
581
+ "groupIdentify": {
582
+ "map": {
583
+ "type": {
584
+ "value": "company"
585
+ },
586
+ "name": "data.company",
587
+ "set": {
588
+ "map": {
589
+ "industry": "data.industry",
590
+ "size": "data.employee_count"
591
+ }
592
+ },
593
+ "setOnce": {
594
+ "map": {
595
+ "founded": "data.founded_year"
596
+ }
597
+ }
598
+ }
599
+ }
600
+ }
601
+ },
602
+ "out": [
603
+ [
604
+ "amplitude.setGroup",
605
+ "company",
606
+ "Acme"
607
+ ],
608
+ [
609
+ "amplitude.groupIdentify",
610
+ "company",
611
+ "Acme",
612
+ {
613
+ "set": {
614
+ "industry": "tech",
615
+ "size": 50
616
+ },
617
+ "setOnce": {
618
+ "founded": 2020
619
+ }
620
+ }
621
+ ]
622
+ ]
623
+ },
624
+ "orderCompleteMultiProduct": {
625
+ "in": {
626
+ "name": "order complete",
627
+ "data": {
628
+ "id": "0rd3r1d",
629
+ "currency": "EUR",
630
+ "shipping": 5.22,
631
+ "taxes": 73.76,
632
+ "total": 555
633
+ },
634
+ "context": {
635
+ "shopping": [
636
+ "complete",
637
+ 0
638
+ ]
639
+ },
640
+ "globals": {
641
+ "pagegroup": "shop"
642
+ },
643
+ "custom": {
644
+ "completely": "random"
645
+ },
646
+ "user": {
647
+ "id": "us3r",
648
+ "device": "c00k13",
649
+ "session": "s3ss10n"
650
+ },
651
+ "nested": [
652
+ {
653
+ "entity": "product",
654
+ "data": {
655
+ "id": "ers",
656
+ "name": "Everyday Ruck Snack",
657
+ "color": "black",
658
+ "size": "l",
659
+ "price": 420
660
+ },
661
+ "context": {
662
+ "shopping": [
663
+ "complete",
664
+ 0
665
+ ]
666
+ },
667
+ "nested": []
668
+ },
669
+ {
670
+ "entity": "product",
671
+ "data": {
672
+ "id": "cc",
673
+ "name": "Cool Cap",
674
+ "size": "one size",
675
+ "price": 42
676
+ },
677
+ "context": {
678
+ "shopping": [
679
+ "complete",
680
+ 0
681
+ ]
682
+ },
683
+ "nested": []
684
+ },
685
+ {
686
+ "entity": "gift",
687
+ "data": {
688
+ "name": "Surprise"
689
+ },
690
+ "context": {
691
+ "shopping": [
692
+ "complete",
693
+ 0
694
+ ]
695
+ },
696
+ "nested": []
697
+ }
698
+ ],
699
+ "consent": {
700
+ "functional": true
701
+ },
702
+ "id": "1700000108-gr0up-1",
703
+ "trigger": "load",
704
+ "entity": "order",
705
+ "action": "complete",
706
+ "timestamp": 1700000108,
707
+ "timing": 3.14,
708
+ "group": "gr0up",
709
+ "count": 1,
710
+ "version": {
711
+ "source": "3.2.0",
712
+ "tagging": 1
713
+ },
714
+ "source": {
715
+ "type": "web",
716
+ "id": "https://localhost:80",
717
+ "previous_id": "http://remotehost:9001"
718
+ }
719
+ },
720
+ "mapping": {
721
+ "include": [
722
+ "data",
723
+ "globals"
724
+ ],
725
+ "settings": {
726
+ "revenue": {
727
+ "loop": [
728
+ "nested",
729
+ {
730
+ "condition": {
731
+ "$code": "e=>{var t;return\"number\"==typeof(null==(t=null==e?void 0:e.data)?void 0:t.price)}"
732
+ },
733
+ "map": {
734
+ "productId": "data.id",
735
+ "price": "data.price",
736
+ "quantity": {
737
+ "key": "data.quantity",
738
+ "value": 1
739
+ },
740
+ "revenueType": {
741
+ "value": "purchase"
742
+ },
743
+ "currency": {
744
+ "key": "data.currency",
745
+ "value": "EUR"
746
+ }
747
+ }
748
+ }
749
+ ]
750
+ }
751
+ }
752
+ },
753
+ "out": [
754
+ [
755
+ "amplitude.revenue",
756
+ {
757
+ "productId": "ers",
758
+ "price": 420,
759
+ "quantity": 1,
760
+ "revenueType": "purchase",
761
+ "currency": "EUR"
762
+ }
763
+ ],
764
+ [
765
+ "amplitude.revenue",
766
+ {
767
+ "productId": "cc",
768
+ "price": 42,
769
+ "quantity": 1,
770
+ "revenueType": "purchase",
771
+ "currency": "EUR"
772
+ }
773
+ ],
774
+ [
775
+ "amplitude.track",
776
+ "order complete",
777
+ {
778
+ "data_id": "0rd3r1d",
779
+ "data_currency": "EUR",
780
+ "data_shipping": 5.22,
781
+ "data_taxes": 73.76,
782
+ "data_total": 555,
783
+ "globals_pagegroup": "shop"
784
+ }
785
+ ]
786
+ ]
787
+ },
788
+ "subscriptionRenewRevenue": {
789
+ "in": {
790
+ "name": "subscription renew",
791
+ "data": {
792
+ "plan_id": "plan-pro",
793
+ "amount": 9.99
794
+ },
795
+ "context": {
796
+ "dev": [
797
+ "test",
798
+ 1
799
+ ]
800
+ },
801
+ "globals": {
802
+ "lang": "elb"
803
+ },
804
+ "custom": {
805
+ "completely": "random"
806
+ },
807
+ "user": {
808
+ "id": "us3r",
809
+ "device": "c00k13",
810
+ "session": "s3ss10n"
811
+ },
812
+ "nested": [
813
+ {
814
+ "entity": "child",
815
+ "data": {
816
+ "is": "subordinated"
817
+ },
818
+ "nested": [],
819
+ "context": {
820
+ "element": [
821
+ "child",
822
+ 0
823
+ ]
824
+ }
825
+ }
826
+ ],
827
+ "consent": {
828
+ "functional": true
829
+ },
830
+ "id": "1700000107-gr0up-1",
831
+ "trigger": "test",
832
+ "entity": "subscription",
833
+ "action": "renew",
834
+ "timestamp": 1700000107,
835
+ "timing": 3.14,
836
+ "group": "gr0up",
837
+ "count": 1,
838
+ "version": {
839
+ "source": "3.2.0",
840
+ "tagging": 1
841
+ },
842
+ "source": {
843
+ "type": "web",
844
+ "id": "https://localhost:80",
845
+ "previous_id": "http://remotehost:9001"
846
+ }
847
+ },
848
+ "mapping": {
849
+ "skip": true,
850
+ "settings": {
851
+ "revenue": {
852
+ "map": {
853
+ "productId": "data.plan_id",
854
+ "price": "data.amount",
855
+ "revenueType": {
856
+ "value": "renewal"
857
+ },
858
+ "currency": {
859
+ "key": "data.currency",
860
+ "value": "EUR"
861
+ }
862
+ }
863
+ }
864
+ }
865
+ },
866
+ "out": [
867
+ "amplitude.revenue",
868
+ {
869
+ "productId": "plan-pro",
870
+ "price": 9.99,
871
+ "revenueType": "renewal",
872
+ "currency": "EUR"
873
+ }
874
+ ]
875
+ },
876
+ "userLoginIdentify": {
877
+ "in": {
878
+ "name": "user login",
879
+ "data": {
880
+ "user_id": "new-user-123",
881
+ "plan": "premium",
882
+ "company": "Acme",
883
+ "email": "user@acme.com"
884
+ },
885
+ "context": {
886
+ "dev": [
887
+ "test",
888
+ 1
889
+ ]
890
+ },
891
+ "globals": {
892
+ "lang": "elb"
893
+ },
894
+ "custom": {
895
+ "completely": "random"
896
+ },
897
+ "user": {
898
+ "id": "us3r",
899
+ "device": "c00k13",
900
+ "session": "s3ss10n"
901
+ },
902
+ "nested": [
903
+ {
904
+ "entity": "child",
905
+ "data": {
906
+ "is": "subordinated"
907
+ },
908
+ "nested": [],
909
+ "context": {
910
+ "element": [
911
+ "child",
912
+ 0
913
+ ]
914
+ }
915
+ }
916
+ ],
917
+ "consent": {
918
+ "functional": true
919
+ },
920
+ "id": "1700000105-gr0up-1",
921
+ "trigger": "test",
922
+ "entity": "user",
923
+ "action": "login",
924
+ "timestamp": 1700000105,
925
+ "timing": 3.14,
926
+ "group": "gr0up",
927
+ "count": 1,
928
+ "version": {
929
+ "source": "3.2.0",
930
+ "tagging": 1
931
+ },
932
+ "source": {
933
+ "type": "web",
934
+ "id": "https://localhost:80",
935
+ "previous_id": "http://remotehost:9001"
936
+ }
937
+ },
938
+ "mapping": {
939
+ "skip": true,
940
+ "settings": {
941
+ "identify": {
942
+ "map": {
943
+ "user_id": "data.user_id",
944
+ "set": {
945
+ "map": {
946
+ "plan": "data.plan",
947
+ "company": "data.company",
948
+ "email": "data.email"
949
+ }
950
+ },
951
+ "setOnce": {
952
+ "map": {
953
+ "first_login": "timestamp"
954
+ }
955
+ },
956
+ "add": {
957
+ "map": {
958
+ "login_count": {
959
+ "value": 1
960
+ }
961
+ }
962
+ }
963
+ }
964
+ }
965
+ }
966
+ },
967
+ "out": [
968
+ "amplitude.identify",
969
+ {
970
+ "set": {
971
+ "plan": "premium",
972
+ "company": "Acme",
973
+ "email": "user@acme.com"
974
+ },
975
+ "setOnce": {
976
+ "first_login": 1700000105
977
+ },
978
+ "add": {
979
+ "login_count": 1
980
+ }
981
+ },
982
+ {
983
+ "user_id": "new-user-123"
984
+ }
985
+ ]
986
+ },
987
+ "wildcardIgnored": {
988
+ "in": {
989
+ "name": "debug noise",
990
+ "data": {
991
+ "string": "foo",
992
+ "number": 1,
993
+ "boolean": true,
994
+ "array": [
995
+ 0,
996
+ "text",
997
+ false
998
+ ]
999
+ },
1000
+ "context": {
1001
+ "dev": [
1002
+ "test",
1003
+ 1
1004
+ ]
1005
+ },
1006
+ "globals": {
1007
+ "lang": "elb"
1008
+ },
1009
+ "custom": {
1010
+ "completely": "random"
1011
+ },
1012
+ "user": {
1013
+ "id": "us3r",
1014
+ "device": "c00k13",
1015
+ "session": "s3ss10n"
1016
+ },
1017
+ "nested": [
1018
+ {
1019
+ "entity": "child",
1020
+ "data": {
1021
+ "is": "subordinated"
1022
+ },
1023
+ "nested": [],
1024
+ "context": {
1025
+ "element": [
1026
+ "child",
1027
+ 0
1028
+ ]
1029
+ }
1030
+ }
1031
+ ],
1032
+ "consent": {
1033
+ "functional": true
1034
+ },
1035
+ "id": "1700000101-gr0up-1",
1036
+ "trigger": "test",
1037
+ "entity": "debug",
1038
+ "action": "noise",
1039
+ "timestamp": 1700000101,
1040
+ "timing": 3.14,
1041
+ "group": "gr0up",
1042
+ "count": 1,
1043
+ "version": {
1044
+ "source": "3.2.0",
1045
+ "tagging": 1
1046
+ },
1047
+ "source": {
1048
+ "type": "web",
1049
+ "id": "https://localhost:80",
1050
+ "previous_id": "http://remotehost:9001"
1051
+ }
1052
+ },
1053
+ "mapping": {
1054
+ "ignore": true
1055
+ },
1056
+ "out": []
1057
+ }
1058
+ }
1059
+ }
1060
+ }