@mparticle/web-rokt-kit 1.6.2 → 1.6.3
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 +9 -8
- package/dist/Rokt-Kit.iife.js +9 -8
- package/package.json +1 -1
package/dist/Rokt-Kit.common.js
CHANGED
|
@@ -62,7 +62,7 @@ var constructor = function () {
|
|
|
62
62
|
* hashed attributes from the launcher, or `null` if the kit is not initialized
|
|
63
63
|
*/
|
|
64
64
|
function hashAttributes(attributes) {
|
|
65
|
-
if (!
|
|
65
|
+
if (!isKitReady()) {
|
|
66
66
|
console.error('Rokt Kit: Not initialized');
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
@@ -227,7 +227,7 @@ var constructor = function () {
|
|
|
227
227
|
* @returns {void} Nothing is returned
|
|
228
228
|
*/
|
|
229
229
|
function setExtensionData(partnerExtensionData) {
|
|
230
|
-
if (!
|
|
230
|
+
if (!isKitReady()) {
|
|
231
231
|
console.error('Rokt Kit: Not initialized');
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
@@ -275,10 +275,11 @@ var constructor = function () {
|
|
|
275
275
|
);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
// Attaches the kit to the Rokt manager
|
|
279
|
-
window.mParticle.Rokt.attachKit(self);
|
|
280
278
|
|
|
279
|
+
// Kit must be initialized before attaching to the Rokt manager
|
|
281
280
|
self.isInitialized = true;
|
|
281
|
+
// Attaches the kit to the Rokt manager
|
|
282
|
+
window.mParticle.Rokt.attachKit(self);
|
|
282
283
|
})
|
|
283
284
|
.catch(function (err) {
|
|
284
285
|
console.error('Error creating Rokt launcher:', err);
|
|
@@ -339,20 +340,20 @@ var constructor = function () {
|
|
|
339
340
|
this.removeUserAttribute = removeUserAttribute;
|
|
340
341
|
|
|
341
342
|
/**
|
|
342
|
-
* Checks if the kit is
|
|
343
|
+
* Checks if the Rokt kit is ready to use.
|
|
343
344
|
* Both conditions must be true:
|
|
344
345
|
* 1. self.isInitialized - Set after successful initialization of the kit
|
|
345
346
|
* 2. self.launcher - The Rokt launcher instance must be available
|
|
346
|
-
* @returns {boolean} Whether the kit is
|
|
347
|
+
* @returns {boolean} Whether the kit is ready for use
|
|
347
348
|
*/
|
|
348
|
-
function
|
|
349
|
+
function isKitReady() {
|
|
349
350
|
return !!(self.isInitialized && self.launcher);
|
|
350
351
|
}
|
|
351
352
|
};
|
|
352
353
|
|
|
353
354
|
function generateIntegrationName(customIntegrationName) {
|
|
354
355
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
355
|
-
var kitVersion = "1.6.
|
|
356
|
+
var kitVersion = "1.6.3";
|
|
356
357
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
357
358
|
|
|
358
359
|
if (customIntegrationName) {
|
package/dist/Rokt-Kit.iife.js
CHANGED
|
@@ -61,7 +61,7 @@ var RoktKit = (function (exports) {
|
|
|
61
61
|
* hashed attributes from the launcher, or `null` if the kit is not initialized
|
|
62
62
|
*/
|
|
63
63
|
function hashAttributes(attributes) {
|
|
64
|
-
if (!
|
|
64
|
+
if (!isKitReady()) {
|
|
65
65
|
console.error('Rokt Kit: Not initialized');
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
@@ -226,7 +226,7 @@ var RoktKit = (function (exports) {
|
|
|
226
226
|
* @returns {void} Nothing is returned
|
|
227
227
|
*/
|
|
228
228
|
function setExtensionData(partnerExtensionData) {
|
|
229
|
-
if (!
|
|
229
|
+
if (!isKitReady()) {
|
|
230
230
|
console.error('Rokt Kit: Not initialized');
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
@@ -274,10 +274,11 @@ var RoktKit = (function (exports) {
|
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
// Attaches the kit to the Rokt manager
|
|
278
|
-
window.mParticle.Rokt.attachKit(self);
|
|
279
277
|
|
|
278
|
+
// Kit must be initialized before attaching to the Rokt manager
|
|
280
279
|
self.isInitialized = true;
|
|
280
|
+
// Attaches the kit to the Rokt manager
|
|
281
|
+
window.mParticle.Rokt.attachKit(self);
|
|
281
282
|
})
|
|
282
283
|
.catch(function (err) {
|
|
283
284
|
console.error('Error creating Rokt launcher:', err);
|
|
@@ -338,20 +339,20 @@ var RoktKit = (function (exports) {
|
|
|
338
339
|
this.removeUserAttribute = removeUserAttribute;
|
|
339
340
|
|
|
340
341
|
/**
|
|
341
|
-
* Checks if the kit is
|
|
342
|
+
* Checks if the Rokt kit is ready to use.
|
|
342
343
|
* Both conditions must be true:
|
|
343
344
|
* 1. self.isInitialized - Set after successful initialization of the kit
|
|
344
345
|
* 2. self.launcher - The Rokt launcher instance must be available
|
|
345
|
-
* @returns {boolean} Whether the kit is
|
|
346
|
+
* @returns {boolean} Whether the kit is ready for use
|
|
346
347
|
*/
|
|
347
|
-
function
|
|
348
|
+
function isKitReady() {
|
|
348
349
|
return !!(self.isInitialized && self.launcher);
|
|
349
350
|
}
|
|
350
351
|
};
|
|
351
352
|
|
|
352
353
|
function generateIntegrationName(customIntegrationName) {
|
|
353
354
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
354
|
-
var kitVersion = "1.6.
|
|
355
|
+
var kitVersion = "1.6.3";
|
|
355
356
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
356
357
|
|
|
357
358
|
if (customIntegrationName) {
|