@mparticle/web-sdk 2.29.1 → 2.30.1
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.
- package/CHANGELOG.md +984 -0
- package/dist/mparticle.common.js +2 -2
- package/dist/mparticle.esm.js +2 -2
- package/dist/mparticle.js +3 -3
- package/package.json +1 -1
- package/src/sdkToEventsApiConverter.ts +10 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,984 @@
|
|
|
1
|
+
# [2.30.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.30.0...v2.30.1) (2024-10-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Check for window.screen when setting device_info ([#930](https://github.com/mParticle/mparticle-web-sdk/issues/930)) ([7ce742f](https://github.com/mParticle/mparticle-web-sdk/commit/7ce742fe7675ed6aab3db6cfd270d5e86cb02420))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# [2.30.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.29.0...v2.30.0) (2024-10-11)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* Handle cases where window.screen is unavailable ([#929](https://github.com/mParticle/mparticle-web-sdk/issues/929)) ([6d042df](https://github.com/mParticle/mparticle-web-sdk/commit/6d042df636edfad2d84c1c2440734479d969c058))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* Replace XHR in IdentityApiClient with AsyncUploader ([#909](https://github.com/mParticle/mparticle-web-sdk/issues/909)) ([9526e3a](https://github.com/mParticle/mparticle-web-sdk/commit/9526e3a0a8e02975655a5bf49674904a882be0b2))
|
|
20
|
+
|
|
21
|
+
# [2.29.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.28.3...v2.29.0) (2024-10-08)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* Fix typo in identity interface ([#923](https://github.com/mParticle/mparticle-web-sdk/issues/923)) ([f1e0ec9](https://github.com/mParticle/mparticle-web-sdk/commit/f1e0ec96f09995e7933400cbefbb06bc376b49da))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* Capture Integration Ids and assign to events ([#926](https://github.com/mParticle/mparticle-web-sdk/issues/926)) ([a916262](https://github.com/mParticle/mparticle-web-sdk/commit/a91626295abbc55f1dfd05069e7a5c676d9f86bc))
|
|
32
|
+
|
|
33
|
+
## [2.28.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.28.2...v2.28.3) (2024-09-16)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* Reject xhr only on errors ([#917](https://github.com/mParticle/mparticle-web-sdk/issues/917)) ([1d6cbdd](https://github.com/mParticle/mparticle-web-sdk/commit/1d6cbdd74a9b2d11c087c3f917898450c4b0697e))
|
|
39
|
+
|
|
40
|
+
## [2.28.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.28.1...v2.28.2) (2024-09-11)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* Remove XHR References from Identity Utils ([#905](https://github.com/mParticle/mparticle-web-sdk/issues/905)) ([8beebc7](https://github.com/mParticle/mparticle-web-sdk/commit/8beebc7be5379eacbbf91b3ece2b9f85fbfcdfcb))
|
|
46
|
+
|
|
47
|
+
## [2.28.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.28.0...v2.28.1) (2024-09-04)
|
|
48
|
+
|
|
49
|
+
# [2.28.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.27.0...v2.28.0) (2024-08-26)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
* Refactor usage of XHR for Config API ([#898](https://github.com/mParticle/mparticle-web-sdk/issues/898)) ([0b6fae6](https://github.com/mParticle/mparticle-web-sdk/commit/0b6fae68a6d499444736308b9fc00bf8d08d6706))
|
|
55
|
+
|
|
56
|
+
# [2.27.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.10...v2.27.0) (2024-08-13)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Bug Fixes
|
|
60
|
+
|
|
61
|
+
* Respect directUrlRouting flag in self hosted environments ([#900](https://github.com/mParticle/mparticle-web-sdk/issues/900)) ([ae07504](https://github.com/mParticle/mparticle-web-sdk/commit/ae075040955b99af0e8052217c9b565f1e545eca))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Features
|
|
65
|
+
|
|
66
|
+
* Enable passing sourceMessageId to logProductAction ([#901](https://github.com/mParticle/mparticle-web-sdk/issues/901)) ([3b10cb1](https://github.com/mParticle/mparticle-web-sdk/commit/3b10cb1f9e08b644dd3ddb880d48d05e0ef7cc07))
|
|
67
|
+
|
|
68
|
+
## [2.26.10](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.9...v2.26.10) (2024-06-18)
|
|
69
|
+
|
|
70
|
+
## [2.26.9](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.8...v2.26.9) (2024-06-11)
|
|
71
|
+
|
|
72
|
+
## [2.26.8](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.7...v2.26.8) (2024-06-04)
|
|
73
|
+
|
|
74
|
+
## [2.26.7](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.6...v2.26.7) (2024-05-29)
|
|
75
|
+
|
|
76
|
+
## [2.26.6](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.5...v2.26.6) (2024-05-28)
|
|
77
|
+
|
|
78
|
+
## [2.26.5](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.4...v2.26.5) (2024-05-22)
|
|
79
|
+
|
|
80
|
+
## [2.26.4](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.3...v2.26.4) (2024-05-13)
|
|
81
|
+
|
|
82
|
+
## [2.26.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.2...v2.26.3) (2024-04-29)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Reverts
|
|
86
|
+
|
|
87
|
+
* "refactor: Refactor ParseIdentityResponse Workflow ([#864](https://github.com/mParticle/mparticle-web-sdk/issues/864))" ([#879](https://github.com/mParticle/mparticle-web-sdk/issues/879)) ([39163d9](https://github.com/mParticle/mparticle-web-sdk/commit/39163d9a73e938354fb5b81b8498f9fc9723afad))
|
|
88
|
+
|
|
89
|
+
## [2.26.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.1...v2.26.2) (2024-04-23)
|
|
90
|
+
|
|
91
|
+
## [2.26.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.26.0...v2.26.1) (2024-04-22)
|
|
92
|
+
|
|
93
|
+
# [2.26.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.25.3...v2.26.0) (2024-04-15)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Bug Fixes
|
|
97
|
+
|
|
98
|
+
* Implement audience API feature flag ([#865](https://github.com/mParticle/mparticle-web-sdk/issues/865)) ([faa4520](https://github.com/mParticle/mparticle-web-sdk/commit/faa45205f788b610bdd8418996a8a9aa58c38b58))
|
|
99
|
+
* Migrate First and Last Seen Time Setters and Getters to Store ([#856](https://github.com/mParticle/mparticle-web-sdk/issues/856)) ([86a9535](https://github.com/mParticle/mparticle-web-sdk/commit/86a953537660ef23a09811bfc7fa8cf1e8854f44))
|
|
100
|
+
* Update audience logic to new backend response ([#844](https://github.com/mParticle/mparticle-web-sdk/issues/844)) ([8a63045](https://github.com/mParticle/mparticle-web-sdk/commit/8a630459f0542e9995ddaf7402e47ba56c8ae423))
|
|
101
|
+
* Update url to nativesdks and update server response ([#863](https://github.com/mParticle/mparticle-web-sdk/issues/863)) ([9e46cef](https://github.com/mParticle/mparticle-web-sdk/commit/9e46cef67ade9e1c682d09d6438f330f2be9fbbd))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* Implement fetching user audiences ([#841](https://github.com/mParticle/mparticle-web-sdk/issues/841)) ([93a7fb7](https://github.com/mParticle/mparticle-web-sdk/commit/93a7fb7ce93d2f28bfc7699bae82cf755de84c3c))
|
|
107
|
+
|
|
108
|
+
## [2.25.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.25.2...v2.25.3) (2024-04-08)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Bug Fixes
|
|
112
|
+
|
|
113
|
+
* Migrate deviceId methods to Store ([#855](https://github.com/mParticle/mparticle-web-sdk/issues/855)) ([ccb0dbe](https://github.com/mParticle/mparticle-web-sdk/commit/ccb0dbe44b742a41988c38afc25ee691dbc76bed))
|
|
114
|
+
|
|
115
|
+
## [2.25.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.25.1...v2.25.2) (2024-04-01)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Bug Fixes
|
|
119
|
+
|
|
120
|
+
* Combine End Session Logging Messaging flow ([#848](https://github.com/mParticle/mparticle-web-sdk/issues/848)) ([a2c902d](https://github.com/mParticle/mparticle-web-sdk/commit/a2c902d4ed1f51cc214c31e5f262bd89e0513863))
|
|
121
|
+
* Create a simple merge object utility ([#849](https://github.com/mParticle/mparticle-web-sdk/issues/849)) ([61e82da](https://github.com/mParticle/mparticle-web-sdk/commit/61e82daa8b4c5797d77952e1bb2f8992fab20058))
|
|
122
|
+
|
|
123
|
+
## [2.25.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.25.0...v2.25.1) (2024-02-06)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Bug Fixes
|
|
127
|
+
|
|
128
|
+
* Only cache mpid and is_loggeed_in from xhr.responseText ([#838](https://github.com/mParticle/mparticle-web-sdk/issues/838)) ([dd1920f](https://github.com/mParticle/mparticle-web-sdk/commit/dd1920ff5928b3825fb4367e21aa0d03035a6081))
|
|
129
|
+
|
|
130
|
+
# [2.25.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.24.0...v2.25.0) (2024-01-29)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Features
|
|
134
|
+
|
|
135
|
+
* Implement identity caching ([#834](https://github.com/mParticle/mparticle-web-sdk/issues/834)) ([04514ec](https://github.com/mParticle/mparticle-web-sdk/commit/04514ec9ab06d20958426dcb66f2589a58044a17))
|
|
136
|
+
|
|
137
|
+
# [2.24.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.9...v2.24.0) (2024-01-09)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Features
|
|
141
|
+
|
|
142
|
+
* Support direct url routing from config ([#797](https://github.com/mParticle/mparticle-web-sdk/issues/797)) ([#801](https://github.com/mParticle/mparticle-web-sdk/issues/801)) ([ffddbc4](https://github.com/mParticle/mparticle-web-sdk/commit/ffddbc4127e465dea4d35eef2a9948e79c199808))
|
|
143
|
+
|
|
144
|
+
## [2.23.9](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.8...v2.23.9) (2024-01-08)
|
|
145
|
+
|
|
146
|
+
## [2.23.8](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.7...v2.23.8) (2024-01-02)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Bug Fixes
|
|
150
|
+
|
|
151
|
+
* Add filtered user identities to identity complete methods ([#816](https://github.com/mParticle/mparticle-web-sdk/issues/816)) ([715e217](https://github.com/mParticle/mparticle-web-sdk/commit/715e217cb8c630dfaefddc136eaa2150a53a5036))
|
|
152
|
+
* Replace identify method strings with constants ([#817](https://github.com/mParticle/mparticle-web-sdk/issues/817)) ([1bca974](https://github.com/mParticle/mparticle-web-sdk/commit/1bca9744567f12714aa8900c79a5232fe972c64b))
|
|
153
|
+
|
|
154
|
+
## [2.23.7](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.6...v2.23.7) (2023-10-23)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Bug Fixes
|
|
158
|
+
|
|
159
|
+
* Prevent immediate upload for UserAttributeChange Events ([#793](https://github.com/mParticle/mparticle-web-sdk/issues/793)) ([2f0c5ac](https://github.com/mParticle/mparticle-web-sdk/commit/2f0c5ac8af559bf4a15c984f981123358b8488d0))
|
|
160
|
+
* Respect sideloaded kit filter dictionaries ([#792](https://github.com/mParticle/mparticle-web-sdk/issues/792)) ([91b6afa](https://github.com/mParticle/mparticle-web-sdk/commit/91b6afaa36644689dd19e0515701c87d1d8c2dbd))
|
|
161
|
+
|
|
162
|
+
## [2.23.6](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.5...v2.23.6) (2023-10-17)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Bug Fixes
|
|
166
|
+
|
|
167
|
+
* Remove slugify dependency ([#786](https://github.com/mParticle/mparticle-web-sdk/issues/786)) ([8346bdc](https://github.com/mParticle/mparticle-web-sdk/commit/8346bdc4f3f8e102011952fce89c89e72d6f30d7))
|
|
168
|
+
|
|
169
|
+
## [2.23.5](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.4...v2.23.5) (2023-10-09)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Bug Fixes
|
|
173
|
+
|
|
174
|
+
* Prevent Batches from sendBeacon from being stored offline ([#784](https://github.com/mParticle/mparticle-web-sdk/issues/784)) ([defed0a](https://github.com/mParticle/mparticle-web-sdk/commit/defed0abab667a08b2834809f5a57efb3e3fcd76))
|
|
175
|
+
|
|
176
|
+
## [2.23.4](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.3...v2.23.4) (2023-09-25)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Bug Fixes
|
|
180
|
+
|
|
181
|
+
* Update snippet to support snippet version pinning ([#778](https://github.com/mParticle/mparticle-web-sdk/issues/778)) ([1152cf5](https://github.com/mParticle/mparticle-web-sdk/commit/1152cf5efbdaee3d141af786c32dbcaa0c886e70))
|
|
182
|
+
|
|
183
|
+
## [2.23.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.2...v2.23.3) (2023-09-19)
|
|
184
|
+
|
|
185
|
+
## [2.23.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.1...v2.23.2) (2023-07-17)
|
|
186
|
+
|
|
187
|
+
## [2.23.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.23.0...v2.23.1) (2023-07-10)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Bug Fixes
|
|
191
|
+
|
|
192
|
+
* Rename is_using_sideloaded_kits to sideloaded_kits_count ([#646](https://github.com/mParticle/mparticle-web-sdk/issues/646)) ([98d868c](https://github.com/mParticle/mparticle-web-sdk/commit/98d868c8b91cc3ca39cf399098428542bb6e0768))
|
|
193
|
+
|
|
194
|
+
# [2.23.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.22.1...v2.23.0) (2023-06-26)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Features
|
|
198
|
+
|
|
199
|
+
* Support config-provided suffix in kit initialization ([#617](https://github.com/mParticle/mparticle-web-sdk/issues/617)) ([1052f51](https://github.com/mParticle/mparticle-web-sdk/commit/1052f517f35ff7312c3195e52129c8ab05467783))
|
|
200
|
+
|
|
201
|
+
## [2.22.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.22.0...v2.22.1) (2023-06-12)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### Bug Fixes
|
|
205
|
+
|
|
206
|
+
* Add Sideloaded Kit flag to Batches ([#613](https://github.com/mParticle/mparticle-web-sdk/issues/613)) ([13a113b](https://github.com/mParticle/mparticle-web-sdk/commit/13a113b8e35ea0b43e4b352b3853f8a4156eb0c9))
|
|
207
|
+
* Revise priority of device id when initializing state ([#618](https://github.com/mParticle/mparticle-web-sdk/issues/618)) ([b71f746](https://github.com/mParticle/mparticle-web-sdk/commit/b71f746532ed542df6bb109e329ad63e5b96bf27))
|
|
208
|
+
|
|
209
|
+
# [2.22.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.21.2...v2.22.0) (2023-06-05)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
### Bug Fixes
|
|
213
|
+
|
|
214
|
+
* Resolve flakey cookie sync tests ([#572](https://github.com/mParticle/mparticle-web-sdk/issues/572)) ([8f2b750](https://github.com/mParticle/mparticle-web-sdk/commit/8f2b750d77b833b64e1323db84bf764b2420d15f))
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### Features
|
|
218
|
+
|
|
219
|
+
* Add MPSideloadedKit class ([#564](https://github.com/mParticle/mparticle-web-sdk/issues/564)) ([252a2ce](https://github.com/mParticle/mparticle-web-sdk/commit/252a2ceba00f72690abe4809e572c06be7fd330c))
|
|
220
|
+
* Expose MPSideloadedKit class to public API ([#568](https://github.com/mParticle/mparticle-web-sdk/issues/568)) ([47a9186](https://github.com/mParticle/mparticle-web-sdk/commit/47a9186d38a99e2821e00bdf8eeab5121b2211f1))
|
|
221
|
+
|
|
222
|
+
## [2.21.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.21.1...v2.21.2) (2023-05-15)
|
|
223
|
+
|
|
224
|
+
## [2.21.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.21.0...v2.21.1) (2023-05-02)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### Bug Fixes
|
|
228
|
+
|
|
229
|
+
* Remove legacy migrations module ([#500](https://github.com/mParticle/mparticle-web-sdk/issues/500)) ([3132563](https://github.com/mParticle/mparticle-web-sdk/commit/313256321d1c71bade1741830f28be943f8ae669))
|
|
230
|
+
|
|
231
|
+
# [2.21.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.20.3...v2.21.0) (2023-04-18)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### Features
|
|
235
|
+
|
|
236
|
+
* Add Offline Storage for Events and Batches via Feature Flag ([#402](https://github.com/mParticle/mparticle-web-sdk/issues/402)) ([218bbf5](https://github.com/mParticle/mparticle-web-sdk/commit/218bbf58f75165e4f0fc5459193c50a9db132f2a))
|
|
237
|
+
|
|
238
|
+
## [2.20.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.20.2...v2.20.3) (2023-04-10)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Bug Fixes
|
|
242
|
+
|
|
243
|
+
* Revert 2.20.2 ([#491](https://github.com/mParticle/mparticle-web-sdk/issues/491)) ([38dddf9](https://github.com/mParticle/mparticle-web-sdk/commit/38dddf921fc6bd1954effa787989cff6fbd978f5)), closes [#489](https://github.com/mParticle/mparticle-web-sdk/issues/489)
|
|
244
|
+
|
|
245
|
+
## [2.20.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.20.1...v2.20.2) (2023-04-05)
|
|
246
|
+
|
|
247
|
+
### Bug Fixes
|
|
248
|
+
|
|
249
|
+
- Revert 2.20.1 ([#489](https://github.com/mParticle/mparticle-web-sdk/issues/489)) ([0607dab](https://github.com/mParticle/mparticle-web-sdk/commit/0607dab4e9b754de5d7ebc4fd54205a00b2659af)), closes [#485](https://github.com/mParticle/mparticle-web-sdk/issues/485)
|
|
250
|
+
|
|
251
|
+
## [2.20.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.20.0...v2.20.1) (2023-04-05)
|
|
252
|
+
|
|
253
|
+
# [2.20.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.19.3...v2.20.0) (2023-03-15)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### Features
|
|
257
|
+
|
|
258
|
+
* Support sideloaded kits ([#395](https://github.com/mParticle/mparticle-web-sdk/issues/395)) ([aa86073](https://github.com/mParticle/mparticle-web-sdk/commit/aa86073adc768a448b7d443101fd7f086cb34518))
|
|
259
|
+
|
|
260
|
+
## [2.19.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.19.2...v2.19.3) (2023-03-08)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
### Bug Fixes
|
|
264
|
+
|
|
265
|
+
* removeUserAttribute and forwarder filters fix ([#391](https://github.com/mParticle/mparticle-web-sdk/issues/391)) ([838f267](https://github.com/mParticle/mparticle-web-sdk/commit/838f267c858d56bf5a75b0f1f3a19f1bac4fbc79))
|
|
266
|
+
* Verify Batches and events are uploaded in order of creation ([#394](https://github.com/mParticle/mparticle-web-sdk/issues/394)) ([8553331](https://github.com/mParticle/mparticle-web-sdk/commit/8553331fa7e53e9c59901e98a5f45519b2f7d533))
|
|
267
|
+
|
|
268
|
+
## [2.19.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.19.1...v2.19.2) (2023-03-03)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### Bug Fixes
|
|
272
|
+
|
|
273
|
+
* Revert "refactor: Modify BatchUploader to use promises for individual uploads ([#385](https://github.com/mParticle/mparticle-web-sdk/issues/385))" ([#398](https://github.com/mParticle/mparticle-web-sdk/issues/398)) ([bc9de3a](https://github.com/mParticle/mparticle-web-sdk/commit/bc9de3a6dc9a43e62ac2c53c4897a4b02eb5875f))
|
|
274
|
+
|
|
275
|
+
## [2.19.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.19.0...v2.19.1) (2023-02-16)
|
|
276
|
+
|
|
277
|
+
# [2.19.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.18.3...v2.19.0) (2023-02-08)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
### Features
|
|
281
|
+
|
|
282
|
+
* Add Persistence Wrapper ([#388](https://github.com/mParticle/mparticle-web-sdk/issues/388)) ([f4bc3d6](https://github.com/mParticle/mparticle-web-sdk/commit/f4bc3d6548451d0167d6dffb7da73e574a44a069))
|
|
283
|
+
|
|
284
|
+
## [2.18.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.18.2...v2.18.3) (2023-02-01)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
### Bug Fixes
|
|
288
|
+
|
|
289
|
+
* use currentUser consent state as backup if missing in last event ([#384](https://github.com/mParticle/mparticle-web-sdk/issues/384)) ([9493faa](https://github.com/mParticle/mparticle-web-sdk/commit/9493faa67da415ff54eb18ec001bdef537b3cca5))
|
|
290
|
+
|
|
291
|
+
## [2.18.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.18.1...v2.18.2) (2023-01-25)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
### Bug Fixes
|
|
295
|
+
|
|
296
|
+
* Add wrapper SDK name/version setter for diagnostics ([#376](https://github.com/mParticle/mparticle-web-sdk/issues/376)) ([727e8e2](https://github.com/mParticle/mparticle-web-sdk/commit/727e8e2abed705041930cd13ba43204e5d8c2b32))
|
|
297
|
+
|
|
298
|
+
## [2.18.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.18.0...v2.18.1) (2023-01-04)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
### Bug Fixes
|
|
302
|
+
|
|
303
|
+
* Fix Firefox Runner and Remove references to node 12 ([#369](https://github.com/mParticle/mparticle-web-sdk/issues/369)) ([083672f](https://github.com/mParticle/mparticle-web-sdk/commit/083672f8d5056f88c2362e2eab42e92762c17b5d))
|
|
304
|
+
* Prevent Batches from queuing empty events ([#367](https://github.com/mParticle/mparticle-web-sdk/issues/367)) ([4bf8ef9](https://github.com/mParticle/mparticle-web-sdk/commit/4bf8ef96e2cd130e3a9ff83e14047c63987c694f))
|
|
305
|
+
|
|
306
|
+
# [2.18.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.17.4...v2.18.0) (2022-11-08)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
### Bug Fixes
|
|
310
|
+
|
|
311
|
+
* Process queued events after there are no more integration delays ([#365](https://github.com/mParticle/mparticle-web-sdk/issues/365)) ([99910c7](https://github.com/mParticle/mparticle-web-sdk/commit/99910c79849063adcf922c588d6b96bcc984c9f3))
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
### Features
|
|
315
|
+
|
|
316
|
+
* Expose getEnvironment() for mParticle Instance ([#366](https://github.com/mParticle/mparticle-web-sdk/issues/366)) ([378b894](https://github.com/mParticle/mparticle-web-sdk/commit/378b8948cc77edc71625cd07b21a3613a6300ea2))
|
|
317
|
+
|
|
318
|
+
## [2.17.4](https://github.com/mParticle/mparticle-web-sdk/compare/v2.17.3...v2.17.4) (2022-10-11)
|
|
319
|
+
|
|
320
|
+
## [2.17.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.17.2...v2.17.3) (2022-10-03)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
### Bug Fixes
|
|
324
|
+
|
|
325
|
+
* Check for undefined rather than falsey values for UAC events ([#361](https://github.com/mParticle/mparticle-web-sdk/issues/361)) ([2514055](https://github.com/mParticle/mparticle-web-sdk/commit/2514055e2ba7f0dc1b3030a187bafba49b72dbd7))
|
|
326
|
+
|
|
327
|
+
## [2.17.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.17.1...v2.17.2) (2022-09-14)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
### Bug Fixes
|
|
331
|
+
|
|
332
|
+
* Update last event sent timestamp for batch uploads ([#360](https://github.com/mParticle/mparticle-web-sdk/issues/360)) ([4cbb3c5](https://github.com/mParticle/mparticle-web-sdk/commit/4cbb3c55b2702da35dc79db195607ff00aee4f2f))
|
|
333
|
+
|
|
334
|
+
## [2.17.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.17.0...v2.17.1) (2022-08-25)
|
|
335
|
+
|
|
336
|
+
# [2.17.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.16.3...v2.17.0) (2022-08-23)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
### Features
|
|
340
|
+
|
|
341
|
+
* Add custom logger to kits ([#341](https://github.com/mParticle/mparticle-web-sdk/issues/341)) ([76ad737](https://github.com/mParticle/mparticle-web-sdk/commit/76ad73765942cef4ba7a355512283e097b292813))
|
|
342
|
+
|
|
343
|
+
## [2.16.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.16.2...v2.16.3) (2022-07-28)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
### Bug Fixes
|
|
347
|
+
|
|
348
|
+
* prevent errors when onCreateBatch does not return a batch ([#299](https://github.com/mParticle/mparticle-web-sdk/issues/299)) ([c8f085d](https://github.com/mParticle/mparticle-web-sdk/commit/c8f085d8eaac5e8fa6cc1a01eaf70c92dc07b773))
|
|
349
|
+
|
|
350
|
+
## [2.16.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.16.1...v2.16.2) (2022-06-29)
|
|
351
|
+
|
|
352
|
+
## [2.16.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.16.0...v2.16.1) (2022-06-16)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
### Bug Fixes
|
|
356
|
+
|
|
357
|
+
* Rebuild package-lock.json ([#276](https://github.com/mParticle/mparticle-web-sdk/issues/276)) ([a9c8990](https://github.com/mParticle/mparticle-web-sdk/commit/a9c899040a8b49856743a06f8b73cfa10611e232))
|
|
358
|
+
* Remove YUI from package.json ([#266](https://github.com/mParticle/mparticle-web-sdk/issues/266)) ([129e1d1](https://github.com/mParticle/mparticle-web-sdk/commit/129e1d1854c5d4f3ee842308340ab19634e8d71c))
|
|
359
|
+
|
|
360
|
+
# [2.16.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.15.5...v2.16.0) (2022-05-18)
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
### Features
|
|
364
|
+
|
|
365
|
+
* add package to batch application info ([#238](https://github.com/mParticle/mparticle-web-sdk/issues/238)) ([5e6e773](https://github.com/mParticle/mparticle-web-sdk/commit/5e6e773aaa6e4b476a7aa029db04e1b9facdb372))
|
|
366
|
+
* add support for client side rules ([#241](https://github.com/mParticle/mparticle-web-sdk/issues/241)) ([dc40f14](https://github.com/mParticle/mparticle-web-sdk/commit/dc40f14a0ed1cebba5ce4169fa823991be1d3202))
|
|
367
|
+
|
|
368
|
+
## [2.15.5](https://github.com/mParticle/mparticle-web-sdk/compare/v2.15.4...v2.15.5) (2022-05-11)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
### Bug Fixes
|
|
372
|
+
|
|
373
|
+
* add warning of upcoming upgrade for V2 Users ([#237](https://github.com/mParticle/mparticle-web-sdk/issues/237)) ([93d1ad4](https://github.com/mParticle/mparticle-web-sdk/commit/93d1ad47f9d38c22312049913450409a1de1a7a8))
|
|
374
|
+
|
|
375
|
+
## [2.15.4](https://github.com/mParticle/mparticle-web-sdk/compare/v2.15.3...v2.15.4) (2022-05-02)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
### Bug Fixes
|
|
379
|
+
|
|
380
|
+
* add UAC and UIC as upload triggers ([7576509](https://github.com/mParticle/mparticle-web-sdk/commit/75765092840fbf80752fbafd26dae7cceed03e6c))
|
|
381
|
+
|
|
382
|
+
## [2.15.3](https://github.com/mParticle/mparticle-web-sdk/compare/v2.15.2...v2.15.3) (2022-04-28)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
### Bug Fixes
|
|
386
|
+
|
|
387
|
+
* revert slugify removal ([15c6af5](https://github.com/mParticle/mparticle-web-sdk/commit/15c6af591cd6d9f1ef9d665e9d0565ccc080b18d))
|
|
388
|
+
|
|
389
|
+
## [2.15.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.15.1...v2.15.2) (2022-04-27)
|
|
390
|
+
|
|
391
|
+
## [2.15.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.15.0...v2.15.1) (2022-04-20)
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
### Bug Fixes
|
|
395
|
+
|
|
396
|
+
* add validation to prevent null event category from sending ([#358](https://github.com/mParticle/mparticle-web-sdk/issues/358)) ([cc93497](https://github.com/mParticle/mparticle-web-sdk/commit/cc934975a196e0f5c20ab834e9f9026fbb7f53db))
|
|
397
|
+
* decode cookie error on special character attributes ([#365](https://github.com/mParticle/mparticle-web-sdk/issues/365)) ([9237a44](https://github.com/mParticle/mparticle-web-sdk/commit/9237a449d7eb5b7e8910ff3cd584e60929efaf9d))
|
|
398
|
+
* ensure sessions/AST initialize before identity callback ([#360](https://github.com/mParticle/mparticle-web-sdk/issues/360)) ([2663a57](https://github.com/mParticle/mparticle-web-sdk/commit/2663a57a23d0b478cc149d1b7361f72a3e1c68f0))
|
|
399
|
+
|
|
400
|
+
# [2.15.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.14.2...v2.15.0) (2022-03-01)
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
### Bug Fixes
|
|
404
|
+
|
|
405
|
+
* prevent erroneous event logging to kits when an event is not sent ([dfc0f4f](https://github.com/mParticle/mparticle-web-sdk/commit/dfc0f4f260e5e608d86d75e2f426889b8864c581))
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
### Features
|
|
409
|
+
|
|
410
|
+
* add API to set device id ([#341](https://github.com/mParticle/mparticle-web-sdk/issues/341)) ([b81e4d3](https://github.com/mParticle/mparticle-web-sdk/commit/b81e4d30fd502ad6d76cfc4d1f95c91602975738))
|
|
411
|
+
* add isInitialized to mParticle object ([5fbc9df](https://github.com/mParticle/mparticle-web-sdk/commit/5fbc9dffecaf187a08eab464428a5e75048f89d3))
|
|
412
|
+
|
|
413
|
+
## [2.14.2](https://github.com/mParticle/mparticle-web-sdk/compare/v2.14.1...v2.14.2) (2022-02-09)
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### Bug Fixes
|
|
417
|
+
|
|
418
|
+
* Refactor Public methods to queue if Store is not initialized ([#311](https://github.com/mParticle/mparticle-web-sdk/issues/311)) ([27d506c](https://github.com/mParticle/mparticle-web-sdk/commit/27d506cb06d0cb4f5e50b9a7175c1113d5f42b0c))
|
|
419
|
+
* Update cookie sync date only upon successful cookie sync ([48d6fe1](https://github.com/mParticle/mparticle-web-sdk/commit/48d6fe179c3b9952a89661c785fb4af6ce4f8b23))
|
|
420
|
+
* update reusable workflow urls ([#265](https://github.com/mParticle/mparticle-web-sdk/issues/265)) ([1c334d3](https://github.com/mParticle/mparticle-web-sdk/commit/1c334d3eeccb481aa100f232146269018da2323e))
|
|
421
|
+
|
|
422
|
+
## [2.14.1](https://github.com/mParticle/mparticle-web-sdk/compare/v2.14.0...v2.14.1) (2021-09-02)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
### Bug Fixes
|
|
426
|
+
|
|
427
|
+
* Add launch_referrer to event data ([cd7dc62](https://github.com/mParticle/mparticle-web-sdk/commit/cd7dc622016ebba0fd190a0d029de4c45afdbc38))
|
|
428
|
+
* Allow multiple promotions to be logged when calling logPromotion ([9e0dd5b](https://github.com/mParticle/mparticle-web-sdk/commit/9e0dd5b22da657d5a4274d80c38eaab64f57182d))
|
|
429
|
+
|
|
430
|
+
# [2.14.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.13.0...v2.14.0) (2021-08-04)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
### Bug Fixes
|
|
434
|
+
|
|
435
|
+
* globalThis is not defined ([3a849c6](https://github.com/mParticle/mparticle-web-sdk/commit/3a849c68a284fa21eb370836accca7fb584e30dd))
|
|
436
|
+
* Update semantic release secret name ([0824ef5](https://github.com/mParticle/mparticle-web-sdk/commit/0824ef57e6ea795702d631051fc02d52d2b8fb6a))
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
### Features
|
|
440
|
+
|
|
441
|
+
* Allow scope param on user alias requests ([a864aef](https://github.com/mParticle/mparticle-web-sdk/commit/a864aefc2db11d63d57174e92b6c5965a93471a8))
|
|
442
|
+
|
|
443
|
+
# [2.13.0](https://github.com/mParticle/mparticle-web-sdk/compare/v2.12.9...v2.13.0) (2021-07-29)
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
### Features
|
|
447
|
+
|
|
448
|
+
* Bypass functionality when a specific config option is passed ([#159](https://github.com/mParticle/mparticle-web-sdk/issues/159)) ([2727a43](https://github.com/mParticle/mparticle-web-sdk/commit/2727a437a6d0a25481c9120b3c93fd23fb520f37))
|
|
449
|
+
|
|
450
|
+
## [2.12.9](https://github.com/mParticle/mparticle-web-sdk/compare/v2.12.8...v2.12.9) (2021-06-23)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
### Bug Fixes
|
|
454
|
+
|
|
455
|
+
* Update esm/common rollup.config to prevent regenerator runtime issue ([2ff362f](https://github.com/mParticle/mparticle-web-sdk/commit/2ff362f5243659cdefd4863609c1c93d5e76fc66))
|
|
456
|
+
|
|
457
|
+
## Releases
|
|
458
|
+
|
|
459
|
+
--
|
|
460
|
+
|
|
461
|
+
#### 2020-05-06
|
|
462
|
+
|
|
463
|
+
- Any new workspaces with JS API Keys will now batch all web events in order to save bandwidth and improve site performance. To read more about web batching see here - https://docs.mparticle.com/developers/sdk/web/getting-started#upload-interval--batching. This does not require any updates to the SDK itself. No implementation changes are required. If you have a workspace created prior to 2020-05-06 and are not yet on batching, please contact your Customer Success Manager.
|
|
464
|
+
|
|
465
|
+
#### 2.12.8 - 2021-04-06
|
|
466
|
+
|
|
467
|
+
- Bugfix: Rename pageViewFilters to screenAttributeFilters
|
|
468
|
+
Enables screen attributes to be filtered out on downstream forwarders
|
|
469
|
+
|
|
470
|
+
#### 2.12.7 - 2021-03-25
|
|
471
|
+
|
|
472
|
+
- Bugfix - Add product impressions to kit blocking
|
|
473
|
+
- Feat - Consent-based cookie-sync
|
|
474
|
+
- Bugfix - Add source message id
|
|
475
|
+
|
|
476
|
+
#### 2.12.5 - 2021-02-17
|
|
477
|
+
|
|
478
|
+
- Bugfix - Use addEventListeners for life cycle events
|
|
479
|
+
- Bugfix - Set setCurrencyCode on eCommerce object
|
|
480
|
+
|
|
481
|
+
#### 2.12.4 - 2021-02-09
|
|
482
|
+
|
|
483
|
+
- Refactor - Import version from package.json
|
|
484
|
+
- Format code styling
|
|
485
|
+
|
|
486
|
+
#### 2.12.3 - 2021-01-20
|
|
487
|
+
|
|
488
|
+
- Bugfix - update is first run to booleans
|
|
489
|
+
- Bugfix - Sanitize ecommerce amounts to numbers
|
|
490
|
+
- Bugfix - Set sessionStartDate to 0 instead of null
|
|
491
|
+
- Bugfix - Error events - Set to null if stack trace is undefined; Add context to error events
|
|
492
|
+
|
|
493
|
+
#### 2.12.2 - 2020-11-12
|
|
494
|
+
|
|
495
|
+
- Bugfix - Fix data plan options API
|
|
496
|
+
- Bugfix - Add try/catch to cookie searching
|
|
497
|
+
|
|
498
|
+
#### 2.12.1 - 2020-11-11
|
|
499
|
+
|
|
500
|
+
- Fix Typo in logging
|
|
501
|
+
- Update identity mappings
|
|
502
|
+
- Bugfix - Add check for window for node environments
|
|
503
|
+
|
|
504
|
+
#### 2.12.0 - 2020-10-29
|
|
505
|
+
|
|
506
|
+
- Feat - Implement client side kit blocking
|
|
507
|
+
You can now use Data Master to block unplanned events and attributes from being sent to client side forwarders.
|
|
508
|
+
|
|
509
|
+
#### 2.11.16 - 2020-10-26
|
|
510
|
+
|
|
511
|
+
- Remove eventsApiModels.ts in favor of js-events npm module
|
|
512
|
+
- Feat - Add event and product context to sanitized attributes
|
|
513
|
+
- Add logic to handle Media Events as Custom Events
|
|
514
|
+
- Add additional tests for app name change in config
|
|
515
|
+
|
|
516
|
+
#### 2.11.15 - 2020-06-30
|
|
517
|
+
|
|
518
|
+
- Feat - Add transactionAttributes to logProductAction method signature
|
|
519
|
+
|
|
520
|
+
#### 2.11.14 - 2020-06-24
|
|
521
|
+
|
|
522
|
+
- Bugfix - Make tagging batches with appropriate UI more robust
|
|
523
|
+
|
|
524
|
+
#### 2.11.13 - 2020-06-17
|
|
525
|
+
|
|
526
|
+
- Bugfix - prevent null CCPA consent on events v3 endpoint
|
|
527
|
+
|
|
528
|
+
#### 2.11.12 - 2020-06-03
|
|
529
|
+
|
|
530
|
+
- Bugfix - logProductActions of purchase/refund conform to logPurchase/logRefund
|
|
531
|
+
|
|
532
|
+
#### 2.11.11 - 2020-05-12
|
|
533
|
+
|
|
534
|
+
- Feat - Add Other5-Other10, mobile/phone number identity types
|
|
535
|
+
|
|
536
|
+
#### 2.11.10 - 2020-04-23
|
|
537
|
+
|
|
538
|
+
- Bugfix - Fix v3 events endpoint location payload
|
|
539
|
+
|
|
540
|
+
#### 2.11.9 - 2020-04-02
|
|
541
|
+
|
|
542
|
+
- Bugfix - Send specific user along with UIC and UAC Events
|
|
543
|
+
- Dependabot - Bump Acorn version
|
|
544
|
+
|
|
545
|
+
#### 2.11.8 - 2020-03-16
|
|
546
|
+
|
|
547
|
+
- Don't set empty TransactionAttribute fields
|
|
548
|
+
|
|
549
|
+
#### 2.11.7 - 2020-03-04
|
|
550
|
+
|
|
551
|
+
- Deprecate removeCCPAState in favor of removeCCPAConsentState
|
|
552
|
+
- Feat - XHR Support for Batching
|
|
553
|
+
|
|
554
|
+
#### 2.11.6 - 2020-02-26
|
|
555
|
+
|
|
556
|
+
- Migrate network tests from local Mockhttprequest to Sinon
|
|
557
|
+
- Bugfix - Flush eventQueue after identity callback
|
|
558
|
+
|
|
559
|
+
#### 2.11.5 - 2020-02-12
|
|
560
|
+
|
|
561
|
+
- Update node version for Travis
|
|
562
|
+
- Api docs update
|
|
563
|
+
- Bugfix - Enable configuration of v1 endpoints
|
|
564
|
+
|
|
565
|
+
#### 2.11.4 - 2020-02-06
|
|
566
|
+
|
|
567
|
+
- Feat - Modify reset API for public consumption
|
|
568
|
+
- Feat - Import @mparticle/event-models to replace eventApiModels
|
|
569
|
+
- Bugfix - Typo & keep persistence checking consistent
|
|
570
|
+
|
|
571
|
+
#### 2.11.3 - 2020-02-04
|
|
572
|
+
|
|
573
|
+
- Update package.json (Add mparticle.js to dist/ for partner kit testing)
|
|
574
|
+
|
|
575
|
+
#### 2.11.2 - 2020-02-01
|
|
576
|
+
|
|
577
|
+
- Feat - Add support for custom v3 URL
|
|
578
|
+
|
|
579
|
+
#### 2.11.1 - 2020-01-29
|
|
580
|
+
|
|
581
|
+
- Bugfix - resolve when browser has disabled localStorage
|
|
582
|
+
- Bugfix - Do not log deprecated warnings when logging purchases
|
|
583
|
+
- Feat - Add support for Data Planning to V2 Events upload
|
|
584
|
+
|
|
585
|
+
#### 2.11.0 - 2020-01-16
|
|
586
|
+
|
|
587
|
+
- Feat - Add CCPA support
|
|
588
|
+
- Add batch creator class for ESLint data planning plugin
|
|
589
|
+
|
|
590
|
+
#### 2.10.2 - 2019-12-19
|
|
591
|
+
|
|
592
|
+
- Feat - Pass appName to config
|
|
593
|
+
|
|
594
|
+
#### 2.10.1 - 2019-12-11
|
|
595
|
+
|
|
596
|
+
- Bugfix - Do not populate data plan context when plan id is null
|
|
597
|
+
|
|
598
|
+
#### 2.10.0 - 2019-11-13
|
|
599
|
+
|
|
600
|
+
- Feat - Implement Multiple Instances
|
|
601
|
+
|
|
602
|
+
#### 2.9.16 - 2019-11-06
|
|
603
|
+
|
|
604
|
+
- Bugfix - Parse string in shouldEnableBatching
|
|
605
|
+
|
|
606
|
+
#### 2.9.15 - 2019-11-06
|
|
607
|
+
|
|
608
|
+
- Deprecate Cart - The mParticle functionality will be removed in a future release, please
|
|
609
|
+
- Bugfix - Self hosting namespaces storage with workspaceToken again
|
|
610
|
+
|
|
611
|
+
#### 2.9.14 - 2019-10-31
|
|
612
|
+
|
|
613
|
+
- Remove mparticle.js from root
|
|
614
|
+
- Feat - Stub logBaseEvent in snippet, add snippet comments
|
|
615
|
+
- Feat - Implement User Identity Change & User Attribute Change Events
|
|
616
|
+
- Allow MediaEvents and Media PageEvents to be supported
|
|
617
|
+
- Happy Halloween! :jack_o_lantern:
|
|
618
|
+
|
|
619
|
+
#### 2.9.13 - 2019-10-09
|
|
620
|
+
|
|
621
|
+
- Refactor codebase with Prettier
|
|
622
|
+
- Bugfix - Resolve Sonarqube code smells
|
|
623
|
+
- Modify Rollup builds
|
|
624
|
+
|
|
625
|
+
#### 2.9.12 - 2019-10-02
|
|
626
|
+
|
|
627
|
+
- Support event batching and beacon API; provide new Events API v3 endpoint which supports batching
|
|
628
|
+
- Implement Typescript and Babel compilation
|
|
629
|
+
- Feat - Enable configuration of config endpoint
|
|
630
|
+
|
|
631
|
+
#### 2.9.11 - 2019-09-26
|
|
632
|
+
|
|
633
|
+
- Feat - Add Base Event functionality to core for future child SDK use
|
|
634
|
+
- Update .eslintrc, fix urls in yuidoc comments
|
|
635
|
+
|
|
636
|
+
#### 2.9.10 - 2019-08-21
|
|
637
|
+
|
|
638
|
+
- Add integration tests for bundlers (webpack, browserify, rollup)
|
|
639
|
+
- Bugfix - Make getCartProducts more robust
|
|
640
|
+
- Bugfix - Fix immediate logging for self hosting
|
|
641
|
+
- Feat - add session start to server DTO
|
|
642
|
+
- Bugfix - update modify old_value
|
|
643
|
+
|
|
644
|
+
#### 2.9.9 - 2019-08-07
|
|
645
|
+
|
|
646
|
+
- Bugfix - Check all event attributes when forwarding rules are set
|
|
647
|
+
|
|
648
|
+
#### 2.9.8 - 2019-08-07
|
|
649
|
+
|
|
650
|
+
- Migrate to ES6 Modules; Replace Browserify with Rollup
|
|
651
|
+
|
|
652
|
+
#### 2.9.7 - 2019-07-16
|
|
653
|
+
|
|
654
|
+
- Bugfix - noHttpCoverage code properly sent to callback
|
|
655
|
+
- Bugfix - Configure forwarders prior to identify callback
|
|
656
|
+
|
|
657
|
+
#### 2.9.6 - 2019-07-08
|
|
658
|
+
|
|
659
|
+
- Bugfix - Alias requests respect isDevelopmentMode setting
|
|
660
|
+
|
|
661
|
+
#### 2.9.5 - 2019-07-01
|
|
662
|
+
|
|
663
|
+
- Bugfix - set isInitialized in both web and webview contexts
|
|
664
|
+
- Feature: log error custom attributes
|
|
665
|
+
- Update build parameters
|
|
666
|
+
|
|
667
|
+
#### 2.9.4 - 2019-06-25
|
|
668
|
+
|
|
669
|
+
- Modify files for self hosting
|
|
670
|
+
- Add a /config endpoint
|
|
671
|
+
- Accept 2nd argument to init for configuration
|
|
672
|
+
- Bugfix - Initialize Logger before Store
|
|
673
|
+
|
|
674
|
+
#### 2.9.3 - 2019-06-20
|
|
675
|
+
|
|
676
|
+
- Bugfix - retain mParticle.isIOS on script load
|
|
677
|
+
|
|
678
|
+
#### 2.9.2 - 2019-06-10
|
|
679
|
+
|
|
680
|
+
- Bugfix - respect mParticle.isIOS setting
|
|
681
|
+
|
|
682
|
+
#### 2.9.1 - 2019-06-05
|
|
683
|
+
|
|
684
|
+
- Make endpoints configurable
|
|
685
|
+
|
|
686
|
+
#### 2.9.0 - 2019-05-28
|
|
687
|
+
|
|
688
|
+
- Implement User Aliasing
|
|
689
|
+
- Bugfixes - Helpers.debug & set isFirstRun to false after app inits for the first time
|
|
690
|
+
|
|
691
|
+
#### 2.8.12 - 2019-05-08
|
|
692
|
+
|
|
693
|
+
- Implement firstSeen and lastSeen fields for MParticleUser
|
|
694
|
+
- Sort MParticleUser Array returned by getUsers() by lastSeenTime
|
|
695
|
+
- Bugfix - Callback validation & correct warning message
|
|
696
|
+
- Add getPreviousUser() to Identity callbacks
|
|
697
|
+
|
|
698
|
+
#### 2.8.11 - 2019-04-24
|
|
699
|
+
|
|
700
|
+
- Refactor config into a class
|
|
701
|
+
- Implement Logger
|
|
702
|
+
- Fix consent object validation and remove unneeded null check
|
|
703
|
+
|
|
704
|
+
#### 2.8.10 - 2019-04-10
|
|
705
|
+
|
|
706
|
+
- Prefer modules over public mParticle methods
|
|
707
|
+
|
|
708
|
+
#### 2.8.9 - 2019-03-13
|
|
709
|
+
|
|
710
|
+
- Simplify / remove migrations
|
|
711
|
+
|
|
712
|
+
#### 2.8.8 - 2019-02-20
|
|
713
|
+
|
|
714
|
+
- Bugfix - Native SDK - prioritize equality of requiredWebviewBridgeName
|
|
715
|
+
|
|
716
|
+
#### 2.8.7 - 2019-02-14
|
|
717
|
+
|
|
718
|
+
- Update native bridge logic
|
|
719
|
+
|
|
720
|
+
#### 2.8.6 - 2019-02-14
|
|
721
|
+
|
|
722
|
+
- Namespace localstorage with workspace token
|
|
723
|
+
|
|
724
|
+
#### 2.8.5 - 2019-02-13
|
|
725
|
+
|
|
726
|
+
- Add callback to location tracking method
|
|
727
|
+
|
|
728
|
+
#### 2.8.4 - 2019-02-04
|
|
729
|
+
|
|
730
|
+
- Set session attributes when using native bridge
|
|
731
|
+
|
|
732
|
+
#### 2.8.3 - 2019-01-30
|
|
733
|
+
|
|
734
|
+
- Bugfix - Check for LocalStorage before migrating
|
|
735
|
+
|
|
736
|
+
#### 2.8.2 - 2019-01-25
|
|
737
|
+
|
|
738
|
+
- Bugfix - Guard against undefined result from crypto API
|
|
739
|
+
- Bugfix - Call identify if cookies exist, but there is no current user
|
|
740
|
+
|
|
741
|
+
#### 2.8.1 - 2019-01-23
|
|
742
|
+
|
|
743
|
+
- Add identityMethod to onUserIdentified function definition
|
|
744
|
+
- Bugfix - return 0 instead of null for hashing boolean false
|
|
745
|
+
|
|
746
|
+
#### 2.8.0 - 2018-12-19
|
|
747
|
+
|
|
748
|
+
- Fix autogen yuidocs comments
|
|
749
|
+
- Add get/setIntegrationAttribute APIs
|
|
750
|
+
- Add snippet tests
|
|
751
|
+
- Add boolean validation for isDevelopmentMode
|
|
752
|
+
|
|
753
|
+
#### 2.7.8 - 2018-10-24
|
|
754
|
+
|
|
755
|
+
- Initialize forwarders based on logged in status
|
|
756
|
+
|
|
757
|
+
#### 2.7.7 - 2018-10-15
|
|
758
|
+
|
|
759
|
+
- Bugfix - remove cart item uses proper product persistence
|
|
760
|
+
- Bugfix - Guard against corrupt local storage/cookies
|
|
761
|
+
|
|
762
|
+
#### 2.7.6 - 2018-10-10
|
|
763
|
+
|
|
764
|
+
- Bugfix - guard against null cookie
|
|
765
|
+
|
|
766
|
+
#### 2.7.5 - 2018-09-19
|
|
767
|
+
|
|
768
|
+
- Add getUser method to identity callback results
|
|
769
|
+
- Only call initial identify and callback once
|
|
770
|
+
- Bugfix - logLevel
|
|
771
|
+
|
|
772
|
+
#### 2.7.4 - 2018-09-14
|
|
773
|
+
|
|
774
|
+
- Bugfix - Remove corrupt localStorage
|
|
775
|
+
- Bugfix - Fix encoding LS for special characters
|
|
776
|
+
|
|
777
|
+
#### 2.7.3 - 2018-08-30
|
|
778
|
+
|
|
779
|
+
- Bugfix - Always init forwarder when no UA filters are present
|
|
780
|
+
|
|
781
|
+
#### 2.7.2 - 2018-08-22
|
|
782
|
+
|
|
783
|
+
- Re-initialize forwarders after userAttr changes
|
|
784
|
+
- Capitalize all letters in sessionId
|
|
785
|
+
|
|
786
|
+
#### 2.7.1 - 2018-08-10
|
|
787
|
+
|
|
788
|
+
- Bugfix - Create copy of MP.eventQueue to iterate through
|
|
789
|
+
|
|
790
|
+
#### 2.7.0 - 2018-08-08
|
|
791
|
+
|
|
792
|
+
- Add setUserAttributes to public API
|
|
793
|
+
|
|
794
|
+
#### 2.6.4 - 2018-08-01
|
|
795
|
+
|
|
796
|
+
- Implement forwarderUploader module, feaure flags, batch forwarder stats
|
|
797
|
+
- Bugfix - Change ProductActionTypes to be consistent with mobile/S2S
|
|
798
|
+
|
|
799
|
+
#### 2.6.3 - 2018-07-18
|
|
800
|
+
|
|
801
|
+
- Implement customFlags per public API method
|
|
802
|
+
|
|
803
|
+
#### 2.6.2 - 2018-07-16
|
|
804
|
+
|
|
805
|
+
- Update growl and hoek for testing dependencies
|
|
806
|
+
- Bugfix - sendEventToForwarder fix
|
|
807
|
+
|
|
808
|
+
#### 2.6.1 - 2018-07-11
|
|
809
|
+
|
|
810
|
+
- Default forceHttps to true
|
|
811
|
+
- Add apiClient module
|
|
812
|
+
|
|
813
|
+
#### 2.6.0 - 2018-06-20
|
|
814
|
+
|
|
815
|
+
- Implement Consent forwarding rules
|
|
816
|
+
|
|
817
|
+
#### 2.5.1 - 2018-06-11
|
|
818
|
+
|
|
819
|
+
- Bugfix - Fix filterUserAttributeValues break/continue
|
|
820
|
+
|
|
821
|
+
#### 2.5.0 - 2018-06-06
|
|
822
|
+
|
|
823
|
+
- Expose getUser and getUsers to public Identity API
|
|
824
|
+
- Bugfix - send newUser to forwarder on user identified
|
|
825
|
+
- Add filtered user object
|
|
826
|
+
|
|
827
|
+
#### 2.4.1 - 2018-05-09
|
|
828
|
+
|
|
829
|
+
- Bugfix - encode event value before sending to iOS
|
|
830
|
+
- Update package-lock.json to pass CI tests
|
|
831
|
+
|
|
832
|
+
#### 2.4.0 - 2018-04-26
|
|
833
|
+
|
|
834
|
+
- Implement Consent State
|
|
835
|
+
- Expose Identitiy HTTP constants to the public
|
|
836
|
+
|
|
837
|
+
#### 2.3.3 - 2018-04-19
|
|
838
|
+
|
|
839
|
+
- Bugfix - filter user attributes to forwarders on init
|
|
840
|
+
|
|
841
|
+
#### 2.3.2 - 2018-04-04
|
|
842
|
+
|
|
843
|
+
- Bugfix - filter user attributes to forwarders on init
|
|
844
|
+
|
|
845
|
+
#### 2.3.1 - 2018-04-02
|
|
846
|
+
|
|
847
|
+
- Bugfix - Compare strings when filtering event/user attribute values
|
|
848
|
+
|
|
849
|
+
#### 2.3.0 - 2018-03-28
|
|
850
|
+
|
|
851
|
+
- Bugfix - Prioritize client entered config over persistence
|
|
852
|
+
- Bugfix - Correct capitalization of clearing eCommerce carts
|
|
853
|
+
- Add Identify to public API
|
|
854
|
+
|
|
855
|
+
#### 2.2.6 - 2018-03-07
|
|
856
|
+
|
|
857
|
+
- Add forceHttps as a config option
|
|
858
|
+
- Fix linting
|
|
859
|
+
- Migrate all mpids between cookies and LS when useCookieStorage changes
|
|
860
|
+
|
|
861
|
+
#### 2.2.5 - 2018-03-01
|
|
862
|
+
|
|
863
|
+
- Bugfix - add shouldUseNativeSdk logic to fix null user and null path values
|
|
864
|
+
|
|
865
|
+
#### 2.2.4 - 2018-02-28
|
|
866
|
+
|
|
867
|
+
- Add config option for maxCookieSize
|
|
868
|
+
- Refactor useNativeSdk and prevent identify calls when in webview
|
|
869
|
+
|
|
870
|
+
#### 2.2.3 - 2018-02-23
|
|
871
|
+
|
|
872
|
+
- Update logic for useNativeSdk and isIOS
|
|
873
|
+
|
|
874
|
+
#### 2.2.2 - 2018-02-20
|
|
875
|
+
|
|
876
|
+
- Pass identityApiData to native SDKs
|
|
877
|
+
|
|
878
|
+
#### 2.2.1 - 2018-02-14
|
|
879
|
+
|
|
880
|
+
- Queue events when mpid is null or 0
|
|
881
|
+
- Stub primary methods for pre-loading SDK invocation
|
|
882
|
+
- Add eventSubscriptionId to forwarder contract
|
|
883
|
+
- Update readme to remove adchemix
|
|
884
|
+
|
|
885
|
+
#### 2.2.0 - 2018-01-31
|
|
886
|
+
|
|
887
|
+
- Remove product bags
|
|
888
|
+
|
|
889
|
+
#### 2.1.5 - 2018-01-25
|
|
890
|
+
|
|
891
|
+
- Update version endpoint for /Forwarding
|
|
892
|
+
|
|
893
|
+
#### 2.1.4 - 2018-01-10
|
|
894
|
+
|
|
895
|
+
- Ensure customerid is always the first identity being set
|
|
896
|
+
- Auto generate API docs
|
|
897
|
+
- Add migration for base64 encoded products
|
|
898
|
+
- Finalize Other IDs
|
|
899
|
+
- Bugfix - Adjust logic for session end event
|
|
900
|
+
|
|
901
|
+
#### 2.1.3 - 2017-12-20
|
|
902
|
+
|
|
903
|
+
- Remove logLTVIncrease
|
|
904
|
+
- Return an empty array when there are no cart products
|
|
905
|
+
- Bugfix - Adjust arguments for applyToForwarders
|
|
906
|
+
|
|
907
|
+
#### 2.1.2 - 2017-12-14
|
|
908
|
+
|
|
909
|
+
- Add setForwarderOnUserIdentified, return null currentUser when MPID is null
|
|
910
|
+
|
|
911
|
+
#### 2.1.1 - 2017-12-13
|
|
912
|
+
|
|
913
|
+
- Modularize tests for readability and robustness
|
|
914
|
+
- Adjust Application State Transition, include initial location
|
|
915
|
+
- Bugfix - Add CheckoutOption to ProductAction-related switch statements
|
|
916
|
+
- Add parseStringOrNumber function
|
|
917
|
+
- Sanitize additional attributes
|
|
918
|
+
- Correct order of internal createProducts arguments
|
|
919
|
+
- Refactor logPageView
|
|
920
|
+
- Require explicit UIWebview binding
|
|
921
|
+
|
|
922
|
+
#### 2.1.0 - 2017-11-30
|
|
923
|
+
|
|
924
|
+
- Migrate persistence to v4
|
|
925
|
+
- Add onUserAlias callback
|
|
926
|
+
|
|
927
|
+
#### 2.0.13 - 2017-11-08
|
|
928
|
+
|
|
929
|
+
- Add support for filtering user attribute values
|
|
930
|
+
- Update persistence after a modify call
|
|
931
|
+
|
|
932
|
+
#### 2.0.12 - 2017-10-23
|
|
933
|
+
|
|
934
|
+
- Complete modularization of SDK
|
|
935
|
+
|
|
936
|
+
#### 2.0.11 - 2017-10-19
|
|
937
|
+
|
|
938
|
+
- Modularize Types, Constants, Helpers, DTO, Identity, Ecommerce
|
|
939
|
+
- Reorganize tests
|
|
940
|
+
|
|
941
|
+
#### 2.0.10 - 2017-10-17
|
|
942
|
+
|
|
943
|
+
- Bugfix - Execute useLocalStorage method
|
|
944
|
+
|
|
945
|
+
#### 1.14.1 - 2017-06-22
|
|
946
|
+
|
|
947
|
+
- Fixes for cookie syncing. Properly cookie sync when MPID changes, and only perform a cookie sync when debug modes for defined pixel and mParticle match
|
|
948
|
+
- Store productBags and cartProducts to cookies, with config option to change number of products allowed in each (config.maxProducts = 20 by default)
|
|
949
|
+
- Prevent setUserIdentity from accepting booleans
|
|
950
|
+
- Clean up code - Add additional validations, convert remaining == to ===
|
|
951
|
+
|
|
952
|
+
#### 1.14.0 - 2017-06-15
|
|
953
|
+
|
|
954
|
+
- Support for cookie-syncing. Cookie-syncing enables the optional collection of 3rd-party IDs to enable enhanced audience sharing with advertising platforms such as DoubleClick, Adobe, and AppNexus
|
|
955
|
+
- Add application state transition to mParticle initialization
|
|
956
|
+
|
|
957
|
+
#### 1.13.1 - 2017-05-25
|
|
958
|
+
|
|
959
|
+
- Fix for removing duplicate user identities where ID is missing, allow ID to be `undefined`
|
|
960
|
+
- Fix for creating CGID on initial load
|
|
961
|
+
|
|
962
|
+
#### 1.13.0 - 2017-05-18
|
|
963
|
+
|
|
964
|
+
- Send sessionLength to server when sessionEnd is called.
|
|
965
|
+
|
|
966
|
+
#### 1.12.0 - 2017-05-11
|
|
967
|
+
|
|
968
|
+
- Add deviceId, and deviceId retrieval via `mParticle.getDeviceId()`.
|
|
969
|
+
|
|
970
|
+
#### 1.11.0 - 2017-04-27
|
|
971
|
+
|
|
972
|
+
- Add new session management.
|
|
973
|
+
- Fixed a bug where the same sessionId may be associated with events over several days.
|
|
974
|
+
|
|
975
|
+
#### 1.10.0 - 2017-04-20
|
|
976
|
+
|
|
977
|
+
- Added config option for useCookieStorage to allow use of either cookies or localStorage. By default, localStorage is used (useCookieStorage = false). If localStorage not available, reverts to cookie use.
|
|
978
|
+
- Fixed a bug where `forwarders` contained a mix of both initialized and uninitialized forwarders. `forwarders` now only contains initialized forwarders.
|
|
979
|
+
|
|
980
|
+
#### 1.9.0 - 2017-04-17
|
|
981
|
+
|
|
982
|
+
- Fixed bug where calling setUserIdentity with a similar type added another identity, rather than replacing the identity.
|
|
983
|
+
- Calling setUserIdentity with `id = null` and valid type will remove the user identity of that type.
|
|
984
|
+
- Include CommerceEvent custom attributions in expansion; makes a copy of the original commerce event rather than referencing it, which would mutate it.
|
package/dist/mparticle.common.js
CHANGED
|
@@ -154,7 +154,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
154
154
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
var version = "2.
|
|
157
|
+
var version = "2.30.1";
|
|
158
158
|
|
|
159
159
|
var Constants={sdkVersion:version,sdkVendor:"mparticle",platform:"web",Messages:{DeprecationMessages:{MethodIsDeprecatedPostfix:"is a deprecated method and will be removed in future releases",AlternativeMethodPrefix:"Please use the alternate method:"},ErrorMessages:{NoToken:"A token must be specified.",EventNameInvalidType:"Event name must be a valid string value.",EventDataInvalidType:"Event data must be a valid object hash.",LoggingDisabled:"Event logging is currently disabled.",CookieParseError:"Could not parse cookie",EventEmpty:"Event object is null or undefined, cancelling send",APIRequestEmpty:"APIRequest is null or undefined, cancelling send",NoEventType:"Event type must be specified.",TransactionIdRequired:"Transaction ID is required",TransactionRequired:"A transaction attributes object is required",PromotionIdRequired:"Promotion ID is required",BadAttribute:"Attribute value cannot be object or array",BadKey:"Key value cannot be object or array",BadLogPurchase:"Transaction attributes and a product are both required to log a purchase, https://docs.mparticle.com/?javascript#measuring-transactions",AudienceAPINotEnabled:"Your workspace is not enabled to retrieve user audiences."},InformationMessages:{CookieSearch:"Searching for cookie",CookieFound:"Cookie found, parsing values",CookieNotFound:"Cookies not found",CookieSet:"Setting cookie",CookieSync:"Performing cookie sync",SendBegin:"Starting to send event",SendIdentityBegin:"Starting to send event to identity server",SendWindowsPhone:"Sending event to Windows Phone container",SendIOS:"Calling iOS path: ",SendAndroid:"Calling Android JS interface method: ",SendHttp:"Sending event to mParticle HTTP service",SendAliasHttp:"Sending alias request to mParticle HTTP service",SendIdentityHttp:"Sending event to mParticle HTTP service",StartingNewSession:"Starting new Session",StartingLogEvent:"Starting to log event",StartingLogOptOut:"Starting to log user opt in/out",StartingEndSession:"Starting to end session",StartingInitialization:"Starting to initialize",StartingLogCommerceEvent:"Starting to log commerce event",StartingAliasRequest:"Starting to Alias MPIDs",LoadingConfig:"Loading configuration options",AbandonLogEvent:"Cannot log event, logging disabled or developer token not set",AbandonAliasUsers:"Cannot Alias Users, logging disabled or developer token not set",AbandonStartSession:"Cannot start session, logging disabled or developer token not set",AbandonEndSession:"Cannot end session, logging disabled or developer token not set",NoSessionToEnd:"Cannot end session, no active session found"},ValidationMessages:{ModifyIdentityRequestUserIdentitiesPresent:"identityRequests to modify require userIdentities to be present. Request not sent to server. Please fix and try again",IdentityRequesetInvalidKey:"There is an invalid key on your identityRequest object. It can only contain a `userIdentities` object and a `onUserAlias` function. Request not sent to server. Please fix and try again.",OnUserAliasType:"The onUserAlias value must be a function.",UserIdentities:"The userIdentities key must be an object with keys of identityTypes and values of strings. Request not sent to server. Please fix and try again.",UserIdentitiesInvalidKey:"There is an invalid identity key on your `userIdentities` object within the identityRequest. Request not sent to server. Please fix and try again.",UserIdentitiesInvalidValues:"All user identity values must be strings or null. Request not sent to server. Please fix and try again.",AliasMissingMpid:"Alias Request must contain both a destinationMpid and a sourceMpid",AliasNonUniqueMpid:"Alias Request's destinationMpid and sourceMpid must be unique",AliasMissingTime:"Alias Request must have both a startTime and an endTime",AliasStartBeforeEndTime:"Alias Request's endTime must be later than its startTime"}},NativeSdkPaths:{LogEvent:"logEvent",SetUserTag:"setUserTag",RemoveUserTag:"removeUserTag",SetUserAttribute:"setUserAttribute",RemoveUserAttribute:"removeUserAttribute",SetSessionAttribute:"setSessionAttribute",AddToCart:"addToCart",RemoveFromCart:"removeFromCart",ClearCart:"clearCart",LogOut:"logOut",SetUserAttributeList:"setUserAttributeList",RemoveAllUserAttributes:"removeAllUserAttributes",GetUserAttributesLists:"getUserAttributesLists",GetAllUserAttributes:"getAllUserAttributes",Identify:"identify",Logout:"logout",Login:"login",Modify:"modify",Alias:"aliasUsers",Upload:"upload"},StorageNames:{localStorageName:"mprtcl-api",localStorageNameV3:"mprtcl-v3",cookieName:"mprtcl-api",cookieNameV2:"mprtcl-v2",cookieNameV3:"mprtcl-v3",localStorageNameV4:"mprtcl-v4",localStorageProductsV4:"mprtcl-prodv4",cookieNameV4:"mprtcl-v4",currentStorageName:"mprtcl-v4",currentStorageProductsName:"mprtcl-prodv4"},DefaultConfig:{cookieDomain:null,cookieExpiration:365,logLevel:null,timeout:300,sessionTimeout:30,maxProducts:20,forwarderStatsTimeout:5e3,integrationDelayTimeout:5e3,maxCookieSize:3e3,aliasMaxWindow:90,uploadInterval:0// Maximum milliseconds in between batch uploads, below 500 will mean immediate upload. The server returns this as a string, but we are using it as a number internally
|
|
160
160
|
},DefaultBaseUrls:{v1SecureServiceUrl:"jssdks.mparticle.com/v1/JS/",v2SecureServiceUrl:"jssdks.mparticle.com/v2/JS/",v3SecureServiceUrl:"jssdks.mparticle.com/v3/JS/",configUrl:"jssdkcdns.mparticle.com/JS/v2/",identityUrl:"identity.mparticle.com/v1/",aliasUrl:"jssdks.mparticle.com/v1/identity/",userAudienceUrl:"nativesdks.mparticle.com/v1/"},Base64CookieKeys:{csm:1,sa:1,ss:1,ua:1,ui:1,csd:1,ia:1,con:1},// https://go.mparticle.com/work/SQDSDKS-6039
|
|
@@ -426,7 +426,7 @@ var SDKIdentityTypeEnum;(function(a){a.other="other",a.customerId="customerid",a
|
|
|
426
426
|
|
|
427
427
|
function convertEvents(a,b,c){if(!a)return null;if(!b||1>b.length)return null;for(var d,e=c.Identity.getCurrentUser(),f=[],g=null,h=0,i=b;h<i.length;h++)if(d=i[h],d){g=d;var j=convertEvent(d);j&&f.push(j);}if(!g)return null;var k=null;// Add the consent state from either the Last Event or the user
|
|
428
428
|
isEmpty(g.ConsentState)?!isEmpty(e)&&(k=e.getConsentState()):k=g.ConsentState;var l={source_request_id:c._Helpers.generateUniqueId(),mpid:a,timestamp_unixtime_ms:new Date().getTime(),environment:g.Debug?dist.BatchEnvironmentEnum.development:dist.BatchEnvironmentEnum.production,events:f,mp_deviceid:g.DeviceId,sdk_version:g.SDKVersion,// TODO: Refactor this to read from _Store or a global config
|
|
429
|
-
application_info:{application_version:g.AppVersion,application_name:g.AppName,package:g.Package,sideloaded_kits_count:c._Store.sideloadedKitsCount},device_info:{platform:dist.DeviceInformationPlatformEnum.web,screen_width:"undefined"
|
|
429
|
+
application_info:{application_version:g.AppVersion,application_name:g.AppName,package:g.Package,sideloaded_kits_count:c._Store.sideloadedKitsCount},device_info:{platform:dist.DeviceInformationPlatformEnum.web,screen_width:"undefined"!=typeof window&&"undefined"!=typeof window.screen?window.screen.width:0,screen_height:"undefined"!=typeof window&&"undefined"!=typeof window.screen?window.screen.height:0},user_attributes:g.UserAttributes,user_identities:convertUserIdentities(g.UserIdentities),consent_state:convertConsentState(k),integration_attributes:g.IntegrationAttributes};return g.DataPlan&&g.DataPlan.PlanId&&(l.context={data_plan:{plan_id:g.DataPlan.PlanId,plan_version:g.DataPlan.PlanVersion||void 0}}),l}function convertConsentState(a){if(isEmpty(a))return null;var b={gdpr:convertGdprConsentState(a.getGDPRConsentState()),ccpa:convertCcpaConsentState(a.getCCPAConsentState())};return b}function convertGdprConsentState(a){if(!a)return null;var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]={consented:a[c].Consented,hardware_id:a[c].HardwareId,document:a[c].ConsentDocument,timestamp_unixtime_ms:a[c].Timestamp,location:a[c].Location});return b}function convertCcpaConsentState(a){if(!a)return null;var b={data_sale_opt_out:{consented:a.Consented,hardware_id:a.HardwareId,document:a.ConsentDocument,timestamp_unixtime_ms:a.Timestamp,location:a.Location}};return b}function convertUserIdentities(a){if(!a||!a.length)return null;for(var b,c={},d=0,e=a;d<e.length;d++)switch(b=e[d],b.Type){case Types.IdentityType.CustomerId:c.customer_id=b.Identity;break;case Types.IdentityType.Email:c.email=b.Identity;break;case Types.IdentityType.Facebook:c.facebook=b.Identity;break;case Types.IdentityType.FacebookCustomAudienceId:c.facebook_custom_audience_id=b.Identity;break;case Types.IdentityType.Google:c.google=b.Identity;break;case Types.IdentityType.Microsoft:c.microsoft=b.Identity;break;case Types.IdentityType.Other:c.other=b.Identity;break;case Types.IdentityType.Other2:c.other_id_2=b.Identity;break;case Types.IdentityType.Other3:c.other_id_3=b.Identity;break;case Types.IdentityType.Other4:c.other_id_4=b.Identity;break;case Types.IdentityType.Other5:c.other_id_5=b.Identity;break;case Types.IdentityType.Other6:c.other_id_6=b.Identity;break;case Types.IdentityType.Other7:c.other_id_7=b.Identity;break;case Types.IdentityType.Other8:c.other_id_8=b.Identity;break;case Types.IdentityType.Other9:c.other_id_9=b.Identity;break;case Types.IdentityType.Other10:c.other_id_10=b.Identity;break;case Types.IdentityType.MobileNumber:c.mobile_number=b.Identity;break;case Types.IdentityType.PhoneNumber2:c.phone_number_2=b.Identity;break;case Types.IdentityType.PhoneNumber3:c.phone_number_3=b.Identity;break;}return c}function convertEvent(a){if(!a)return null;switch(a.EventDataType){case Types.MessageType.AppStateTransition:return convertAST(a);case Types.MessageType.Commerce:return convertCommerceEvent(a);case Types.MessageType.CrashReport:return convertCrashReportEvent(a);case Types.MessageType.OptOut:return convertOptOutEvent(a);case Types.MessageType.PageEvent:// Note: Media Events are also sent as PageEvents/CustomEvents
|
|
430
430
|
return convertCustomEvent(a);case Types.MessageType.PageView:return convertPageViewEvent(a);case Types.MessageType.Profile://deprecated and not supported by the web SDK
|
|
431
431
|
return null;case Types.MessageType.SessionEnd:return convertSessionEndEvent(a);case Types.MessageType.SessionStart:return convertSessionStartEvent(a);case Types.MessageType.UserAttributeChange:return convertUserAttributeChangeEvent(a);case Types.MessageType.UserIdentityChange:return convertUserIdentityChangeEvent(a);}return null}function convertProductActionType(a){if(!a)return dist.ProductActionActionEnum.unknown;return a===SDKProductActionType.AddToCart?dist.ProductActionActionEnum.addToCart:a===SDKProductActionType.AddToWishlist?dist.ProductActionActionEnum.addToWishlist:a===SDKProductActionType.Checkout?dist.ProductActionActionEnum.checkout:a===SDKProductActionType.CheckoutOption?dist.ProductActionActionEnum.checkoutOption:a===SDKProductActionType.Click?dist.ProductActionActionEnum.click:a===SDKProductActionType.Purchase?dist.ProductActionActionEnum.purchase:a===SDKProductActionType.Refund?dist.ProductActionActionEnum.refund:a===SDKProductActionType.RemoveFromCart?dist.ProductActionActionEnum.removeFromCart:a===SDKProductActionType.RemoveFromWishlist?dist.ProductActionActionEnum.removeFromWishlist:a===SDKProductActionType.ViewDetail?dist.ProductActionActionEnum.viewDetail:dist.ProductActionActionEnum.unknown}function convertProductAction(a){if(!a.ProductAction)return null;var b={action:convertProductActionType(a.ProductAction.ProductActionType),checkout_step:a.ProductAction.CheckoutStep,checkout_options:a.ProductAction.CheckoutOptions,transaction_id:a.ProductAction.TransactionId,affiliation:a.ProductAction.Affiliation,total_amount:a.ProductAction.TotalAmount,tax_amount:a.ProductAction.TaxAmount,shipping_amount:a.ProductAction.ShippingAmount,coupon_code:a.ProductAction.CouponCode,products:convertProducts(a.ProductAction.ProductList)};return b}function convertProducts(a){if(!a||!a.length)return null;for(var b=[],c=0,d=a;c<d.length;c++){var e=d[c],f={id:e.Sku,name:e.Name,brand:e.Brand,category:e.Category,variant:e.Variant,total_product_amount:e.TotalAmount,position:e.Position,price:e.Price,quantity:e.Quantity,coupon_code:e.CouponCode,custom_attributes:e.Attributes};b.push(f);}return b}function convertPromotionAction(a){if(!a.PromotionAction)return null;var b={action:a.PromotionAction.PromotionActionType,promotions:convertPromotions(a.PromotionAction.PromotionList)};return b}function convertPromotions(a){if(!a||!a.length)return null;for(var b=[],c=0,d=a;c<d.length;c++){var e=d[c],f={id:e.Id,name:e.Name,creative:e.Creative,position:e.Position};b.push(f);}return b}function convertImpressions(a){if(!a.ProductImpressions)return null;for(var b=[],c=0,d=a.ProductImpressions;c<d.length;c++){var e=d[c],f={product_impression_list:e.ProductImpressionList,products:convertProducts(e.ProductList)};b.push(f);}return b}function convertShoppingCart(a){if(!a.ShoppingCart||!a.ShoppingCart.ProductList||!a.ShoppingCart.ProductList.length)return null;var b={products:convertProducts(a.ShoppingCart.ProductList)};return b}function convertCommerceEvent(a){var b=convertBaseEventData(a),c={custom_flags:a.CustomFlags,product_action:convertProductAction(a),promotion_action:convertPromotionAction(a),product_impressions:convertImpressions(a),shopping_cart:convertShoppingCart(a),currency_code:a.CurrencyCode};return c=Object.assign(c,b),{event_type:dist.EventTypeEnum.commerceEvent,data:c}}function convertCrashReportEvent(a){var b=convertBaseEventData(a),c={message:a.EventName};return c=Object.assign(c,b),{event_type:dist.EventTypeEnum.crashReport,data:c}}function convertAST(a){var b=convertBaseEventData(a),c={application_transition_type:dist.ApplicationStateTransitionEventDataApplicationTransitionTypeEnum.applicationInitialized,is_first_run:a.IsFirstRun,is_upgrade:!1,launch_referral:a.LaunchReferral};return c=Object.assign(c,b),{event_type:dist.EventTypeEnum.applicationStateTransition,data:c}}function convertSessionEndEvent(a){var b=convertBaseEventData(a),c={session_duration_ms:a.SessionLength//note: External Events DTO does not support the session mpids array as of this time.
|
|
432
432
|
//spanning_mpids: sdkEvent.SessionMpids
|
package/dist/mparticle.esm.js
CHANGED
|
@@ -154,7 +154,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
154
154
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
var version = "2.
|
|
157
|
+
var version = "2.30.1";
|
|
158
158
|
|
|
159
159
|
var Constants={sdkVersion:version,sdkVendor:"mparticle",platform:"web",Messages:{DeprecationMessages:{MethodIsDeprecatedPostfix:"is a deprecated method and will be removed in future releases",AlternativeMethodPrefix:"Please use the alternate method:"},ErrorMessages:{NoToken:"A token must be specified.",EventNameInvalidType:"Event name must be a valid string value.",EventDataInvalidType:"Event data must be a valid object hash.",LoggingDisabled:"Event logging is currently disabled.",CookieParseError:"Could not parse cookie",EventEmpty:"Event object is null or undefined, cancelling send",APIRequestEmpty:"APIRequest is null or undefined, cancelling send",NoEventType:"Event type must be specified.",TransactionIdRequired:"Transaction ID is required",TransactionRequired:"A transaction attributes object is required",PromotionIdRequired:"Promotion ID is required",BadAttribute:"Attribute value cannot be object or array",BadKey:"Key value cannot be object or array",BadLogPurchase:"Transaction attributes and a product are both required to log a purchase, https://docs.mparticle.com/?javascript#measuring-transactions",AudienceAPINotEnabled:"Your workspace is not enabled to retrieve user audiences."},InformationMessages:{CookieSearch:"Searching for cookie",CookieFound:"Cookie found, parsing values",CookieNotFound:"Cookies not found",CookieSet:"Setting cookie",CookieSync:"Performing cookie sync",SendBegin:"Starting to send event",SendIdentityBegin:"Starting to send event to identity server",SendWindowsPhone:"Sending event to Windows Phone container",SendIOS:"Calling iOS path: ",SendAndroid:"Calling Android JS interface method: ",SendHttp:"Sending event to mParticle HTTP service",SendAliasHttp:"Sending alias request to mParticle HTTP service",SendIdentityHttp:"Sending event to mParticle HTTP service",StartingNewSession:"Starting new Session",StartingLogEvent:"Starting to log event",StartingLogOptOut:"Starting to log user opt in/out",StartingEndSession:"Starting to end session",StartingInitialization:"Starting to initialize",StartingLogCommerceEvent:"Starting to log commerce event",StartingAliasRequest:"Starting to Alias MPIDs",LoadingConfig:"Loading configuration options",AbandonLogEvent:"Cannot log event, logging disabled or developer token not set",AbandonAliasUsers:"Cannot Alias Users, logging disabled or developer token not set",AbandonStartSession:"Cannot start session, logging disabled or developer token not set",AbandonEndSession:"Cannot end session, logging disabled or developer token not set",NoSessionToEnd:"Cannot end session, no active session found"},ValidationMessages:{ModifyIdentityRequestUserIdentitiesPresent:"identityRequests to modify require userIdentities to be present. Request not sent to server. Please fix and try again",IdentityRequesetInvalidKey:"There is an invalid key on your identityRequest object. It can only contain a `userIdentities` object and a `onUserAlias` function. Request not sent to server. Please fix and try again.",OnUserAliasType:"The onUserAlias value must be a function.",UserIdentities:"The userIdentities key must be an object with keys of identityTypes and values of strings. Request not sent to server. Please fix and try again.",UserIdentitiesInvalidKey:"There is an invalid identity key on your `userIdentities` object within the identityRequest. Request not sent to server. Please fix and try again.",UserIdentitiesInvalidValues:"All user identity values must be strings or null. Request not sent to server. Please fix and try again.",AliasMissingMpid:"Alias Request must contain both a destinationMpid and a sourceMpid",AliasNonUniqueMpid:"Alias Request's destinationMpid and sourceMpid must be unique",AliasMissingTime:"Alias Request must have both a startTime and an endTime",AliasStartBeforeEndTime:"Alias Request's endTime must be later than its startTime"}},NativeSdkPaths:{LogEvent:"logEvent",SetUserTag:"setUserTag",RemoveUserTag:"removeUserTag",SetUserAttribute:"setUserAttribute",RemoveUserAttribute:"removeUserAttribute",SetSessionAttribute:"setSessionAttribute",AddToCart:"addToCart",RemoveFromCart:"removeFromCart",ClearCart:"clearCart",LogOut:"logOut",SetUserAttributeList:"setUserAttributeList",RemoveAllUserAttributes:"removeAllUserAttributes",GetUserAttributesLists:"getUserAttributesLists",GetAllUserAttributes:"getAllUserAttributes",Identify:"identify",Logout:"logout",Login:"login",Modify:"modify",Alias:"aliasUsers",Upload:"upload"},StorageNames:{localStorageName:"mprtcl-api",localStorageNameV3:"mprtcl-v3",cookieName:"mprtcl-api",cookieNameV2:"mprtcl-v2",cookieNameV3:"mprtcl-v3",localStorageNameV4:"mprtcl-v4",localStorageProductsV4:"mprtcl-prodv4",cookieNameV4:"mprtcl-v4",currentStorageName:"mprtcl-v4",currentStorageProductsName:"mprtcl-prodv4"},DefaultConfig:{cookieDomain:null,cookieExpiration:365,logLevel:null,timeout:300,sessionTimeout:30,maxProducts:20,forwarderStatsTimeout:5e3,integrationDelayTimeout:5e3,maxCookieSize:3e3,aliasMaxWindow:90,uploadInterval:0// Maximum milliseconds in between batch uploads, below 500 will mean immediate upload. The server returns this as a string, but we are using it as a number internally
|
|
160
160
|
},DefaultBaseUrls:{v1SecureServiceUrl:"jssdks.mparticle.com/v1/JS/",v2SecureServiceUrl:"jssdks.mparticle.com/v2/JS/",v3SecureServiceUrl:"jssdks.mparticle.com/v3/JS/",configUrl:"jssdkcdns.mparticle.com/JS/v2/",identityUrl:"identity.mparticle.com/v1/",aliasUrl:"jssdks.mparticle.com/v1/identity/",userAudienceUrl:"nativesdks.mparticle.com/v1/"},Base64CookieKeys:{csm:1,sa:1,ss:1,ua:1,ui:1,csd:1,ia:1,con:1},// https://go.mparticle.com/work/SQDSDKS-6039
|
|
@@ -426,7 +426,7 @@ var SDKIdentityTypeEnum;(function(a){a.other="other",a.customerId="customerid",a
|
|
|
426
426
|
|
|
427
427
|
function convertEvents(a,b,c){if(!a)return null;if(!b||1>b.length)return null;for(var d,e=c.Identity.getCurrentUser(),f=[],g=null,h=0,i=b;h<i.length;h++)if(d=i[h],d){g=d;var j=convertEvent(d);j&&f.push(j);}if(!g)return null;var k=null;// Add the consent state from either the Last Event or the user
|
|
428
428
|
isEmpty(g.ConsentState)?!isEmpty(e)&&(k=e.getConsentState()):k=g.ConsentState;var l={source_request_id:c._Helpers.generateUniqueId(),mpid:a,timestamp_unixtime_ms:new Date().getTime(),environment:g.Debug?dist.BatchEnvironmentEnum.development:dist.BatchEnvironmentEnum.production,events:f,mp_deviceid:g.DeviceId,sdk_version:g.SDKVersion,// TODO: Refactor this to read from _Store or a global config
|
|
429
|
-
application_info:{application_version:g.AppVersion,application_name:g.AppName,package:g.Package,sideloaded_kits_count:c._Store.sideloadedKitsCount},device_info:{platform:dist.DeviceInformationPlatformEnum.web,screen_width:"undefined"
|
|
429
|
+
application_info:{application_version:g.AppVersion,application_name:g.AppName,package:g.Package,sideloaded_kits_count:c._Store.sideloadedKitsCount},device_info:{platform:dist.DeviceInformationPlatformEnum.web,screen_width:"undefined"!=typeof window&&"undefined"!=typeof window.screen?window.screen.width:0,screen_height:"undefined"!=typeof window&&"undefined"!=typeof window.screen?window.screen.height:0},user_attributes:g.UserAttributes,user_identities:convertUserIdentities(g.UserIdentities),consent_state:convertConsentState(k),integration_attributes:g.IntegrationAttributes};return g.DataPlan&&g.DataPlan.PlanId&&(l.context={data_plan:{plan_id:g.DataPlan.PlanId,plan_version:g.DataPlan.PlanVersion||void 0}}),l}function convertConsentState(a){if(isEmpty(a))return null;var b={gdpr:convertGdprConsentState(a.getGDPRConsentState()),ccpa:convertCcpaConsentState(a.getCCPAConsentState())};return b}function convertGdprConsentState(a){if(!a)return null;var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]={consented:a[c].Consented,hardware_id:a[c].HardwareId,document:a[c].ConsentDocument,timestamp_unixtime_ms:a[c].Timestamp,location:a[c].Location});return b}function convertCcpaConsentState(a){if(!a)return null;var b={data_sale_opt_out:{consented:a.Consented,hardware_id:a.HardwareId,document:a.ConsentDocument,timestamp_unixtime_ms:a.Timestamp,location:a.Location}};return b}function convertUserIdentities(a){if(!a||!a.length)return null;for(var b,c={},d=0,e=a;d<e.length;d++)switch(b=e[d],b.Type){case Types.IdentityType.CustomerId:c.customer_id=b.Identity;break;case Types.IdentityType.Email:c.email=b.Identity;break;case Types.IdentityType.Facebook:c.facebook=b.Identity;break;case Types.IdentityType.FacebookCustomAudienceId:c.facebook_custom_audience_id=b.Identity;break;case Types.IdentityType.Google:c.google=b.Identity;break;case Types.IdentityType.Microsoft:c.microsoft=b.Identity;break;case Types.IdentityType.Other:c.other=b.Identity;break;case Types.IdentityType.Other2:c.other_id_2=b.Identity;break;case Types.IdentityType.Other3:c.other_id_3=b.Identity;break;case Types.IdentityType.Other4:c.other_id_4=b.Identity;break;case Types.IdentityType.Other5:c.other_id_5=b.Identity;break;case Types.IdentityType.Other6:c.other_id_6=b.Identity;break;case Types.IdentityType.Other7:c.other_id_7=b.Identity;break;case Types.IdentityType.Other8:c.other_id_8=b.Identity;break;case Types.IdentityType.Other9:c.other_id_9=b.Identity;break;case Types.IdentityType.Other10:c.other_id_10=b.Identity;break;case Types.IdentityType.MobileNumber:c.mobile_number=b.Identity;break;case Types.IdentityType.PhoneNumber2:c.phone_number_2=b.Identity;break;case Types.IdentityType.PhoneNumber3:c.phone_number_3=b.Identity;break;}return c}function convertEvent(a){if(!a)return null;switch(a.EventDataType){case Types.MessageType.AppStateTransition:return convertAST(a);case Types.MessageType.Commerce:return convertCommerceEvent(a);case Types.MessageType.CrashReport:return convertCrashReportEvent(a);case Types.MessageType.OptOut:return convertOptOutEvent(a);case Types.MessageType.PageEvent:// Note: Media Events are also sent as PageEvents/CustomEvents
|
|
430
430
|
return convertCustomEvent(a);case Types.MessageType.PageView:return convertPageViewEvent(a);case Types.MessageType.Profile://deprecated and not supported by the web SDK
|
|
431
431
|
return null;case Types.MessageType.SessionEnd:return convertSessionEndEvent(a);case Types.MessageType.SessionStart:return convertSessionStartEvent(a);case Types.MessageType.UserAttributeChange:return convertUserAttributeChangeEvent(a);case Types.MessageType.UserIdentityChange:return convertUserIdentityChangeEvent(a);}return null}function convertProductActionType(a){if(!a)return dist.ProductActionActionEnum.unknown;return a===SDKProductActionType.AddToCart?dist.ProductActionActionEnum.addToCart:a===SDKProductActionType.AddToWishlist?dist.ProductActionActionEnum.addToWishlist:a===SDKProductActionType.Checkout?dist.ProductActionActionEnum.checkout:a===SDKProductActionType.CheckoutOption?dist.ProductActionActionEnum.checkoutOption:a===SDKProductActionType.Click?dist.ProductActionActionEnum.click:a===SDKProductActionType.Purchase?dist.ProductActionActionEnum.purchase:a===SDKProductActionType.Refund?dist.ProductActionActionEnum.refund:a===SDKProductActionType.RemoveFromCart?dist.ProductActionActionEnum.removeFromCart:a===SDKProductActionType.RemoveFromWishlist?dist.ProductActionActionEnum.removeFromWishlist:a===SDKProductActionType.ViewDetail?dist.ProductActionActionEnum.viewDetail:dist.ProductActionActionEnum.unknown}function convertProductAction(a){if(!a.ProductAction)return null;var b={action:convertProductActionType(a.ProductAction.ProductActionType),checkout_step:a.ProductAction.CheckoutStep,checkout_options:a.ProductAction.CheckoutOptions,transaction_id:a.ProductAction.TransactionId,affiliation:a.ProductAction.Affiliation,total_amount:a.ProductAction.TotalAmount,tax_amount:a.ProductAction.TaxAmount,shipping_amount:a.ProductAction.ShippingAmount,coupon_code:a.ProductAction.CouponCode,products:convertProducts(a.ProductAction.ProductList)};return b}function convertProducts(a){if(!a||!a.length)return null;for(var b=[],c=0,d=a;c<d.length;c++){var e=d[c],f={id:e.Sku,name:e.Name,brand:e.Brand,category:e.Category,variant:e.Variant,total_product_amount:e.TotalAmount,position:e.Position,price:e.Price,quantity:e.Quantity,coupon_code:e.CouponCode,custom_attributes:e.Attributes};b.push(f);}return b}function convertPromotionAction(a){if(!a.PromotionAction)return null;var b={action:a.PromotionAction.PromotionActionType,promotions:convertPromotions(a.PromotionAction.PromotionList)};return b}function convertPromotions(a){if(!a||!a.length)return null;for(var b=[],c=0,d=a;c<d.length;c++){var e=d[c],f={id:e.Id,name:e.Name,creative:e.Creative,position:e.Position};b.push(f);}return b}function convertImpressions(a){if(!a.ProductImpressions)return null;for(var b=[],c=0,d=a.ProductImpressions;c<d.length;c++){var e=d[c],f={product_impression_list:e.ProductImpressionList,products:convertProducts(e.ProductList)};b.push(f);}return b}function convertShoppingCart(a){if(!a.ShoppingCart||!a.ShoppingCart.ProductList||!a.ShoppingCart.ProductList.length)return null;var b={products:convertProducts(a.ShoppingCart.ProductList)};return b}function convertCommerceEvent(a){var b=convertBaseEventData(a),c={custom_flags:a.CustomFlags,product_action:convertProductAction(a),promotion_action:convertPromotionAction(a),product_impressions:convertImpressions(a),shopping_cart:convertShoppingCart(a),currency_code:a.CurrencyCode};return c=Object.assign(c,b),{event_type:dist.EventTypeEnum.commerceEvent,data:c}}function convertCrashReportEvent(a){var b=convertBaseEventData(a),c={message:a.EventName};return c=Object.assign(c,b),{event_type:dist.EventTypeEnum.crashReport,data:c}}function convertAST(a){var b=convertBaseEventData(a),c={application_transition_type:dist.ApplicationStateTransitionEventDataApplicationTransitionTypeEnum.applicationInitialized,is_first_run:a.IsFirstRun,is_upgrade:!1,launch_referral:a.LaunchReferral};return c=Object.assign(c,b),{event_type:dist.EventTypeEnum.applicationStateTransition,data:c}}function convertSessionEndEvent(a){var b=convertBaseEventData(a),c={session_duration_ms:a.SessionLength//note: External Events DTO does not support the session mpids array as of this time.
|
|
432
432
|
//spanning_mpids: sdkEvent.SessionMpids
|
package/dist/mparticle.js
CHANGED
|
@@ -393,7 +393,7 @@ var mParticle = (function () {
|
|
|
393
393
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
394
394
|
};
|
|
395
395
|
|
|
396
|
-
var version = "2.
|
|
396
|
+
var version = "2.30.1";
|
|
397
397
|
|
|
398
398
|
var Constants = {
|
|
399
399
|
sdkVersion: version,
|
|
@@ -1542,8 +1542,8 @@ var mParticle = (function () {
|
|
|
1542
1542
|
},
|
|
1543
1543
|
device_info: {
|
|
1544
1544
|
platform: dist.DeviceInformationPlatformEnum.web,
|
|
1545
|
-
screen_width: typeof window !== 'undefined' ? window.screen.width : 0,
|
|
1546
|
-
screen_height: typeof window !== 'undefined' ? window.screen.height : 0
|
|
1545
|
+
screen_width: typeof window !== 'undefined' && typeof window.screen !== 'undefined' ? window.screen.width : 0,
|
|
1546
|
+
screen_height: typeof window !== 'undefined' && typeof window.screen !== 'undefined' ? window.screen.height : 0
|
|
1547
1547
|
},
|
|
1548
1548
|
user_attributes: lastEvent.UserAttributes,
|
|
1549
1549
|
user_identities: convertUserIdentities(lastEvent.UserIdentities),
|
package/package.json
CHANGED
|
@@ -77,8 +77,16 @@ export function convertEvents(
|
|
|
77
77
|
|
|
78
78
|
device_info: {
|
|
79
79
|
platform: EventsApi.DeviceInformationPlatformEnum.web,
|
|
80
|
-
screen_width:
|
|
81
|
-
|
|
80
|
+
screen_width:
|
|
81
|
+
typeof window !== 'undefined' &&
|
|
82
|
+
typeof window.screen !== 'undefined'
|
|
83
|
+
? window.screen.width
|
|
84
|
+
: 0,
|
|
85
|
+
screen_height:
|
|
86
|
+
typeof window !== 'undefined' &&
|
|
87
|
+
typeof window.screen !== 'undefined'
|
|
88
|
+
? window.screen.height
|
|
89
|
+
: 0,
|
|
82
90
|
},
|
|
83
91
|
user_attributes: lastEvent.UserAttributes,
|
|
84
92
|
user_identities: convertUserIdentities(lastEvent.UserIdentities),
|