@walkeros/web-destination-amplitude 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-amplitude",
4
- "version": "4.8.1",
4
+ "version": "4.8.2",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
@@ -89,27 +89,30 @@
89
89
  "description": "walkerOS mapping value resolving to an identity object. Keys: user, device, session, set, setOnce, add, append, prepend, preInsert, postInsert, remove, unset, clearAll."
90
90
  },
91
91
  "sessionReplay": {
92
- "description": "Session Replay options, passed to the Session Replay plugin. @amplitude/unified sets up the plugin on every init, whether or not this is set; it records a sampled share of sessions, set by the project sampling settings in Amplitude when present, else by sampleRate (default 0)."
92
+ "description": "Session Replay options. When set, the Session Replay plugin starts; the other plugins start only from their own settings. It records a sampled share of sessions, set by the project sampling settings in Amplitude when present, else by sampleRate (default 0)."
93
93
  },
94
94
  "experiment": {
95
- "description": "Feature Experiment options. Passed to the Experiment plugin only when they include `deploymentKey`. @amplitude/unified sets up the plugin on every init; without a deploymentKey it uses the API key."
95
+ "description": "Feature Experiment options. The Experiment plugin starts only when they include `deploymentKey`; the other plugins start only from their own settings."
96
96
  },
97
97
  "engagement": {
98
- "description": "Guides & Surveys options object. @amplitude/unified loads the Guides & Surveys SDK from cdn.amplitude.com on every init, whether or not this is set; `true` passes no options."
98
+ "description": "Guides & Surveys options object; `true` passes no options. When set, the Guides & Surveys plugin starts and loads its SDK from cdn.amplitude.com; the other plugins start only from their own settings."
99
99
  }
100
100
  },
101
101
  "required": [
102
102
  "apiKey"
103
103
  ],
104
- "additionalProperties": false
104
+ "additionalProperties": {}
105
105
  }
106
106
  },
