@schibsted/pulse-sdk 8.0.0-rc.12 → 8.0.0-rc.13

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.
@@ -291,6 +291,8 @@ class Tracker {
291
291
  tpaasCollectorBaseUrl: config_browser_1.collectorEndpoints[deployStageTpaas],
292
292
  trackerId: (0, uuid_1.v4)(),
293
293
  vendors: config?.vendors?.length ? [] : ['xandr'],
294
+ useBeacon: true,
295
+ useBeaconWhenAvailable: true,
294
296
  }, config);
295
297
  // Move to default config?
296
298
  this.builders = (0, utils_1.pulseMerge)({}, builders, {
@@ -2330,12 +2332,18 @@ class Tracker {
2330
2332
  async prepareQueuesAndSend(eventQueue, retryEventQueue) {
2331
2333
  const promisesToBeSent = eventQueue.splice(0);
2332
2334
  const eventsToBeSent = promisesToBeSent.map((p) => p.inputValue);
2333
- const eventsToRetry = retryEventQueue;
2335
+ const eventsToRetry = retryEventQueue.splice(0);
2334
2336
  eventQueue.length = 0;
2335
2337
  retryEventQueue.length = 0;
2336
2338
  const evaluatedEvents = await Promise.all(eventsToBeSent);
2337
2339
  const url = this._getCollectorPath();
2338
2340
  const data = [...evaluatedEvents, ...eventsToRetry];
2341
+ // in some cases, _sendImmediately executes an asynchronous operation (cisSync) after checking for empty array
2342
+ // due to that, it's still possible for this function to be called with an empty array, so we need to check for that again before sending
2343
+ // in order to avoid making an empty request to collector
2344
+ if (data.length === 0) {
2345
+ return [];
2346
+ }
2339
2347
  // biome-ignore lint/suspicious/noExplicitAny: -
2340
2348
  async function onFailedSend(response) {
2341
2349
  // We retry an event once, but discard already retried events
@@ -8,329 +8,329 @@ exports.AnonymousViewUIElement = {
8
8
  object: {
9
9
  objectType: 'UIElement',
10
10
  },
11
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/AnonymousViewUIElement.json',
11
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/AnonymousViewUIElement.json',
12
12
  };
13
13
  exports.CompletedHealthAction = {
14
14
  eventType: 'Completed',
15
15
  object: {
16
16
  objectType: 'HealthAction',
17
17
  },
18
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/CompletedHealthAction.json',
18
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/CompletedHealthAction.json',
19
19
  };
20
20
  exports.EngagementAudio = {
21
21
  eventType: 'Engagement',
22
22
  object: {
23
23
  objectType: 'Audio',
24
24
  },
25
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementAudio.json',
25
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementAudio.json',
26
26
  };
27
27
  exports.EngagementForm = {
28
28
  eventType: 'Engagement',
29
29
  object: {
30
30
  objectType: 'Form',
31
31
  },
32
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementForm.json',
32
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementForm.json',
33
33
  };
34
34
  exports.EngagementHealthUIElement = {
35
35
  eventType: 'Engagement',
36
36
  object: {
37
37
  objectType: 'HealthUIElement',
38
38
  },
39
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementHealthUIElement.json',
39
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementHealthUIElement.json',
40
40
  };
41
41
  exports.EngagementOffer = {
42
42
  eventType: 'Engagement',
43
43
  object: {
44
44
  objectType: 'Offer',
45
45
  },
46
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementOffer.json',
46
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementOffer.json',
47
47
  };
48
48
  exports.EngagementTeaser = {
49
49
  eventType: 'Engagement',
50
50
  object: {
51
51
  objectType: 'Teaser',
52
52
  },
53
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementTeaser.json',
53
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementTeaser.json',
54
54
  };
55
55
  exports.EngagementUIElement = {
56
56
  eventType: 'Engagement',
57
57
  object: {
58
58
  objectType: 'UIElement',
59
59
  },
60
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementUIElement.json',
60
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementUIElement.json',
61
61
  };
62
62
  exports.EngagementVideo = {
63
63
  eventType: 'Engagement',
64
64
  object: {
65
65
  objectType: 'Video',
66
66
  },
67
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementVideo.json',
67
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementVideo.json',
68
68
  };
69
69
  exports.EngagementVideoAd = {
70
70
  eventType: 'Engagement',
71
71
  object: {
72
72
  objectType: 'VideoAd',
73
73
  },
74
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementVideoAd.json',
74
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementVideoAd.json',
75
75
  };
76
76
  exports.EngagementWidget = {
77
77
  eventType: 'Engagement',
78
78
  object: {
79
79
  objectType: 'Widget',
80
80
  },
81
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/EngagementWidget.json',
81
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/EngagementWidget.json',
82
82
  };
83
83
  exports.ImpressionAdSlot = {
84
84
  eventType: 'Impression',
85
85
  object: {
86
86
  objectType: 'AdSlot',
87
87
  },
88
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionAdSlot.json',
88
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionAdSlot.json',
89
89
  };
90
90
  exports.ImpressionForm = {
91
91
  eventType: 'Impression',
92
92
  object: {
93
93
  objectType: 'Form',
94
94
  },
95
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionForm.json',
95
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionForm.json',
96
96
  };
97
97
  exports.ImpressionHealthUIElement = {
98
98
  eventType: 'Impression',
99
99
  object: {
100
100
  objectType: 'HealthUIElement',
101
101
  },
102
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionHealthUIElement.json',
102
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionHealthUIElement.json',
103
103
  };
104
104
  exports.ImpressionOffer = {
105
105
  eventType: 'Impression',
106
106
  object: {
107
107
  objectType: 'Offer',
108
108
  },
109
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionOffer.json',
109
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionOffer.json',
110
110
  };
111
111
  exports.ImpressionPlayer = {
112
112
  eventType: 'Impression',
113
113
  object: {
114
114
  objectType: 'Player',
115
115
  },
116
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionPlayer.json',
116
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionPlayer.json',
117
117
  };
118
118
  exports.ImpressionTeaser = {
119
119
  eventType: 'Impression',
120
120
  object: {
121
121
  objectType: 'Teaser',
122
122
  },
123
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionTeaser.json',
123
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionTeaser.json',
124
124
  };
125
125
  exports.ImpressionUIElement = {
126
126
  eventType: 'Impression',
127
127
  object: {
128
128
  objectType: 'UIElement',
129
129
  },
130
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionUIElement.json',
130
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionUIElement.json',
131
131
  };
132
132
  exports.ImpressionWidget = {
133
133
  eventType: 'Impression',
134
134
  object: {
135
135
  objectType: 'Widget',
136
136
  },
137
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ImpressionWidget.json',
137
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ImpressionWidget.json',
138
138
  };
139
139
  exports.LeaveArticle = {
140
140
  eventType: 'Leave',
141
141
  object: {
142
142
  objectType: 'Article',
143
143
  },
144
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveArticle.json',
144
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveArticle.json',
145
145
  };
146
146
  exports.LeaveAudioPage = {
147
147
  eventType: 'Leave',
148
148
  object: {
149
149
  objectType: 'AudioPage',
150
150
  },
151
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveAudioPage.json',
151
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveAudioPage.json',
152
152
  };
153
153
  exports.LeaveError = {
154
154
  eventType: 'Leave',
155
155
  object: {
156
156
  objectType: 'Error',
157
157
  },
158
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveError.json',
158
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveError.json',
159
159
  };
160
160
  exports.LeaveFrontpage = {
161
161
  eventType: 'Leave',
162
162
  object: {
163
163
  objectType: 'Frontpage',
164
164
  },
165
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveFrontpage.json',
165
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveFrontpage.json',
166
166
  };
167
167
  exports.LeaveLandingpage = {
168
168
  eventType: 'Leave',
169
169
  object: {
170
170
  objectType: 'Landingpage',
171
171
  },
172
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveLandingpage.json',
172
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveLandingpage.json',
173
173
  };
174
174
  exports.LeaveListing = {
175
175
  eventType: 'Leave',
176
176
  object: {
177
177
  objectType: 'Listing',
178
178
  },
179
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveListing.json',
179
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveListing.json',
180
180
  };
181
181
  exports.LeaveLockedArticle = {
182
182
  eventType: 'Leave',
183
183
  object: {
184
184
  objectType: 'LockedArticle',
185
185
  },
186
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveLockedArticle.json',
186
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveLockedArticle.json',
187
187
  };
188
188
  exports.LeaveLockedAudioPage = {
189
189
  eventType: 'Leave',
190
190
  object: {
191
191
  objectType: 'LockedAudioPage',
192
192
  },
193
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveLockedAudioPage.json',
193
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveLockedAudioPage.json',
194
194
  };
195
195
  exports.LeaveLockedVideoPage = {
196
196
  eventType: 'Leave',
197
197
  object: {
198
198
  objectType: 'LockedVideoPage',
199
199
  },
200
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveLockedVideoPage.json',
200
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveLockedVideoPage.json',
201
201
  };
202
202
  exports.LeavePage = {
203
203
  eventType: 'Leave',
204
204
  object: {
205
205
  objectType: 'Page',
206
206
  },
207
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeavePage.json',
207
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeavePage.json',
208
208
  };
209
209
  exports.LeaveSportsPage = {
210
210
  eventType: 'Leave',
211
211
  object: {
212
212
  objectType: 'SportsPage',
213
213
  },
214
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveSportsPage.json',
214
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveSportsPage.json',
215
215
  };
216
216
  exports.LeaveVideoPage = {
217
217
  eventType: 'Leave',
218
218
  object: {
219
219
  objectType: 'VideoPage',
220
220
  },
221
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveVideoPage.json',
221
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveVideoPage.json',
222
222
  };
223
223
  exports.LeaveWeather = {
224
224
  eventType: 'Leave',
225
225
  object: {
226
226
  objectType: 'Weather',
227
227
  },
228
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/LeaveWeather.json',
228
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/LeaveWeather.json',
229
229
  };
230
230
  exports.ViewArticle = {
231
231
  eventType: 'View',
232
232
  object: {
233
233
  objectType: 'Article',
234
234
  },
235
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewArticle.json',
235
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewArticle.json',
236
236
  };
237
237
  exports.ViewAudioPage = {
238
238
  eventType: 'View',
239
239
  object: {
240
240
  objectType: 'AudioPage',
241
241
  },
242
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewAudioPage.json',
242
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewAudioPage.json',
243
243
  };
244
244
  exports.ViewError = {
245
245
  eventType: 'View',
246
246
  object: {
247
247
  objectType: 'Error',
248
248
  },
249
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewError.json',
249
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewError.json',
250
250
  };
251
251
  exports.ViewFrontpage = {
252
252
  eventType: 'View',
253
253
  object: {
254
254
  objectType: 'Frontpage',
255
255
  },
256
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewFrontpage.json',
256
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewFrontpage.json',
257
257
  };
258
258
  exports.ViewHealthPage = {
259
259
  eventType: 'View',
260
260
  object: {
261
261
  objectType: 'HealthPage',
262
262
  },
263
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewHealthPage.json',
263
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewHealthPage.json',
264
264
  };
265
265
  exports.ViewLandingpage = {
266
266
  eventType: 'View',
267
267
  object: {
268
268
  objectType: 'Landingpage',
269
269
  },
270
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewLandingpage.json',
270
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewLandingpage.json',
271
271
  };
272
272
  exports.ViewListing = {
273
273
  eventType: 'View',
274
274
  object: {
275
275
  objectType: 'Listing',
276
276
  },
277
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewListing.json',
277
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewListing.json',
278
278
  };
279
279
  exports.ViewLockedArticle = {
280
280
  eventType: 'View',
281
281
  object: {
282
282
  objectType: 'LockedArticle',
283
283
  },
284
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewLockedArticle.json',
284
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewLockedArticle.json',
285
285
  };
286
286
  exports.ViewLockedAudioPage = {
287
287
  eventType: 'View',
288
288
  object: {
289
289
  objectType: 'LockedAudioPage',
290
290
  },
291
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewLockedAudioPage.json',
291
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewLockedAudioPage.json',
292
292
  };
293
293
  exports.ViewLockedVideoPage = {
294
294
  eventType: 'View',
295
295
  object: {
296
296
  objectType: 'LockedVideoPage',
297
297
  },
298
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewLockedVideoPage.json',
298
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewLockedVideoPage.json',
299
299
  };
300
300
  exports.ViewPage = {
301
301
  eventType: 'View',
302
302
  object: {
303
303
  objectType: 'Page',
304
304
  },
305
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewPage.json',
305
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewPage.json',
306
306
  };
307
307
  exports.ViewSportsPage = {
308
308
  eventType: 'View',
309
309
  object: {
310
310
  objectType: 'SportsPage',
311
311
  },
312
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewSportsPage.json',
312
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewSportsPage.json',
313
313
  };
314
314
  exports.ViewTitle = {
315
315
  eventType: 'View',
316
316
  object: {
317
317
  objectType: 'Title',
318
318
  },
319
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewTitle.json',
319
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewTitle.json',
320
320
  };
321
321
  exports.ViewVideoPage = {
322
322
  eventType: 'View',
323
323
  object: {
324
324
  objectType: 'VideoPage',
325
325
  },
326
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewVideoPage.json',
326
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewVideoPage.json',
327
327
  };
328
328
  exports.ViewWeather = {
329
329
  eventType: 'View',
330
330
  object: {
331
331
  objectType: 'Weather',
332
332
  },
333
- schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.2/schemas/ViewWeather.json',
333
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/2.9.3/schemas/ViewWeather.json',
334
334
  };
335
335
  exports.ADVERTISING_VALUES = ['Accepted', 'Rejected', 'Unknown'];
336
336
  exports.ANALYTICS_VALUES = ['Accepted', 'Rejected', 'Unknown'];
@@ -418,6 +418,15 @@ exports.SPORT_SUBVIEW_VALUES = [
418
418
  'MedalTable',
419
419
  'UserProfile',
420
420
  'PredictionsGame',
421
+ 'Overview',
422
+ 'Squad',
423
+ 'Rankings',
424
+ 'Ratings',
425
+ 'Liveblog',
426
+ 'News',
427
+ 'Leagues',
428
+ 'League',
429
+ 'Profile',
421
430
  ];
422
431
  exports.SPORT_VIEW_VALUES = [
423
432
  'Person',
@@ -445,4 +454,4 @@ exports.UTM_MEDIUM_VALUES = [
445
454
  'Video',
446
455
  'Internal',
447
456
  ];
448
- exports.CATALOG_VERSION = '2.9.2';
457
+ exports.CATALOG_VERSION = '2.9.3';
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
4
  // This file is auto-generated by bin/generate-version.js. Do not edit manually.
5
- exports.SDK_VERSION = '8.0.0-rc.12';
5
+ exports.SDK_VERSION = '8.0.0-rc.13';
@@ -248,6 +248,8 @@ export default class Tracker {
248
248
  tpaasCollectorBaseUrl: collectorEndpoints[deployStageTpaas],
249
249
  trackerId: v4(),
250
250
  vendors: config?.vendors?.length ? [] : ['xandr'],
251
+ useBeacon: true,
252
+ useBeaconWhenAvailable: true,
251
253
  }, config);
252
254
  // Move to default config?
253
255
  this.builders = pulseMerge({}, builders, {
@@ -2287,12 +2289,18 @@ export default class Tracker {
2287
2289
  async prepareQueuesAndSend(eventQueue, retryEventQueue) {
2288
2290
  const promisesToBeSent = eventQueue.splice(0);
2289
2291
  const eventsToBeSent = promisesToBeSent.map((p) => p.inputValue);
2290
- const eventsToRetry = retryEventQueue;
2292
+ const eventsToRetry = retryEventQueue.splice(0);
2291
2293
  eventQueue.length = 0;
2292
2294
  retryEventQueue.length = 0;
2293
2295
  const evaluatedEvents = await Promise.all(eventsToBeSent);
2294
2296
  const url = this._getCollectorPath();
2295
2297
  const data = [...evaluatedEvents, ...eventsToRetry];
2298
+ // in some cases, _sendImmediately executes an asynchronous operation (cisSync) after checking for empty array
2299
+ // due to that, it's still possible for this function to be called with an empty array, so we need to check for that again before sending
2300
+ // in order to avoid making an empty request to collector
2301
+ if (data.length === 0) {
2302
+ return [];
2303
+ }
2296
2304
  // biome-ignore lint/suspicious/noExplicitAny: -
2297
2305
  async function onFailedSend(response) {
2298
2306
  // We retry an event once, but discard already retried events