@mparticle/web-rokt-kit 1.3.0 → 1.3.2
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 +37 -14
- package/dist/Rokt-Kit.iife.js +37 -14
- package/package.json +1 -1
package/dist/Rokt-Kit.common.js
CHANGED
|
@@ -54,14 +54,29 @@ var constructor = function () {
|
|
|
54
54
|
_service,
|
|
55
55
|
testMode,
|
|
56
56
|
_trackerId,
|
|
57
|
-
filteredUserAttributes
|
|
57
|
+
filteredUserAttributes,
|
|
58
|
+
filteredUserIdentities,
|
|
59
|
+
appVersion,
|
|
60
|
+
appName,
|
|
61
|
+
customFlags
|
|
58
62
|
) {
|
|
59
63
|
var accountId = settings.accountId;
|
|
60
64
|
self.userAttributes = filteredUserAttributes;
|
|
61
65
|
self.onboardingExpProvider = settings.onboardingExpProvider;
|
|
62
66
|
|
|
67
|
+
var integrationName =
|
|
68
|
+
customFlags && customFlags['Rokt.integrationName'];
|
|
69
|
+
var noFunctional = customFlags && customFlags['Rokt.noFunctional'];
|
|
70
|
+
var noTargeting = customFlags && customFlags['Rokt.noTargeting'];
|
|
71
|
+
|
|
72
|
+
var launcherOptions = {
|
|
73
|
+
integrationName: generateIntegrationName(integrationName),
|
|
74
|
+
noFunctional: noFunctional,
|
|
75
|
+
noTargeting: noTargeting,
|
|
76
|
+
};
|
|
77
|
+
|
|
63
78
|
if (testMode) {
|
|
64
|
-
attachLauncher(accountId);
|
|
79
|
+
attachLauncher(accountId, launcherOptions);
|
|
65
80
|
return;
|
|
66
81
|
}
|
|
67
82
|
|
|
@@ -82,7 +97,7 @@ var constructor = function () {
|
|
|
82
97
|
typeof window.Rokt.createLauncher === 'function' &&
|
|
83
98
|
window.Rokt.currentLauncher === undefined
|
|
84
99
|
) {
|
|
85
|
-
attachLauncher(accountId);
|
|
100
|
+
attachLauncher(accountId, launcherOptions);
|
|
86
101
|
} else {
|
|
87
102
|
console.error(
|
|
88
103
|
'Rokt object is not available after script load.'
|
|
@@ -156,7 +171,7 @@ var constructor = function () {
|
|
|
156
171
|
attributes: selectPlacementsAttributes,
|
|
157
172
|
});
|
|
158
173
|
|
|
159
|
-
self.launcher.selectPlacements(selectPlacementsOptions);
|
|
174
|
+
return self.launcher.selectPlacements(selectPlacementsOptions);
|
|
160
175
|
}
|
|
161
176
|
|
|
162
177
|
function onUserIdentified(filteredUser) {
|
|
@@ -172,16 +187,13 @@ var constructor = function () {
|
|
|
172
187
|
delete self.userAttributes[key];
|
|
173
188
|
}
|
|
174
189
|
|
|
175
|
-
function attachLauncher(accountId) {
|
|
176
|
-
|
|
177
|
-
accountId: accountId,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
'_kitv_' +
|
|
183
|
-
"1.3.0",
|
|
184
|
-
})
|
|
190
|
+
function attachLauncher(accountId, launcherOptions) {
|
|
191
|
+
var options = mergeObjects(
|
|
192
|
+
{ accountId: accountId },
|
|
193
|
+
launcherOptions || {}
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
window.Rokt.createLauncher(options)
|
|
185
197
|
.then(function (launcher) {
|
|
186
198
|
// Assign the launcher to a global variable for later access
|
|
187
199
|
window.Rokt.currentLauncher = launcher;
|
|
@@ -278,6 +290,17 @@ var constructor = function () {
|
|
|
278
290
|
}
|
|
279
291
|
};
|
|
280
292
|
|
|
293
|
+
function generateIntegrationName(customIntegrationName) {
|
|
294
|
+
var coreSdkVersion = window.mParticle.getVersion();
|
|
295
|
+
var kitVersion = "1.3.2";
|
|
296
|
+
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
297
|
+
|
|
298
|
+
if (customIntegrationName) {
|
|
299
|
+
name += '_' + customIntegrationName;
|
|
300
|
+
}
|
|
301
|
+
return name;
|
|
302
|
+
}
|
|
303
|
+
|
|
281
304
|
function getId() {
|
|
282
305
|
return moduleId;
|
|
283
306
|
}
|
package/dist/Rokt-Kit.iife.js
CHANGED
|
@@ -53,14 +53,29 @@ var RoktKit = (function (exports) {
|
|
|
53
53
|
_service,
|
|
54
54
|
testMode,
|
|
55
55
|
_trackerId,
|
|
56
|
-
filteredUserAttributes
|
|
56
|
+
filteredUserAttributes,
|
|
57
|
+
filteredUserIdentities,
|
|
58
|
+
appVersion,
|
|
59
|
+
appName,
|
|
60
|
+
customFlags
|
|
57
61
|
) {
|
|
58
62
|
var accountId = settings.accountId;
|
|
59
63
|
self.userAttributes = filteredUserAttributes;
|
|
60
64
|
self.onboardingExpProvider = settings.onboardingExpProvider;
|
|
61
65
|
|
|
66
|
+
var integrationName =
|
|
67
|
+
customFlags && customFlags['Rokt.integrationName'];
|
|
68
|
+
var noFunctional = customFlags && customFlags['Rokt.noFunctional'];
|
|
69
|
+
var noTargeting = customFlags && customFlags['Rokt.noTargeting'];
|
|
70
|
+
|
|
71
|
+
var launcherOptions = {
|
|
72
|
+
integrationName: generateIntegrationName(integrationName),
|
|
73
|
+
noFunctional: noFunctional,
|
|
74
|
+
noTargeting: noTargeting,
|
|
75
|
+
};
|
|
76
|
+
|
|
62
77
|
if (testMode) {
|
|
63
|
-
attachLauncher(accountId);
|
|
78
|
+
attachLauncher(accountId, launcherOptions);
|
|
64
79
|
return;
|
|
65
80
|
}
|
|
66
81
|
|
|
@@ -81,7 +96,7 @@ var RoktKit = (function (exports) {
|
|
|
81
96
|
typeof window.Rokt.createLauncher === 'function' &&
|
|
82
97
|
window.Rokt.currentLauncher === undefined
|
|
83
98
|
) {
|
|
84
|
-
attachLauncher(accountId);
|
|
99
|
+
attachLauncher(accountId, launcherOptions);
|
|
85
100
|
} else {
|
|
86
101
|
console.error(
|
|
87
102
|
'Rokt object is not available after script load.'
|
|
@@ -155,7 +170,7 @@ var RoktKit = (function (exports) {
|
|
|
155
170
|
attributes: selectPlacementsAttributes,
|
|
156
171
|
});
|
|
157
172
|
|
|
158
|
-
self.launcher.selectPlacements(selectPlacementsOptions);
|
|
173
|
+
return self.launcher.selectPlacements(selectPlacementsOptions);
|
|
159
174
|
}
|
|
160
175
|
|
|
161
176
|
function onUserIdentified(filteredUser) {
|
|
@@ -171,16 +186,13 @@ var RoktKit = (function (exports) {
|
|
|
171
186
|
delete self.userAttributes[key];
|
|
172
187
|
}
|
|
173
188
|
|
|
174
|
-
function attachLauncher(accountId) {
|
|
175
|
-
|
|
176
|
-
accountId: accountId,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
'_kitv_' +
|
|
182
|
-
"1.3.0",
|
|
183
|
-
})
|
|
189
|
+
function attachLauncher(accountId, launcherOptions) {
|
|
190
|
+
var options = mergeObjects(
|
|
191
|
+
{ accountId: accountId },
|
|
192
|
+
launcherOptions || {}
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
window.Rokt.createLauncher(options)
|
|
184
196
|
.then(function (launcher) {
|
|
185
197
|
// Assign the launcher to a global variable for later access
|
|
186
198
|
window.Rokt.currentLauncher = launcher;
|
|
@@ -277,6 +289,17 @@ var RoktKit = (function (exports) {
|
|
|
277
289
|
}
|
|
278
290
|
};
|
|
279
291
|
|
|
292
|
+
function generateIntegrationName(customIntegrationName) {
|
|
293
|
+
var coreSdkVersion = window.mParticle.getVersion();
|
|
294
|
+
var kitVersion = "1.3.2";
|
|
295
|
+
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
296
|
+
|
|
297
|
+
if (customIntegrationName) {
|
|
298
|
+
name += '_' + customIntegrationName;
|
|
299
|
+
}
|
|
300
|
+
return name;
|
|
301
|
+
}
|
|
302
|
+
|
|
280
303
|
function getId() {
|
|
281
304
|
return moduleId;
|
|
282
305
|
}
|