107
107
  "examples": {
108
108
  "env": {
109
109
  "init": {
110
110
  "amplitude": {
111
- "initAll": {
112
- "$code": "()=>Promise.resolve()"
111
+ "init": {
112
+ "$code": "()=>({promise:Promise.resolve()})"
113
+ },
114
+ "add": {
115
+ "$code": "()=>({promise:Promise.resolve()})"
113
116
  },
114
117
  "track": {
115
118
  "$code": "()=>{}"
@@ -141,14 +144,8 @@
141
144
  "groupIdentify": {
142
145
  "$code": "()=>{}"
143
146
  },
144
- "flush": {
145
- "$code": "()=>({promise:Promise.resolve()})"
146
- },
147
- "add": {
148
- "$code": "()=>({promise:Promise.resolve()})"
149
- },
150
147
  "Identify": {
151
- "$code": "class{constructor(){this._ops={}}_record(e,t,i){return this._ops[e]||(this._ops[e]={}),this._ops[e][t]=i,this}set(e,t){return this._record(\"set\",e,t)}setOnce(e,t){return this._record(\"setOnce\",e,t)}add(e,t){return this._record(\"add\",e,t)}append(e,t){return this._record(\"append\",e,t)}prepend(e,t){return this._record(\"prepend\",e,t)}preInsert(e,t){return this._record(\"preInsert\",e,t)}postInsert(e,t){return this._record(\"postInsert\",e,t)}remove(e,t){return this._record(\"remove\",e,t)}unset(e){return this._record(\"unset\",e)}clearAll(){return this._ops.clearAll={},this}toJSON(){return this._ops}}"
148
+ "$code": "class{constructor(){this._ops={}}_record(e,t,n){return this._ops[e]||(this._ops[e]={}),this._ops[e][t]=n,this}set(e,t){return this._record(\"set\",e,t)}setOnce(e,t){return this._record(\"setOnce\",e,t)}add(e,t){return this._record(\"add\",e,t)}append(e,t){return this._record(\"append\",e,t)}prepend(e,t){return this._record(\"prepend\",e,t)}preInsert(e,t){return this._record(\"preInsert\",e,t)}postInsert(e,t){return this._record(\"postInsert\",e,t)}remove(e,t){return this._record(\"remove\",e,t)}unset(e){return this._record(\"unset\",e)}clearAll(){return this._ops.clearAll={},this}toJSON(){return this._ops}}"
152
149
  },
153
150
  "Revenue": {
154
151
  "$code": "class{constructor(){this._data={}}setProductId(e){return this._data.productId=e,this}setPrice(e){return this._data.price=e,this}setQuantity(e){return this._data.quantity=e,this}setRevenueType(e){return this._data.revenueType=e,this}setCurrency(e){return this._data.currency=e,this}setRevenue(e){return this._data.revenue=e,this}setReceipt(e){return this._data.receipt=e,this}setReceiptSig(e){return this._data.receiptSig=e,this}setEventProperties(e){return this._data.eventProperties=e,this}toJSON(){return this._data}}"
@@ -157,8 +154,11 @@
157
154
  },
158
155
  "push": {
159
156
  "amplitude": {
160
- "initAll": {
161
- "$code": "()=>Promise.resolve()"
157
+ "init": {
158
+ "$code": "()=>({promise:Promise.resolve()})"
159
+ },
160
+ "add": {
161
+ "$code": "()=>({promise:Promise.resolve()})"
162
162
  },
163
163
  "track": {
164
164
  "$code": "()=>{}"
@@ -190,14 +190,8 @@
190
190
  "groupIdentify": {
191
191
  "$code": "()=>{}"
192
192
  },
193
- "flush": {
194
- "$code": "()=>({promise:Promise.resolve()})"
195
- },
196
- "add": {
197
- "$code": "()=>({promise:Promise.resolve()})"
198
- },
199
193
  "Identify": {
200
- "$code": "class{constructor(){this._ops={}}_record(e,t,i){return this._ops[e]||(this._ops[e]={}),this._ops[e][t]=i,this}set(e,t){return this._record(\"set\",e,t)}setOnce(e,t){return this._record(\"setOnce\",e,t)}add(e,t){return this._record(\"add\",e,t)}append(e,t){return this._record(\"append\",e,t)}prepend(e,t){return this._record(\"prepend\",e,t)}preInsert(e,t){return this._record(\"preInsert\",e,t)}postInsert(e,t){return this._record(\"postInsert\",e,t)}remove(e,t){return this._record(\"remove\",e,t)}unset(e){return this._record(\"unset\",e)}clearAll(){return this._ops.clearAll={},this}toJSON(){return this._ops}}"
194
+ "$code": "class{constructor(){this._ops={}}_record(e,t,n){return this._ops[e]||(this._ops[e]={}),this._ops[e][t]=n,this}set(e,t){return this._record(\"set\",e,t)}setOnce(e,t){return this._record(\"setOnce\",e,t)}add(e,t){return this._record(\"add\",e,t)}append(e,t){return this._record(\"append\",e,t)}prepend(e,t){return this._record(\"prepend\",e,t)}preInsert(e,t){return this._record(\"preInsert\",e,t)}postInsert(e,t){return this._record(\"postInsert\",e,t)}remove(e,t){return this._record(\"remove\",e,t)}unset(e){return this._record(\"unset\",e)}clearAll(){return this._ops.clearAll={},this}toJSON(){return this._ops}}"
201
195
  },
202
196
  "Revenue": {
203
197
  "$code": "class{constructor(){this._data={}}setProductId(e){return this._data.productId=e,this}setPrice(e){return this._data.price=e,this}setQuantity(e){return this._data.quantity=e,this}setRevenueType(e){return this._data.revenueType=e,this}setCurrency(e){return this._data.currency=e,this}setRevenue(e){return this._data.revenue=e,this}setReceipt(e){return this._data.receipt=e,this}setReceiptSig(e){return this._data.receiptSig=e,this}setEventProperties(e){return this._data.eventProperties=e,this}toJSON(){return this._data}}"
@@ -205,7 +199,8 @@
205
199
  }
206
200
  },
207
201
  "simulation": [
208
- "call:amplitude.initAll",
202
+ "call:amplitude.init",
203
+ "call:amplitude.add",
209
204
  "call:amplitude.track",
210
205
  "call:amplitude.identify",
211
206
  "call:amplitude.revenue",
@@ -289,7 +284,7 @@
289
284
  "consent": {
290
285
  "functional": true
291
286
  },
292
- "id": "ac214896deecd067",
287
+ "id": "db22fb16c70f663d",
293
288
  "trigger": "load",
294
289
  "entity": "product",
295
290
  "action": "view",
@@ -351,7 +346,7 @@
351
346
  "consent": {
352
347
  "functional": true
353
348
  },
354
- "id": "ca65083b3d568a5f",
349
+ "id": "f0cc5f6fec3d8eeb",
355
350
  "trigger": "load",
356
351
  "entity": "page",
357
352
  "action": "view",
@@ -426,7 +421,7 @@
426
421
  "consent": {
427
422
  "functional": true
428
423
  },
429
- "id": "6b6f236e9df4945e",
424
+ "id": "db22fb16c70f663d",
430
425
  "trigger": "load",
431
426
  "entity": "product",
432
427
  "action": "view",
@@ -495,7 +490,7 @@
495
490
  "consent": {
496
491
  "functional": true
497
492
  },
498
- "id": "0c7620af11854083",
493
+ "id": "91bfc72946a8154f",
499
494
  "trigger": "test",
500
495
  "entity": "company",
501
496
  "action": "update",
@@ -562,6 +557,48 @@
562
557
  ]
563
558
  ]
564
559
  },
560
+ "groupAssignmentWithoutData": {
561
+ "public": false,
562
+ "description": "A silent rule whose group mapping finds no company sends nothing: an unmet mapping, not a failure, so the push returns normally.",
563
+ "in": {
564
+ "name": "company update",
565
+ "entity": "company",
566
+ "action": "update"
567
+ },
568
+ "mapping": {
569
+ "silent": true,
570
+ "settings": {
571
+ "group": {
572
+ "map": {
573
+ "type": {
574
+ "value": "company"
575
+ },
576
+ "name": "data.company"
577
+ }
578
+ },
579
+ "groupIdentify": {
580
+ "map": {
581
+ "type": {
582
+ "value": "company"
583
+ },
584
+ "name": "data.company",
585
+ "set": {
586
+ "map": {
587
+ "industry": "data.industry",
588
+ "size": "data.employee_count"
589
+ }
590
+ },
591
+ "setOnce": {
592
+ "map": {
593
+ "founded": "data.founded_year"
594
+ }
595
+ }
596
+ }
597
+ }
598
+ }
599
+ },
600
+ "out": []
601
+ },
565
602
  "orderCompleteMultiProduct": {
566
603
  "title": "Multi-product order",
567
604
  "description": "An order fires one amplitude.revenue call per nested product plus a single track for the order totals.",
@@ -572,7 +609,7 @@
572
609
  "currency": "EUR",
573
610
  "shipping": 5.22,
574
611
  "taxes": 73.76,
575
- "total": 555
612
+ "value": 555
576
613
  },
577
614
  "context": {
578
615
  "shopping": [
@@ -642,7 +679,7 @@
642
679
  "consent": {
643
680
  "functional": true
644
681
  },
645
- "id": "fd29a6f7a84ebe75",
682
+ "id": "235d0d7bd7a213f2",
646
683
  "trigger": "load",
647
684
  "entity": "order",
648
685
  "action": "complete",
@@ -717,7 +754,7 @@
717
754
  "data_currency": "EUR",
718
755
  "data_shipping": 5.22,
719
756
  "data_taxes": 73.76,
720
- "data_total": 555,
757
+ "data_value": 555,
721
758
  "globals_pagegroup": "shop"
722
759
  }
723
760
  ]
@@ -733,7 +770,7 @@
733
770
  "currency": "EUR",
734
771
  "shipping": 5.22,
735
772
  "taxes": 73.76,
736
- "total": 555
773
+ "value": 555
737
774
  },
738
775
  "context": {
739
776
  "shopping": [
@@ -803,7 +840,7 @@
803
840
  "consent": {
804
841
  "functional": true
805
842
  },
806
- "id": "632719d6532f8fba",
843
+ "id": "235d0d7bd7a213f2",
807
844
  "trigger": "load",
808
845
  "entity": "order",
809
846
  "action": "complete",
@@ -834,6 +871,65 @@
834
871
  ]
835
872
  ]
836
873
  },
874
+ "silentRule": {
875
+ "public": false,
876
+ "description": "A rule with silent: true and no settings calls nothing.",
877
+ "in": {
878
+ "name": "page view",
879
+ "data": {
880
+ "domain": "www.example.com",
881
+ "title": "walkerOS documentation",
882
+ "referrer": "https://www.walkeros.io/",
883
+ "search": "?foo=bar",
884
+ "hash": "#hash",
885
+ "id": "/docs/"
886
+ },
887
+ "context": {
888
+ "dev": [
889
+ "test",
890
+ 1
891
+ ]
892
+ },
893
+ "globals": {
894
+ "pagegroup": "docs"
895
+ },
896
+ "custom": {
897
+ "completely": "random"
898
+ },
899
+ "user": {
900
+ "id": "us3r",
901
+ "device": "c00k13",
902
+ "session": "s3ss10n"
903
+ },
904
+ "nested": [
905
+ {
906
+ "entity": "child",
907
+ "data": {
908
+ "is": "subordinated"
909
+ }
910
+ }
911
+ ],
912
+ "consent": {
913
+ "functional": true
914
+ },
915
+ "id": "f0cc5f6fec3d8eeb",
916
+ "trigger": "load",
917
+ "entity": "page",
918
+ "action": "view",
919
+ "timestamp": 1700000120,
920
+ "timing": 3.14,
921
+ "source": {
922
+ "count": 1,
923
+ "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
924
+ "type": "collector",
925
+ "schema": "4"
926
+ }
927
+ },
928
+ "mapping": {
929
+ "silent": true
930
+ },
931
+ "out": []
932
+ },
837
933
  "subscriptionRenewRevenue": {
838
934
  "title": "Subscription revenue",
839
935
  "description": "A subscription renewal fires a single amplitude.revenue call with productId, price, and currency fallback.",
@@ -871,7 +967,7 @@
871
967
  "consent": {
872
968
  "functional": true
873
969
  },
874
- "id": "1a23f3630ec6492b",
970
+ "id": "c52144147c06acbd",
875
971
  "trigger": "test",
876
972
  "entity": "subscription",
877
973
  "action": "renew",
@@ -953,7 +1049,7 @@
953
1049
  "consent": {
954
1050
  "functional": true
955
1051
  },
956
- "id": "a17ea6c542ba2c2a",
1052
+ "id": "cd7d17de7055f726",
957
1053
  "trigger": "test",
958
1054
  "entity": "user",
959
1055
  "action": "login",
@@ -1061,7 +1157,7 @@
1061
1157
  "consent": {
1062
1158
  "functional": true
1063
1159
  },
1064
- "id": "06767eee1d87f839",
1160
+ "id": "b8004c987132472e",
1065
1161
  "trigger": "test",
1066
1162
  "entity": "user",
1067
1163
  "action": "logout",
@@ -1128,7 +1224,7 @@
1128
1224
  "consent": {
1129
1225
  "functional": true
1130
1226
  },
1131
- "id": "6d29b43da0b555e8",
1227
+ "id": "9e19242bdbd75057",
1132
1228
  "trigger": "test",
1133
1229
  "entity": "debug",
1134
1230
  "action": "noise",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-amplitude",
3
3
  "description": "Amplitude web destination for walkerOS (analytics, session replay, experiments, guides & surveys)",
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,15 @@
38
38
  "update": "npx npm-check-updates -u && npm update"
39
39
  },
40
40
  "dependencies": {
41
+ "@amplitude/engagement-browser": "^1.0.3",
42
+ "@amplitude/plugin-experiment-browser": "1.0.0-beta.28",
43
+ "@amplitude/plugin-session-replay-browser": "1.31.0",
41
44
  "@amplitude/unified": "^1.0.16",
42
- "@walkeros/core": "4.8.1",
43
- "@walkeros/web-core": "4.8.1"
45
+ "@walkeros/core": "4.8.2",
46
+ "@walkeros/web-core": "4.8.2"
44
47
  },
45
48
  "devDependencies": {
46
- "@walkeros/collector": "4.8.1"
49
+ "@walkeros/collector": "4.8.2"
47
50
  },
48
51
  "repository": {
49
52
  "url": "git+https://github.com/elbwalker/walkerOS.git",