@mparticle/web-rokt-kit 1.10.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.
@@ -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
  }
@@ -448,11 +452,22 @@ var constructor = function () {
448
452
  var LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD = 0.5;
449
453
  return Math.random() > LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD;
450
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
+ }
451
466
  };
452
467
 
453
468
  function generateIntegrationName(customIntegrationName) {
454
469
  var coreSdkVersion = window.mParticle.getVersion();
455
- var kitVersion = "1.10.0";
470
+ var kitVersion = "1.12.0";
456
471
  var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
457
472
 
458
473
  if (customIntegrationName) {
@@ -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
  }
@@ -447,11 +451,22 @@ var RoktKit = (function (exports) {
447
451
  var LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD = 0.5;
448
452
  return Math.random() > LOCAL_LAUNCHER_TEST_GROUP_THRESHOLD;
449
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
+ }
450
465
  };
451
466
 
452
467
  function generateIntegrationName(customIntegrationName) {
453
468
  var coreSdkVersion = window.mParticle.getVersion();
454
- var kitVersion = "1.10.0";
469
+ var kitVersion = "1.12.0";
455
470
  var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
456
471
 
457
472
  if (customIntegrationName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mparticle/web-rokt-kit",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "description": "mParticle integration kit for Rokt",
5
5
  "main": "dist/Rokt-Kit.common.js",
6
6
  "files": [