@mparticle/web-rokt-kit 1.8.0 → 1.8.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/dist/Rokt-Kit.common.js +15 -2
- package/dist/Rokt-Kit.iife.js +15 -2
- package/package.json +1 -1
package/dist/Rokt-Kit.common.js
CHANGED
|
@@ -34,6 +34,7 @@ var constructor = function () {
|
|
|
34
34
|
self.userAttributes = {};
|
|
35
35
|
self.testHelpers = null;
|
|
36
36
|
self.placementEventMappingLookup = {};
|
|
37
|
+
self.eventQueue = [];
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* Generates the Rokt launcher script URL with optional domain override and extensions
|
|
@@ -280,9 +281,20 @@ var constructor = function () {
|
|
|
280
281
|
window.Rokt.setExtensionData(partnerExtensionData);
|
|
281
282
|
}
|
|
282
283
|
|
|
284
|
+
function processEventQueue() {
|
|
285
|
+
self.eventQueue.forEach(function (event) {
|
|
286
|
+
processEvent(event);
|
|
287
|
+
});
|
|
288
|
+
self.eventQueue = [];
|
|
289
|
+
}
|
|
290
|
+
|
|
283
291
|
function processEvent(event) {
|
|
292
|
+
if (!isKitReady()) {
|
|
293
|
+
self.eventQueue.push(event);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
|
|
284
297
|
if (
|
|
285
|
-
!isKitReady() ||
|
|
286
298
|
isEmpty(self.placementEventMappingLookup) ||
|
|
287
299
|
typeof window.mParticle.Rokt.setLocalSessionAttribute !== 'function'
|
|
288
300
|
) {
|
|
@@ -346,6 +358,7 @@ var constructor = function () {
|
|
|
346
358
|
self.isInitialized = true;
|
|
347
359
|
// Attaches the kit to the Rokt manager
|
|
348
360
|
window.mParticle.Rokt.attachKit(self);
|
|
361
|
+
processEventQueue();
|
|
349
362
|
})
|
|
350
363
|
.catch(function (err) {
|
|
351
364
|
console.error('Error creating Rokt launcher:', err);
|
|
@@ -421,7 +434,7 @@ var constructor = function () {
|
|
|
421
434
|
|
|
422
435
|
function generateIntegrationName(customIntegrationName) {
|
|
423
436
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
424
|
-
var kitVersion = "1.8.
|
|
437
|
+
var kitVersion = "1.8.1";
|
|
425
438
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
426
439
|
|
|
427
440
|
if (customIntegrationName) {
|
package/dist/Rokt-Kit.iife.js
CHANGED
|
@@ -33,6 +33,7 @@ var RoktKit = (function (exports) {
|
|
|
33
33
|
self.userAttributes = {};
|
|
34
34
|
self.testHelpers = null;
|
|
35
35
|
self.placementEventMappingLookup = {};
|
|
36
|
+
self.eventQueue = [];
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Generates the Rokt launcher script URL with optional domain override and extensions
|
|
@@ -279,9 +280,20 @@ var RoktKit = (function (exports) {
|
|
|
279
280
|
window.Rokt.setExtensionData(partnerExtensionData);
|
|
280
281
|
}
|
|
281
282
|
|
|
283
|
+
function processEventQueue() {
|
|
284
|
+
self.eventQueue.forEach(function (event) {
|
|
285
|
+
processEvent(event);
|
|
286
|
+
});
|
|
287
|
+
self.eventQueue = [];
|
|
288
|
+
}
|
|
289
|
+
|
|
282
290
|
function processEvent(event) {
|
|
291
|
+
if (!isKitReady()) {
|
|
292
|
+
self.eventQueue.push(event);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
283
296
|
if (
|
|
284
|
-
!isKitReady() ||
|
|
285
297
|
isEmpty(self.placementEventMappingLookup) ||
|
|
286
298
|
typeof window.mParticle.Rokt.setLocalSessionAttribute !== 'function'
|
|
287
299
|
) {
|
|
@@ -345,6 +357,7 @@ var RoktKit = (function (exports) {
|
|
|
345
357
|
self.isInitialized = true;
|
|
346
358
|
// Attaches the kit to the Rokt manager
|
|
347
359
|
window.mParticle.Rokt.attachKit(self);
|
|
360
|
+
processEventQueue();
|
|
348
361
|
})
|
|
349
362
|
.catch(function (err) {
|
|
350
363
|
console.error('Error creating Rokt launcher:', err);
|
|
@@ -420,7 +433,7 @@ var RoktKit = (function (exports) {
|
|
|
420
433
|
|
|
421
434
|
function generateIntegrationName(customIntegrationName) {
|
|
422
435
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
423
|
-
var kitVersion = "1.8.
|
|
436
|
+
var kitVersion = "1.8.1";
|
|
424
437
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
425
438
|
|
|
426
439
|
if (customIntegrationName) {
|