@mparticle/web-rokt-kit 1.8.1 → 1.10.0
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 +45 -27
- package/dist/Rokt-Kit.iife.js +45 -27
- package/package.json +1 -1
package/dist/Rokt-Kit.common.js
CHANGED
|
@@ -334,35 +334,40 @@ var constructor = function () {
|
|
|
334
334
|
launcherOptions || {}
|
|
335
335
|
);
|
|
336
336
|
|
|
337
|
-
|
|
338
|
-
.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
337
|
+
if (isPartnerInLocalLauncherTestGroup()) {
|
|
338
|
+
var localLauncher = window.Rokt.createLocalLauncher(options);
|
|
339
|
+
initRoktLauncher(localLauncher);
|
|
340
|
+
} else {
|
|
341
|
+
window.Rokt.createLauncher(options)
|
|
342
|
+
.then(initRoktLauncher)
|
|
343
|
+
.catch(function (err) {
|
|
344
|
+
console.error('Error creating Rokt launcher:', err);
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
343
348
|
|
|
344
|
-
|
|
349
|
+
function initRoktLauncher(launcher) {
|
|
350
|
+
// Assign the launcher to a global variable for later access
|
|
351
|
+
window.Rokt.currentLauncher = launcher;
|
|
352
|
+
// Locally cache the launcher and filters
|
|
353
|
+
self.launcher = launcher;
|
|
345
354
|
|
|
346
|
-
|
|
347
|
-
console.warn('Rokt Kit: No filters have been set.');
|
|
348
|
-
} else {
|
|
349
|
-
self.filters = roktFilters;
|
|
350
|
-
if (!roktFilters.filteredUser) {
|
|
351
|
-
console.warn(
|
|
352
|
-
'Rokt Kit: No filtered user has been set.'
|
|
353
|
-
);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
355
|
+
var roktFilters = window.mParticle.Rokt.filters;
|
|
356
356
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
357
|
+
if (!roktFilters) {
|
|
358
|
+
console.warn('Rokt Kit: No filters have been set.');
|
|
359
|
+
} else {
|
|
360
|
+
self.filters = roktFilters;
|
|
361
|
+
if (!roktFilters.filteredUser) {
|
|
362
|
+
console.warn('Rokt Kit: No filtered user has been set.');
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// Kit must be initialized before attaching to the Rokt manager
|
|
367
|
+
self.isInitialized = true;
|
|
368
|
+
// Attaches the kit to the Rokt manager
|
|
369
|
+
window.mParticle.Rokt.attachKit(self);
|
|
370
|
+
processEventQueue();
|
|
366
371
|
}
|
|
367
372
|
|
|
368
373
|
// mParticle Kit Callback Methods
|
|
@@ -430,11 +435,24 @@ var constructor = function () {
|
|
|
430
435
|
function isKitReady() {
|
|
431
436
|
return !!(self.isInitialized && self.launcher);
|
|
432
437
|
}
|
|
438
|
+
|
|
439
|
+
function isPartnerInLocalLauncherTestGroup() {
|
|
440
|
+
return (
|
|
441
|
+
window.mParticle.config &&
|
|
442
|
+
window.mParticle.config.isLocalLauncherEnabled &&
|
|
443
|
+
_isAssignedToSampleGroup()
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function _isAssignedToSampleGroup() {
|
|
448
|
+
var LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD = 0.5;
|
|
449
|
+
return Math.random() > LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD;
|
|
450
|
+
}
|
|
433
451
|
};
|
|
434
452
|
|
|
435
453
|
function generateIntegrationName(customIntegrationName) {
|
|
436
454
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
437
|
-
var kitVersion = "1.
|
|
455
|
+
var kitVersion = "1.10.0";
|
|
438
456
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
439
457
|
|
|
440
458
|
if (customIntegrationName) {
|
package/dist/Rokt-Kit.iife.js
CHANGED
|
@@ -333,35 +333,40 @@ var RoktKit = (function (exports) {
|
|
|
333
333
|
launcherOptions || {}
|
|
334
334
|
);
|
|
335
335
|
|
|
336
|
-
|
|
337
|
-
.
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
336
|
+
if (isPartnerInLocalLauncherTestGroup()) {
|
|
337
|
+
var localLauncher = window.Rokt.createLocalLauncher(options);
|
|
338
|
+
initRoktLauncher(localLauncher);
|
|
339
|
+
} else {
|
|
340
|
+
window.Rokt.createLauncher(options)
|
|
341
|
+
.then(initRoktLauncher)
|
|
342
|
+
.catch(function (err) {
|
|
343
|
+
console.error('Error creating Rokt launcher:', err);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
342
347
|
|
|
343
|
-
|
|
348
|
+
function initRoktLauncher(launcher) {
|
|
349
|
+
// Assign the launcher to a global variable for later access
|
|
350
|
+
window.Rokt.currentLauncher = launcher;
|
|
351
|
+
// Locally cache the launcher and filters
|
|
352
|
+
self.launcher = launcher;
|
|
344
353
|
|
|
345
|
-
|
|
346
|
-
console.warn('Rokt Kit: No filters have been set.');
|
|
347
|
-
} else {
|
|
348
|
-
self.filters = roktFilters;
|
|
349
|
-
if (!roktFilters.filteredUser) {
|
|
350
|
-
console.warn(
|
|
351
|
-
'Rokt Kit: No filtered user has been set.'
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
354
|
+
var roktFilters = window.mParticle.Rokt.filters;
|
|
355
355
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
356
|
+
if (!roktFilters) {
|
|
357
|
+
console.warn('Rokt Kit: No filters have been set.');
|
|
358
|
+
} else {
|
|
359
|
+
self.filters = roktFilters;
|
|
360
|
+
if (!roktFilters.filteredUser) {
|
|
361
|
+
console.warn('Rokt Kit: No filtered user has been set.');
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Kit must be initialized before attaching to the Rokt manager
|
|
366
|
+
self.isInitialized = true;
|
|
367
|
+
// Attaches the kit to the Rokt manager
|
|
368
|
+
window.mParticle.Rokt.attachKit(self);
|
|
369
|
+
processEventQueue();
|
|
365
370
|
}
|
|
366
371
|
|
|
367
372
|
// mParticle Kit Callback Methods
|
|
@@ -429,11 +434,24 @@ var RoktKit = (function (exports) {
|
|
|
429
434
|
function isKitReady() {
|
|
430
435
|
return !!(self.isInitialized && self.launcher);
|
|
431
436
|
}
|
|
437
|
+
|
|
438
|
+
function isPartnerInLocalLauncherTestGroup() {
|
|
439
|
+
return (
|
|
440
|
+
window.mParticle.config &&
|
|
441
|
+
window.mParticle.config.isLocalLauncherEnabled &&
|
|
442
|
+
_isAssignedToSampleGroup()
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function _isAssignedToSampleGroup() {
|
|
447
|
+
var LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD = 0.5;
|
|
448
|
+
return Math.random() > LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD;
|
|
449
|
+
}
|
|
432
450
|
};
|
|
433
451
|
|
|
434
452
|
function generateIntegrationName(customIntegrationName) {
|
|
435
453
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
436
|
-
var kitVersion = "1.
|
|
454
|
+
var kitVersion = "1.10.0";
|
|
437
455
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
438
456
|
|
|
439
457
|
if (customIntegrationName) {
|