@mparticle/web-rokt-kit 1.9.0 → 1.12.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 +23 -2
- package/dist/Rokt-Kit.iife.js +23 -2
- package/package.json +1 -1
package/dist/Rokt-Kit.common.js
CHANGED
|
@@ -24,6 +24,9 @@ var constructor = function () {
|
|
|
24
24
|
var self = this;
|
|
25
25
|
var EMAIL_SHA256_IDENTITY = 'emailsha256';
|
|
26
26
|
var OTHER_IDENTITY = 'other';
|
|
27
|
+
var PerformanceMarks = {
|
|
28
|
+
RoktScriptAppended: 'mp:RoktScriptAppended',
|
|
29
|
+
};
|
|
27
30
|
|
|
28
31
|
self.name = name;
|
|
29
32
|
self.moduleId = moduleId;
|
|
@@ -141,6 +144,7 @@ var constructor = function () {
|
|
|
141
144
|
};
|
|
142
145
|
|
|
143
146
|
target.appendChild(script);
|
|
147
|
+
captureTiming(PerformanceMarks.RoktScriptAppended);
|
|
144
148
|
} else {
|
|
145
149
|
console.warn('Unable to find Rokt on the page');
|
|
146
150
|
}
|
|
@@ -439,14 +443,31 @@ var constructor = function () {
|
|
|
439
443
|
function isPartnerInLocalLauncherTestGroup() {
|
|
440
444
|
return (
|
|
441
445
|
window.mParticle.config &&
|
|
442
|
-
window.mParticle.config.isLocalLauncherEnabled
|
|
446
|
+
window.mParticle.config.isLocalLauncherEnabled &&
|
|
447
|
+
_isAssignedToSampleGroup()
|
|
443
448
|
);
|
|
444
449
|
}
|
|
450
|
+
|
|
451
|
+
function _isAssignedToSampleGroup() {
|
|
452
|
+
var LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD = 0.5;
|
|
453
|
+
return Math.random() > LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
function captureTiming(metricName) {
|
|
457
|
+
if (
|
|
458
|
+
window &&
|
|
459
|
+
window.mParticle &&
|
|
460
|
+
window.mParticle.captureTiming &&
|
|
461
|
+
metricName
|
|
462
|
+
) {
|
|
463
|
+
window.mParticle.captureTiming(metricName);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
445
466
|
};
|
|
446
467
|
|
|
447
468
|
function generateIntegrationName(customIntegrationName) {
|
|
448
469
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
449
|
-
var kitVersion = "1.
|
|
470
|
+
var kitVersion = "1.12.0";
|
|
450
471
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
451
472
|
|
|
452
473
|
if (customIntegrationName) {
|
package/dist/Rokt-Kit.iife.js
CHANGED
|
@@ -23,6 +23,9 @@ var RoktKit = (function (exports) {
|
|
|
23
23
|
var self = this;
|
|
24
24
|
var EMAIL_SHA256_IDENTITY = 'emailsha256';
|
|
25
25
|
var OTHER_IDENTITY = 'other';
|
|
26
|
+
var PerformanceMarks = {
|
|
27
|
+
RoktScriptAppended: 'mp:RoktScriptAppended',
|
|
28
|
+
};
|
|
26
29
|
|
|
27
30
|
self.name = name;
|
|
28
31
|
self.moduleId = moduleId;
|
|
@@ -140,6 +143,7 @@ var RoktKit = (function (exports) {
|
|
|
140
143
|
};
|
|
141
144
|
|
|
142
145
|
target.appendChild(script);
|
|
146
|
+
captureTiming(PerformanceMarks.RoktScriptAppended);
|
|
143
147
|
} else {
|
|
144
148
|
console.warn('Unable to find Rokt on the page');
|
|
145
149
|
}
|
|
@@ -438,14 +442,31 @@ var RoktKit = (function (exports) {
|
|
|
438
442
|
function isPartnerInLocalLauncherTestGroup() {
|
|
439
443
|
return (
|
|
440
444
|
window.mParticle.config &&
|
|
441
|
-
window.mParticle.config.isLocalLauncherEnabled
|
|
445
|
+
window.mParticle.config.isLocalLauncherEnabled &&
|
|
446
|
+
_isAssignedToSampleGroup()
|
|
442
447
|
);
|
|
443
448
|
}
|
|
449
|
+
|
|
450
|
+
function _isAssignedToSampleGroup() {
|
|
451
|
+
var LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD = 0.5;
|
|
452
|
+
return Math.random() > LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
function captureTiming(metricName) {
|
|
456
|
+
if (
|
|
457
|
+
window &&
|
|
458
|
+
window.mParticle &&
|
|
459
|
+
window.mParticle.captureTiming &&
|
|
460
|
+
metricName
|
|
461
|
+
) {
|
|
462
|
+
window.mParticle.captureTiming(metricName);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
444
465
|
};
|
|
445
466
|
|
|
446
467
|
function generateIntegrationName(customIntegrationName) {
|
|
447
468
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
448
|
-
var kitVersion = "1.
|
|
469
|
+
var kitVersion = "1.12.0";
|
|
449
470
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
450
471
|
|
|
451
472
|
if (customIntegrationName) {
|