rudder-sdk-js 1.4.2 → 1.4.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.
Files changed (2) hide show
  1. package/index.js +70 -59
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5519,7 +5519,7 @@
5519
5519
  PRODUCT_REVIEWED: "Product Reviewed"
5520
5520
  }; // Enumeration for integrations supported
5521
5521
 
5522
- var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.4.2";
5522
+ var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.4.3";
5523
5523
  var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
5524
5524
  var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
5525
5525
  var POLYFILL_URL = "https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries";
@@ -33711,61 +33711,69 @@
33711
33711
  _createClass(VWO, [{
33712
33712
  key: "init",
33713
33713
  value: function init() {
33714
- logger.debug("===in init VWO===");
33715
- var account_id = this.accountId;
33716
- var settings_tolerance = this.settingsTolerance;
33717
- var _library_tolerance = this.libraryTolerance;
33718
- var _use_existing_jquery = this.useExistingJquery;
33719
- var isSPA = this.isSPA;
33720
-
33721
- window._vwo_code = function () {
33722
- var f = false;
33723
- var d = document;
33724
- return {
33725
- use_existing_jquery: function use_existing_jquery() {
33726
- return _use_existing_jquery;
33727
- },
33728
- library_tolerance: function library_tolerance() {
33729
- return _library_tolerance;
33730
- },
33731
- finish: function finish() {
33732
- if (!f) {
33733
- f = true;
33734
- var a = d.getElementById("_vis_opt_path_hides");
33735
- if (a) a.parentNode.removeChild(a);
33714
+ var _this$analytics$loadO, _this$analytics$loadO2;
33715
+
33716
+ logger.debug("===In init VWO===");
33717
+
33718
+ if ((_this$analytics$loadO = this.analytics.loadOnlyIntegrations) !== null && _this$analytics$loadO !== void 0 && (_this$analytics$loadO2 = _this$analytics$loadO.VWO) !== null && _this$analytics$loadO2 !== void 0 && _this$analytics$loadO2.loadIntegration) {
33719
+ var account_id = this.accountId;
33720
+ var settings_tolerance = this.settingsTolerance;
33721
+ var _library_tolerance = this.libraryTolerance;
33722
+ var _use_existing_jquery = this.useExistingJquery;
33723
+ var isSPA = this.isSPA;
33724
+
33725
+ window._vwo_code = function () {
33726
+ var f = false;
33727
+ var d = document;
33728
+ return {
33729
+ use_existing_jquery: function use_existing_jquery() {
33730
+ return _use_existing_jquery;
33731
+ },
33732
+ library_tolerance: function library_tolerance() {
33733
+ return _library_tolerance;
33734
+ },
33735
+ finish: function finish() {
33736
+ if (!f) {
33737
+ f = true;
33738
+ var a = d.getElementById("_vis_opt_path_hides");
33739
+ if (a) a.parentNode.removeChild(a);
33740
+ }
33741
+ },
33742
+ finished: function finished() {
33743
+ return f;
33744
+ },
33745
+ load: function load(a) {
33746
+ var b = d.createElement("script");
33747
+ b.src = a;
33748
+ b.type = "text/javascript";
33749
+ b.innerText;
33750
+
33751
+ b.onerror = function () {
33752
+ _vwo_code.finish();
33753
+ };
33754
+
33755
+ d.getElementsByTagName("head")[0].appendChild(b);
33756
+ },
33757
+ init: function init() {
33758
+ var settings_timer = setTimeout("_vwo_code.finish()", settings_tolerance);
33759
+ var a = d.createElement("style");
33760
+ var b = "body{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}";
33761
+ var h = d.getElementsByTagName("head")[0];
33762
+ a.setAttribute("id", "_vis_opt_path_hides");
33763
+ a.setAttribute("type", "text/css");
33764
+ if (a.styleSheet) a.styleSheet.cssText = b;else a.appendChild(d.createTextNode(b));
33765
+ h.appendChild(a);
33766
+ this.load("//dev.visualwebsiteoptimizer.com/j.php?a=".concat(account_id, "&u=").concat(encodeURIComponent(d.URL), "&r=").concat(Math.random(), "&f=").concat(+isSPA));
33767
+ return settings_timer;
33736
33768
  }
33737
- },
33738
- finished: function finished() {
33739
- return f;
33740
- },
33741
- load: function load(a) {
33742
- var b = d.createElement("script");
33743
- b.src = a;
33744
- b.type = "text/javascript";
33745
- b.innerText;
33746
-
33747
- b.onerror = function () {
33748
- _vwo_code.finish();
33749
- };
33769
+ };
33770
+ }();
33750
33771
 
33751
- d.getElementsByTagName("head")[0].appendChild(b);
33752
- },
33753
- init: function init() {
33754
- var settings_timer = setTimeout("_vwo_code.finish()", settings_tolerance);
33755
- var a = d.createElement("style");
33756
- var b = "body{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}";
33757
- var h = d.getElementsByTagName("head")[0];
33758
- a.setAttribute("id", "_vis_opt_path_hides");
33759
- a.setAttribute("type", "text/css");
33760
- if (a.styleSheet) a.styleSheet.cssText = b;else a.appendChild(d.createTextNode(b));
33761
- h.appendChild(a);
33762
- this.load("//dev.visualwebsiteoptimizer.com/j.php?a=".concat(account_id, "&u=").concat(encodeURIComponent(d.URL), "&r=").concat(Math.random(), "&f=").concat(+isSPA));
33763
- return settings_timer;
33764
- }
33765
- };
33766
- }();
33772
+ window._vwo_settings_timer = window._vwo_code.init();
33773
+ } else {
33774
+ logger.debug("===[VWO]loadIntegration flag is disabled===");
33775
+ } // Send track or iddentify when
33767
33776
 
33768
- window._vwo_settings_timer = window._vwo_code.init(); // Send track or iddentify when
33769
33777
 
33770
33778
  if (this.sendExperimentTrack || this.experimentViewedIdentify) {
33771
33779
  this.experimentViewed();
@@ -33816,12 +33824,13 @@
33816
33824
  }
33817
33825
  }, {
33818
33826
  key: "identify",
33819
- value: function identify(rudderElement) {
33820
- logger.debug("method not supported");
33827
+ value: function identify() {
33828
+ logger.debug("[VWO] identify:: method not supported");
33821
33829
  }
33822
33830
  }, {
33823
33831
  key: "track",
33824
33832
  value: function track(rudderElement) {
33833
+ logger.debug("===In VWO track===");
33825
33834
  var eventName = rudderElement.message.event;
33826
33835
 
33827
33836
  if (eventName === "Order Completed") {
@@ -33833,17 +33842,19 @@
33833
33842
  }
33834
33843
  }, {
33835
33844
  key: "page",
33836
- value: function page(rudderElement) {
33837
- logger.debug("method not supported");
33845
+ value: function page() {
33846
+ logger.debug("[VWO] page:: method not supported");
33838
33847
  }
33839
33848
  }, {
33840
33849
  key: "isLoaded",
33841
33850
  value: function isLoaded() {
33851
+ logger.debug("===In isLoaded VWO===");
33842
33852
  return !!window._vwo_code;
33843
33853
  }
33844
33854
  }, {
33845
33855
  key: "isReady",
33846
33856
  value: function isReady() {
33857
+ logger.debug("===In isReady VWO===");
33847
33858
  return !!window._vwo_code;
33848
33859
  }
33849
33860
  }]);
@@ -34221,7 +34232,7 @@
34221
34232
  this.build = "1.0.0";
34222
34233
  this.name = "RudderLabs JavaScript SDK";
34223
34234
  this.namespace = "com.rudderlabs.javascript";
34224
- this.version = "1.4.2";
34235
+ this.version = "1.4.3";
34225
34236
  });
34226
34237
 
34227
34238
  // Library information class
@@ -34229,7 +34240,7 @@
34229
34240
  _classCallCheck(this, RudderLibraryInfo);
34230
34241
 
34231
34242
  this.name = "RudderLabs JavaScript SDK";
34232
- this.version = "1.4.2";
34243
+ this.version = "1.4.3";
34233
34244
  }); // Operating System information class
34234
34245
 
34235
34246
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rudder-sdk-js",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "RudderStack Javascript SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",