rudder-sdk-js 2.9.5 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +212 -154
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4548,9 +4548,18 @@
4548
4548
  // import logger from "../utils/logUtil";
4549
4549
  var defaultAsyncState = true;
4550
4550
  var LOAD_ORIGIN = "RS_JS_SDK";
4551
+ /**
4552
+ * Script loader
4553
+ * @param {String} id Id of the script
4554
+ * @param {String} src URL of the script
4555
+ * @param {Object} options Object containing different configuaration
4556
+ * @param {Boolean} options.async Determines script will be loaded asynchronously or not
4557
+ * @param {Boolean} options.isNonNativeSDK Determines whether the script that will be loaded is one of RS's own
4558
+ * @param {Boolean} options.skipDatasetAttributes Determines whether to add or skip dataset attribute
4559
+ */
4551
4560
 
4552
4561
  var ScriptLoader = function ScriptLoader(id, src) {
4553
- var async = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultAsyncState;
4562
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4554
4563
  var exists = document.getElementById(id);
4555
4564
 
4556
4565
  if (exists) {
@@ -4560,10 +4569,18 @@
4560
4569
 
4561
4570
  var js = document.createElement("script");
4562
4571
  js.src = src;
4563
- js.async = async === undefined ? defaultAsyncState : async;
4572
+ js.async = options.async === undefined ? defaultAsyncState : options.async;
4564
4573
  js.type = "text/javascript";
4565
- js.id = id;
4566
- js.dataset.loader = LOAD_ORIGIN;
4574
+ js.id = id; // This checking is in place to skip the dataset attribute for some cases(while loading polyfill)
4575
+
4576
+ if (options.skipDatasetAttributes !== true) {
4577
+ js.setAttribute("data-loader", LOAD_ORIGIN);
4578
+
4579
+ if (options.isNonNativeSDK !== undefined) {
4580
+ js.setAttribute("data-isNonNativeSDK", options.isNonNativeSDK);
4581
+ }
4582
+ }
4583
+
4567
4584
  var headElmColl = document.getElementsByTagName("head");
4568
4585
 
4569
4586
  if (headElmColl.length !== 0) {
@@ -4627,262 +4644,267 @@
4627
4644
  }
4628
4645
  };
4629
4646
 
4647
+ var _CNameMapping$N;
4648
+
4649
+ var NAME$O = "ADOBE_ANALYTICS";
4650
+ var CNameMapping$O = (_CNameMapping$N = {
4651
+ "Adobe Analytics": NAME$O
4652
+ }, _defineProperty(_CNameMapping$N, NAME$O, NAME$O), _defineProperty(_CNameMapping$N, "AdobeAnalytics", NAME$O), _defineProperty(_CNameMapping$N, "adobeanalytics", NAME$O), _CNameMapping$N);
4653
+
4630
4654
  var _CNameMapping$M;
4631
4655
 
4632
- var NAME$N = "ADOBE_ANALYTICS";
4633
- var CNameMapping$N = (_CNameMapping$M = {
4634
- "Adobe Analytics": NAME$N
4635
- }, _defineProperty(_CNameMapping$M, NAME$N, NAME$N), _defineProperty(_CNameMapping$M, "AdobeAnalytics", NAME$N), _defineProperty(_CNameMapping$M, "adobeanalytics", NAME$N), _CNameMapping$M);
4656
+ var NAME$N = "AM";
4657
+ var CNameMapping$N = (_CNameMapping$M = {}, _defineProperty(_CNameMapping$M, NAME$N, NAME$N), _defineProperty(_CNameMapping$M, "AMPLITUDE", NAME$N), _defineProperty(_CNameMapping$M, "Amplitude", NAME$N), _CNameMapping$M);
4636
4658
 
4637
4659
  var _CNameMapping$L;
4638
4660
 
4639
- var NAME$M = "AM";
4640
- var CNameMapping$M = (_CNameMapping$L = {}, _defineProperty(_CNameMapping$L, NAME$M, NAME$M), _defineProperty(_CNameMapping$L, "AMPLITUDE", NAME$M), _defineProperty(_CNameMapping$L, "Amplitude", NAME$M), _CNameMapping$L);
4661
+ var NAME$M = "APPCUES";
4662
+ var CNameMapping$M = (_CNameMapping$L = {}, _defineProperty(_CNameMapping$L, NAME$M, NAME$M), _defineProperty(_CNameMapping$L, "Appcues", NAME$M), _CNameMapping$L);
4641
4663
 
4642
4664
  var _CNameMapping$K;
4643
4665
 
4644
- var NAME$L = "APPCUES";
4645
- var CNameMapping$L = (_CNameMapping$K = {}, _defineProperty(_CNameMapping$K, NAME$L, NAME$L), _defineProperty(_CNameMapping$K, "Appcues", NAME$L), _CNameMapping$K);
4666
+ var NAME$L = "BINGADS";
4667
+ var CNameMapping$L = (_CNameMapping$K = {}, _defineProperty(_CNameMapping$K, NAME$L, NAME$L), _defineProperty(_CNameMapping$K, "BingAds", NAME$L), _CNameMapping$K);
4646
4668
 
4647
4669
  var _CNameMapping$J;
4648
4670
 
4649
- var NAME$K = "BINGADS";
4650
- var CNameMapping$K = (_CNameMapping$J = {}, _defineProperty(_CNameMapping$J, NAME$K, NAME$K), _defineProperty(_CNameMapping$J, "BingAds", NAME$K), _CNameMapping$J);
4671
+ var NAME$K = "BRAZE";
4672
+ var CNameMapping$K = (_CNameMapping$J = {}, _defineProperty(_CNameMapping$J, NAME$K, NAME$K), _defineProperty(_CNameMapping$J, "Braze", NAME$K), _CNameMapping$J);
4651
4673
 
4652
- var _CNameMapping$I;
4674
+ var NAME$J = "BUGSNAG";
4653
4675
 
4654
- var NAME$J = "BRAZE";
4655
- var CNameMapping$J = (_CNameMapping$I = {}, _defineProperty(_CNameMapping$I, NAME$J, NAME$J), _defineProperty(_CNameMapping$I, "Braze", NAME$J), _CNameMapping$I);
4676
+ var CNameMapping$J = _defineProperty({}, NAME$J, NAME$J);
4656
4677
 
4657
- var NAME$I = "BUGSNAG";
4678
+ var _CNameMapping$I;
4658
4679
 
4659
- var CNameMapping$I = _defineProperty({}, NAME$I, NAME$I);
4680
+ var NAME$I = "CHARTBEAT";
4681
+ var CNameMapping$I = (_CNameMapping$I = {}, _defineProperty(_CNameMapping$I, NAME$I, NAME$I), _defineProperty(_CNameMapping$I, "Chartbeat", NAME$I), _CNameMapping$I);
4660
4682
 
4661
4683
  var _CNameMapping$H;
4662
4684
 
4663
- var NAME$H = "CHARTBEAT";
4664
- var CNameMapping$H = (_CNameMapping$H = {}, _defineProperty(_CNameMapping$H, NAME$H, NAME$H), _defineProperty(_CNameMapping$H, "Chartbeat", NAME$H), _CNameMapping$H);
4685
+ var NAME$H = "CLEVERTAP";
4686
+ var CNameMapping$H = (_CNameMapping$H = {}, _defineProperty(_CNameMapping$H, NAME$H, NAME$H), _defineProperty(_CNameMapping$H, "Clevertap", NAME$H), _CNameMapping$H);
4665
4687
 
4666
4688
  var _CNameMapping$G;
4667
4689
 
4668
- var NAME$G = "CLEVERTAP";
4669
- var CNameMapping$G = (_CNameMapping$G = {}, _defineProperty(_CNameMapping$G, NAME$G, NAME$G), _defineProperty(_CNameMapping$G, "Clevertap", NAME$G), _CNameMapping$G);
4690
+ var NAME$G = "COMSCORE";
4691
+ var CNameMapping$G = (_CNameMapping$G = {}, _defineProperty(_CNameMapping$G, NAME$G, NAME$G), _defineProperty(_CNameMapping$G, "Comscore", NAME$G), _CNameMapping$G);
4670
4692
 
4671
4693
  var _CNameMapping$F;
4672
4694
 
4673
- var NAME$F = "COMSCORE";
4674
- var CNameMapping$F = (_CNameMapping$F = {}, _defineProperty(_CNameMapping$F, NAME$F, NAME$F), _defineProperty(_CNameMapping$F, "Comscore", NAME$F), _CNameMapping$F);
4695
+ var NAME$F = "CRITEO";
4696
+ var CNameMapping$F = (_CNameMapping$F = {}, _defineProperty(_CNameMapping$F, NAME$F, NAME$F), _defineProperty(_CNameMapping$F, "Criteo", NAME$F), _defineProperty(_CNameMapping$F, "criteo", NAME$F), _CNameMapping$F);
4675
4697
 
4676
4698
  var _CNameMapping$E;
4677
4699
 
4678
- var NAME$E = "CRITEO";
4679
- var CNameMapping$E = (_CNameMapping$E = {}, _defineProperty(_CNameMapping$E, NAME$E, NAME$E), _defineProperty(_CNameMapping$E, "Criteo", NAME$E), _defineProperty(_CNameMapping$E, "criteo", NAME$E), _CNameMapping$E);
4700
+ var NAME$E = "CUSTOMERIO";
4701
+ var CNameMapping$E = (_CNameMapping$E = {}, _defineProperty(_CNameMapping$E, NAME$E, NAME$E), _defineProperty(_CNameMapping$E, "Customerio", NAME$E), _defineProperty(_CNameMapping$E, "Customer.io", NAME$E), _CNameMapping$E);
4680
4702
 
4681
4703
  var _CNameMapping$D;
4682
4704
 
4683
- var NAME$D = "CUSTOMERIO";
4684
- var CNameMapping$D = (_CNameMapping$D = {}, _defineProperty(_CNameMapping$D, NAME$D, NAME$D), _defineProperty(_CNameMapping$D, "Customerio", NAME$D), _defineProperty(_CNameMapping$D, "Customer.io", NAME$D), _CNameMapping$D);
4705
+ var NAME$D = "DRIP";
4706
+ var CNameMapping$D = (_CNameMapping$D = {}, _defineProperty(_CNameMapping$D, NAME$D, NAME$D), _defineProperty(_CNameMapping$D, "Drip", NAME$D), _defineProperty(_CNameMapping$D, "drip", NAME$D), _CNameMapping$D);
4685
4707
 
4686
4708
  var _CNameMapping$C;
4687
4709
 
4688
- var NAME$C = "DRIP";
4689
- var CNameMapping$C = (_CNameMapping$C = {}, _defineProperty(_CNameMapping$C, NAME$C, NAME$C), _defineProperty(_CNameMapping$C, "Drip", NAME$C), _defineProperty(_CNameMapping$C, "drip", NAME$C), _CNameMapping$C);
4710
+ var NAME$C = "FACEBOOK_PIXEL";
4711
+ var CNameMapping$C = (_CNameMapping$C = {}, _defineProperty(_CNameMapping$C, NAME$C, NAME$C), _defineProperty(_CNameMapping$C, "FB Pixel", NAME$C), _defineProperty(_CNameMapping$C, "Facebook Pixel", NAME$C), _defineProperty(_CNameMapping$C, "FB_PIXEL", NAME$C), _CNameMapping$C);
4690
4712
 
4691
4713
  var _CNameMapping$B;
4692
4714
 
4693
- var NAME$B = "FACEBOOK_PIXEL";
4694
- var CNameMapping$B = (_CNameMapping$B = {}, _defineProperty(_CNameMapping$B, NAME$B, NAME$B), _defineProperty(_CNameMapping$B, "FB Pixel", NAME$B), _defineProperty(_CNameMapping$B, "Facebook Pixel", NAME$B), _defineProperty(_CNameMapping$B, "FB_PIXEL", NAME$B), _CNameMapping$B);
4715
+ var NAME$B = "FULLSTORY";
4716
+ var CNameMapping$B = (_CNameMapping$B = {}, _defineProperty(_CNameMapping$B, NAME$B, NAME$B), _defineProperty(_CNameMapping$B, "Fullstory", NAME$B), _defineProperty(_CNameMapping$B, "FullStory", NAME$B), _CNameMapping$B);
4695
4717
 
4696
4718
  var _CNameMapping$A;
4697
4719
 
4698
- var NAME$A = "FULLSTORY";
4699
- var CNameMapping$A = (_CNameMapping$A = {}, _defineProperty(_CNameMapping$A, NAME$A, NAME$A), _defineProperty(_CNameMapping$A, "Fullstory", NAME$A), _defineProperty(_CNameMapping$A, "FullStory", NAME$A), _CNameMapping$A);
4720
+ var NAME$A = "GA";
4721
+ var CNameMapping$A = (_CNameMapping$A = {}, _defineProperty(_CNameMapping$A, NAME$A, NAME$A), _defineProperty(_CNameMapping$A, "Google Analytics", NAME$A), _defineProperty(_CNameMapping$A, "GoogleAnalytics", NAME$A), _CNameMapping$A);
4700
4722
 
4701
4723
  var _CNameMapping$z;
4702
4724
 
4703
- var NAME$z = "GA";
4704
- var CNameMapping$z = (_CNameMapping$z = {}, _defineProperty(_CNameMapping$z, NAME$z, NAME$z), _defineProperty(_CNameMapping$z, "Google Analytics", NAME$z), _defineProperty(_CNameMapping$z, "GoogleAnalytics", NAME$z), _CNameMapping$z);
4725
+ var NAME$z = "GA4";
4726
+ var CNameMapping$z = (_CNameMapping$z = {}, _defineProperty(_CNameMapping$z, NAME$z, NAME$z), _defineProperty(_CNameMapping$z, "Google Analytics 4", NAME$z), _defineProperty(_CNameMapping$z, "GoogleAnalytics4", NAME$z), _CNameMapping$z);
4705
4727
 
4706
4728
  var _CNameMapping$y;
4707
4729
 
4708
- var NAME$y = "GA4";
4709
- var CNameMapping$y = (_CNameMapping$y = {}, _defineProperty(_CNameMapping$y, NAME$y, NAME$y), _defineProperty(_CNameMapping$y, "Google Analytics 4", NAME$y), _defineProperty(_CNameMapping$y, "GoogleAnalytics4", NAME$y), _CNameMapping$y);
4730
+ var NAME$y = "GOOGLEADS";
4731
+ var CNameMapping$y = (_CNameMapping$y = {}, _defineProperty(_CNameMapping$y, NAME$y, NAME$y), _defineProperty(_CNameMapping$y, "Google Ads", NAME$y), _defineProperty(_CNameMapping$y, "GoogleAds", NAME$y), _CNameMapping$y);
4710
4732
 
4711
4733
  var _CNameMapping$x;
4712
4734
 
4713
- var NAME$x = "GOOGLEADS";
4714
- var CNameMapping$x = (_CNameMapping$x = {}, _defineProperty(_CNameMapping$x, NAME$x, NAME$x), _defineProperty(_CNameMapping$x, "Google Ads", NAME$x), _defineProperty(_CNameMapping$x, "GoogleAds", NAME$x), _CNameMapping$x);
4735
+ var NAME$x = "GOOGLE_OPTIMIZE";
4736
+ var CNameMapping$x = (_CNameMapping$x = {}, _defineProperty(_CNameMapping$x, NAME$x, NAME$x), _defineProperty(_CNameMapping$x, "Google Optimize", NAME$x), _defineProperty(_CNameMapping$x, "GoogleOptimize", NAME$x), _defineProperty(_CNameMapping$x, "Googleoptimize", NAME$x), _defineProperty(_CNameMapping$x, "GOOGLEOPTIMIZE", NAME$x), _CNameMapping$x);
4715
4737
 
4716
4738
  var _CNameMapping$w;
4717
4739
 
4718
- var NAME$w = "GOOGLE_OPTIMIZE";
4719
- var CNameMapping$w = (_CNameMapping$w = {}, _defineProperty(_CNameMapping$w, NAME$w, NAME$w), _defineProperty(_CNameMapping$w, "Google Optimize", NAME$w), _defineProperty(_CNameMapping$w, "GoogleOptimize", NAME$w), _defineProperty(_CNameMapping$w, "Googleoptimize", NAME$w), _defineProperty(_CNameMapping$w, "GOOGLEOPTIMIZE", NAME$w), _CNameMapping$w);
4740
+ var NAME$w = "GTM";
4741
+ var CNameMapping$w = (_CNameMapping$w = {}, _defineProperty(_CNameMapping$w, NAME$w, NAME$w), _defineProperty(_CNameMapping$w, "Google Tag Manager", NAME$w), _CNameMapping$w);
4720
4742
 
4721
4743
  var _CNameMapping$v;
4722
4744
 
4723
- var NAME$v = "GTM";
4724
- var CNameMapping$v = (_CNameMapping$v = {}, _defineProperty(_CNameMapping$v, NAME$v, NAME$v), _defineProperty(_CNameMapping$v, "Google Tag Manager", NAME$v), _CNameMapping$v);
4745
+ var NAME$v = "HEAP";
4746
+ var CNameMapping$v = (_CNameMapping$v = {}, _defineProperty(_CNameMapping$v, NAME$v, NAME$v), _defineProperty(_CNameMapping$v, "Heap", NAME$v), _defineProperty(_CNameMapping$v, "heap", NAME$v), _defineProperty(_CNameMapping$v, "Heap.io", NAME$v), _CNameMapping$v);
4725
4747
 
4726
4748
  var _CNameMapping$u;
4727
4749
 
4728
- var NAME$u = "HEAP";
4729
- var CNameMapping$u = (_CNameMapping$u = {}, _defineProperty(_CNameMapping$u, NAME$u, NAME$u), _defineProperty(_CNameMapping$u, "Heap", NAME$u), _defineProperty(_CNameMapping$u, "heap", NAME$u), _defineProperty(_CNameMapping$u, "Heap.io", NAME$u), _CNameMapping$u);
4750
+ var NAME$u = "HOTJAR";
4751
+ var CNameMapping$u = (_CNameMapping$u = {}, _defineProperty(_CNameMapping$u, NAME$u, NAME$u), _defineProperty(_CNameMapping$u, "Hotjar", NAME$u), _defineProperty(_CNameMapping$u, "hotjar", NAME$u), _CNameMapping$u);
4730
4752
 
4731
4753
  var _CNameMapping$t;
4732
4754
 
4733
- var NAME$t = "HOTJAR";
4734
- var CNameMapping$t = (_CNameMapping$t = {}, _defineProperty(_CNameMapping$t, NAME$t, NAME$t), _defineProperty(_CNameMapping$t, "Hotjar", NAME$t), _defineProperty(_CNameMapping$t, "hotjar", NAME$t), _CNameMapping$t);
4755
+ var NAME$t = "HS";
4756
+ var CNameMapping$t = (_CNameMapping$t = {}, _defineProperty(_CNameMapping$t, NAME$t, NAME$t), _defineProperty(_CNameMapping$t, "Hubspot", NAME$t), _defineProperty(_CNameMapping$t, "HUBSPOT", NAME$t), _CNameMapping$t);
4735
4757
 
4736
4758
  var _CNameMapping$s;
4737
4759
 
4738
- var NAME$s = "HS";
4739
- var CNameMapping$s = (_CNameMapping$s = {}, _defineProperty(_CNameMapping$s, NAME$s, NAME$s), _defineProperty(_CNameMapping$s, "Hubspot", NAME$s), _defineProperty(_CNameMapping$s, "HUBSPOT", NAME$s), _CNameMapping$s);
4760
+ var NAME$s = "INTERCOM";
4761
+ var CNameMapping$s = (_CNameMapping$s = {}, _defineProperty(_CNameMapping$s, NAME$s, NAME$s), _defineProperty(_CNameMapping$s, "Intercom", NAME$s), _CNameMapping$s);
4740
4762
 
4741
4763
  var _CNameMapping$r;
4742
4764
 
4743
- var NAME$r = "INTERCOM";
4744
- var CNameMapping$r = (_CNameMapping$r = {}, _defineProperty(_CNameMapping$r, NAME$r, NAME$r), _defineProperty(_CNameMapping$r, "Intercom", NAME$r), _CNameMapping$r);
4765
+ var NAME$r = "KEEN";
4766
+ var CNameMapping$r = (_CNameMapping$r = {}, _defineProperty(_CNameMapping$r, NAME$r, NAME$r), _defineProperty(_CNameMapping$r, "Keen", NAME$r), _defineProperty(_CNameMapping$r, "Keen.io", NAME$r), _CNameMapping$r);
4745
4767
 
4746
4768
  var _CNameMapping$q;
4747
4769
 
4748
- var NAME$q = "KEEN";
4749
- var CNameMapping$q = (_CNameMapping$q = {}, _defineProperty(_CNameMapping$q, NAME$q, NAME$q), _defineProperty(_CNameMapping$q, "Keen", NAME$q), _defineProperty(_CNameMapping$q, "Keen.io", NAME$q), _CNameMapping$q);
4770
+ var NAME$q = "KISSMETRICS";
4771
+ var CNameMapping$q = (_CNameMapping$q = {}, _defineProperty(_CNameMapping$q, NAME$q, NAME$q), _defineProperty(_CNameMapping$q, "Kissmetrics", NAME$q), _CNameMapping$q);
4750
4772
 
4751
4773
  var _CNameMapping$p;
4752
4774
 
4753
- var NAME$p = "KISSMETRICS";
4754
- var CNameMapping$p = (_CNameMapping$p = {}, _defineProperty(_CNameMapping$p, NAME$p, NAME$p), _defineProperty(_CNameMapping$p, "Kissmetrics", NAME$p), _CNameMapping$p);
4775
+ var NAME$p = "KLAVIYO";
4776
+ var CNameMapping$p = (_CNameMapping$p = {}, _defineProperty(_CNameMapping$p, NAME$p, NAME$p), _defineProperty(_CNameMapping$p, "Klaviyo", NAME$p), _CNameMapping$p);
4755
4777
 
4756
4778
  var _CNameMapping$o;
4757
4779
 
4758
- var NAME$o = "KLAVIYO";
4759
- var CNameMapping$o = (_CNameMapping$o = {}, _defineProperty(_CNameMapping$o, NAME$o, NAME$o), _defineProperty(_CNameMapping$o, "Klaviyo", NAME$o), _CNameMapping$o);
4780
+ var NAME$o = "LAUNCHDARKLY";
4781
+ var CNameMapping$o = (_CNameMapping$o = {}, _defineProperty(_CNameMapping$o, NAME$o, NAME$o), _defineProperty(_CNameMapping$o, "LaunchDarkly", NAME$o), _defineProperty(_CNameMapping$o, "Launch_Darkly", NAME$o), _defineProperty(_CNameMapping$o, "Launch Darkly", NAME$o), _defineProperty(_CNameMapping$o, "launchDarkly", NAME$o), _CNameMapping$o);
4760
4782
 
4761
4783
  var _CNameMapping$n;
4762
4784
 
4763
- var NAME$n = "LAUNCHDARKLY";
4764
- var CNameMapping$n = (_CNameMapping$n = {}, _defineProperty(_CNameMapping$n, NAME$n, NAME$n), _defineProperty(_CNameMapping$n, "LaunchDarkly", NAME$n), _defineProperty(_CNameMapping$n, "Launch_Darkly", NAME$n), _defineProperty(_CNameMapping$n, "Launch Darkly", NAME$n), _defineProperty(_CNameMapping$n, "launchDarkly", NAME$n), _CNameMapping$n);
4785
+ var NAME$n = "LINKEDIN_INSIGHT_TAG";
4786
+ var CNameMapping$n = (_CNameMapping$n = {}, _defineProperty(_CNameMapping$n, NAME$n, NAME$n), _defineProperty(_CNameMapping$n, "LinkedIn Insight Tag", NAME$n), _defineProperty(_CNameMapping$n, "Linkedin_insight_tag", NAME$n), _defineProperty(_CNameMapping$n, "LinkedinInsighttag", NAME$n), _defineProperty(_CNameMapping$n, "LinkedinInsightTag", NAME$n), _defineProperty(_CNameMapping$n, "LinkedInInsightTag", NAME$n), _defineProperty(_CNameMapping$n, "Linkedininsighttag", NAME$n), _defineProperty(_CNameMapping$n, "LINKEDININSIGHTTAG", NAME$n), _CNameMapping$n);
4765
4787
 
4766
4788
  var _CNameMapping$m;
4767
4789
 
4768
- var NAME$m = "LINKEDIN_INSIGHT_TAG";
4769
- var CNameMapping$m = (_CNameMapping$m = {}, _defineProperty(_CNameMapping$m, NAME$m, NAME$m), _defineProperty(_CNameMapping$m, "LinkedIn Insight Tag", NAME$m), _defineProperty(_CNameMapping$m, "Linkedin_insight_tag", NAME$m), _defineProperty(_CNameMapping$m, "LinkedinInsighttag", NAME$m), _defineProperty(_CNameMapping$m, "LinkedinInsightTag", NAME$m), _defineProperty(_CNameMapping$m, "LinkedInInsightTag", NAME$m), _defineProperty(_CNameMapping$m, "Linkedininsighttag", NAME$m), _defineProperty(_CNameMapping$m, "LINKEDININSIGHTTAG", NAME$m), _CNameMapping$m);
4790
+ var NAME$m = "LOTAME";
4791
+ var CNameMapping$m = (_CNameMapping$m = {}, _defineProperty(_CNameMapping$m, NAME$m, NAME$m), _defineProperty(_CNameMapping$m, "Lotame", NAME$m), _CNameMapping$m);
4770
4792
 
4771
4793
  var _CNameMapping$l;
4772
4794
 
4773
- var NAME$l = "LOTAME";
4774
- var CNameMapping$l = (_CNameMapping$l = {}, _defineProperty(_CNameMapping$l, NAME$l, NAME$l), _defineProperty(_CNameMapping$l, "Lotame", NAME$l), _CNameMapping$l);
4795
+ var NAME$l = "LYTICS";
4796
+ var CNameMapping$l = (_CNameMapping$l = {}, _defineProperty(_CNameMapping$l, NAME$l, NAME$l), _defineProperty(_CNameMapping$l, "Lytics", NAME$l), _CNameMapping$l);
4775
4797
 
4776
4798
  var _CNameMapping$k;
4777
4799
 
4778
- var NAME$k = "LYTICS";
4779
- var CNameMapping$k = (_CNameMapping$k = {}, _defineProperty(_CNameMapping$k, NAME$k, NAME$k), _defineProperty(_CNameMapping$k, "Lytics", NAME$k), _CNameMapping$k);
4800
+ var NAME$k = "MP";
4801
+ var CNameMapping$k = (_CNameMapping$k = {}, _defineProperty(_CNameMapping$k, NAME$k, NAME$k), _defineProperty(_CNameMapping$k, "MIXPANEL", NAME$k), _defineProperty(_CNameMapping$k, "Mixpanel", NAME$k), _CNameMapping$k);
4780
4802
 
4781
4803
  var _CNameMapping$j;
4782
4804
 
4783
- var NAME$j = "MP";
4784
- var CNameMapping$j = (_CNameMapping$j = {}, _defineProperty(_CNameMapping$j, NAME$j, NAME$j), _defineProperty(_CNameMapping$j, "MIXPANEL", NAME$j), _defineProperty(_CNameMapping$j, "Mixpanel", NAME$j), _CNameMapping$j);
4805
+ var NAME$j = "MOENGAGE";
4806
+ var CNameMapping$j = (_CNameMapping$j = {}, _defineProperty(_CNameMapping$j, NAME$j, NAME$j), _defineProperty(_CNameMapping$j, "MoEngage", NAME$j), _CNameMapping$j);
4785
4807
 
4786
4808
  var _CNameMapping$i;
4787
4809
 
4788
- var NAME$i = "MOENGAGE";
4789
- var CNameMapping$i = (_CNameMapping$i = {}, _defineProperty(_CNameMapping$i, NAME$i, NAME$i), _defineProperty(_CNameMapping$i, "MoEngage", NAME$i), _CNameMapping$i);
4810
+ var NAME$i = "OPTIMIZELY";
4811
+ var CNameMapping$i = (_CNameMapping$i = {}, _defineProperty(_CNameMapping$i, NAME$i, NAME$i), _defineProperty(_CNameMapping$i, "Optimizely", NAME$i), _CNameMapping$i);
4790
4812
 
4791
4813
  var _CNameMapping$h;
4792
4814
 
4793
- var NAME$h = "OPTIMIZELY";
4794
- var CNameMapping$h = (_CNameMapping$h = {}, _defineProperty(_CNameMapping$h, NAME$h, NAME$h), _defineProperty(_CNameMapping$h, "Optimizely", NAME$h), _CNameMapping$h);
4815
+ var NAME$h = "PENDO";
4816
+ var CNameMapping$h = (_CNameMapping$h = {}, _defineProperty(_CNameMapping$h, NAME$h, NAME$h), _defineProperty(_CNameMapping$h, "Pendo", NAME$h), _CNameMapping$h);
4795
4817
 
4796
4818
  var _CNameMapping$g;
4797
4819
 
4798
- var NAME$g = "PENDO";
4799
- var CNameMapping$g = (_CNameMapping$g = {}, _defineProperty(_CNameMapping$g, NAME$g, NAME$g), _defineProperty(_CNameMapping$g, "Pendo", NAME$g), _CNameMapping$g);
4820
+ var NAME$g = "PINTEREST_TAG";
4821
+ var CNameMapping$g = (_CNameMapping$g = {}, _defineProperty(_CNameMapping$g, NAME$g, NAME$g), _defineProperty(_CNameMapping$g, "PinterestTag", NAME$g), _defineProperty(_CNameMapping$g, "Pinterest_Tag", NAME$g), _defineProperty(_CNameMapping$g, "PINTERESTTAG", NAME$g), _defineProperty(_CNameMapping$g, "pinterest", NAME$g), _defineProperty(_CNameMapping$g, "PinterestAds", NAME$g), _defineProperty(_CNameMapping$g, "Pinterest_Ads", NAME$g), _defineProperty(_CNameMapping$g, "Pinterest", NAME$g), _CNameMapping$g);
4800
4822
 
4801
4823
  var _CNameMapping$f;
4802
4824
 
4803
- var NAME$f = "PINTEREST_TAG";
4804
- var CNameMapping$f = (_CNameMapping$f = {}, _defineProperty(_CNameMapping$f, NAME$f, NAME$f), _defineProperty(_CNameMapping$f, "PinterestTag", NAME$f), _defineProperty(_CNameMapping$f, "Pinterest_Tag", NAME$f), _defineProperty(_CNameMapping$f, "PINTERESTTAG", NAME$f), _defineProperty(_CNameMapping$f, "pinterest", NAME$f), _defineProperty(_CNameMapping$f, "PinterestAds", NAME$f), _defineProperty(_CNameMapping$f, "Pinterest_Ads", NAME$f), _defineProperty(_CNameMapping$f, "Pinterest", NAME$f), _CNameMapping$f);
4825
+ var NAME$f = "POST_AFFILIATE_PRO";
4826
+ var CNameMapping$f = (_CNameMapping$f = {}, _defineProperty(_CNameMapping$f, NAME$f, NAME$f), _defineProperty(_CNameMapping$f, "PostAffiliatePro", NAME$f), _defineProperty(_CNameMapping$f, "Post_affiliate_pro", NAME$f), _defineProperty(_CNameMapping$f, "Post Affiliate Pro", NAME$f), _defineProperty(_CNameMapping$f, "postaffiliatepro", NAME$f), _defineProperty(_CNameMapping$f, "POSTAFFILIATEPRO", NAME$f), _CNameMapping$f);
4805
4827
 
4806
4828
  var _CNameMapping$e;
4807
4829
 
4808
- var NAME$e = "POST_AFFILIATE_PRO";
4809
- var CNameMapping$e = (_CNameMapping$e = {}, _defineProperty(_CNameMapping$e, NAME$e, NAME$e), _defineProperty(_CNameMapping$e, "PostAffiliatePro", NAME$e), _defineProperty(_CNameMapping$e, "Post_affiliate_pro", NAME$e), _defineProperty(_CNameMapping$e, "Post Affiliate Pro", NAME$e), _defineProperty(_CNameMapping$e, "postaffiliatepro", NAME$e), _defineProperty(_CNameMapping$e, "POSTAFFILIATEPRO", NAME$e), _CNameMapping$e);
4830
+ var NAME$e = "POSTHOG";
4831
+ var CNameMapping$e = (_CNameMapping$e = {}, _defineProperty(_CNameMapping$e, NAME$e, NAME$e), _defineProperty(_CNameMapping$e, "PostHog", NAME$e), _defineProperty(_CNameMapping$e, "Posthog", NAME$e), _CNameMapping$e);
4810
4832
 
4811
4833
  var _CNameMapping$d;
4812
4834
 
4813
- var NAME$d = "POSTHOG";
4814
- var CNameMapping$d = (_CNameMapping$d = {}, _defineProperty(_CNameMapping$d, NAME$d, NAME$d), _defineProperty(_CNameMapping$d, "PostHog", NAME$d), _defineProperty(_CNameMapping$d, "Posthog", NAME$d), _CNameMapping$d);
4835
+ var NAME$d = "PROFITWELL";
4836
+ var CNameMapping$d = (_CNameMapping$d = {}, _defineProperty(_CNameMapping$d, NAME$d, NAME$d), _defineProperty(_CNameMapping$d, "ProfitWell", NAME$d), _defineProperty(_CNameMapping$d, "profitwell", NAME$d), _defineProperty(_CNameMapping$d, "Profitwell", NAME$d), _CNameMapping$d);
4815
4837
 
4816
4838
  var _CNameMapping$c;
4817
4839
 
4818
- var NAME$c = "PROFITWELL";
4819
- var CNameMapping$c = (_CNameMapping$c = {}, _defineProperty(_CNameMapping$c, NAME$c, NAME$c), _defineProperty(_CNameMapping$c, "ProfitWell", NAME$c), _defineProperty(_CNameMapping$c, "profitwell", NAME$c), _defineProperty(_CNameMapping$c, "Profitwell", NAME$c), _CNameMapping$c);
4840
+ var NAME$c = "QUALTRICS";
4841
+ var CNameMapping$c = (_CNameMapping$c = {}, _defineProperty(_CNameMapping$c, NAME$c, NAME$c), _defineProperty(_CNameMapping$c, "Qualtrics", NAME$c), _defineProperty(_CNameMapping$c, "qualtrics", NAME$c), _CNameMapping$c);
4820
4842
 
4821
4843
  var _CNameMapping$b;
4822
4844
 
4823
- var NAME$b = "QUALTRICS";
4824
- var CNameMapping$b = (_CNameMapping$b = {}, _defineProperty(_CNameMapping$b, NAME$b, NAME$b), _defineProperty(_CNameMapping$b, "Qualtrics", NAME$b), _defineProperty(_CNameMapping$b, "qualtrics", NAME$b), _CNameMapping$b);
4845
+ var NAME$b = "QUANTUMMETRIC";
4846
+ var CNameMapping$b = (_CNameMapping$b = {}, _defineProperty(_CNameMapping$b, NAME$b, NAME$b), _defineProperty(_CNameMapping$b, "Quantum Metric", NAME$b), _defineProperty(_CNameMapping$b, "QuantumMetric", NAME$b), _defineProperty(_CNameMapping$b, "quantumMetric", NAME$b), _defineProperty(_CNameMapping$b, "quantummetric", NAME$b), _defineProperty(_CNameMapping$b, "Quantum_Metric", NAME$b), _CNameMapping$b);
4825
4847
 
4826
4848
  var _CNameMapping$a;
4827
4849
 
4828
- var NAME$a = "QUANTUMMETRIC";
4829
- var CNameMapping$a = (_CNameMapping$a = {}, _defineProperty(_CNameMapping$a, NAME$a, NAME$a), _defineProperty(_CNameMapping$a, "Quantum Metric", NAME$a), _defineProperty(_CNameMapping$a, "QuantumMetric", NAME$a), _defineProperty(_CNameMapping$a, "quantumMetric", NAME$a), _defineProperty(_CNameMapping$a, "quantummetric", NAME$a), _defineProperty(_CNameMapping$a, "Quantum_Metric", NAME$a), _CNameMapping$a);
4850
+ var NAME$a = "REDDIT_PIXEL";
4851
+ var CNameMapping$a = (_CNameMapping$a = {}, _defineProperty(_CNameMapping$a, NAME$a, NAME$a), _defineProperty(_CNameMapping$a, "Reddit_Pixel", NAME$a), _defineProperty(_CNameMapping$a, "RedditPixel", NAME$a), _defineProperty(_CNameMapping$a, "REDDITPIXEL", NAME$a), _defineProperty(_CNameMapping$a, "redditpixel", NAME$a), _defineProperty(_CNameMapping$a, "Reddit Pixel", NAME$a), _defineProperty(_CNameMapping$a, "REDDIT PIXEL", NAME$a), _defineProperty(_CNameMapping$a, "reddit pixel", NAME$a), _CNameMapping$a);
4830
4852
 
4831
4853
  var _CNameMapping$9;
4832
4854
 
4833
- var NAME$9 = "REDDIT_PIXEL";
4834
- var CNameMapping$9 = (_CNameMapping$9 = {}, _defineProperty(_CNameMapping$9, NAME$9, NAME$9), _defineProperty(_CNameMapping$9, "Reddit_Pixel", NAME$9), _defineProperty(_CNameMapping$9, "RedditPixel", NAME$9), _defineProperty(_CNameMapping$9, "REDDITPIXEL", NAME$9), _defineProperty(_CNameMapping$9, "redditpixel", NAME$9), _defineProperty(_CNameMapping$9, "Reddit Pixel", NAME$9), _defineProperty(_CNameMapping$9, "REDDIT PIXEL", NAME$9), _defineProperty(_CNameMapping$9, "reddit pixel", NAME$9), _CNameMapping$9);
4855
+ var NAME$9 = "SENTRY";
4856
+ var CNameMapping$9 = (_CNameMapping$9 = {}, _defineProperty(_CNameMapping$9, NAME$9, NAME$9), _defineProperty(_CNameMapping$9, "sentry", NAME$9), _defineProperty(_CNameMapping$9, "Sentry", NAME$9), _CNameMapping$9);
4835
4857
 
4836
4858
  var _CNameMapping$8;
4837
4859
 
4838
- var NAME$8 = "SENTRY";
4839
- var CNameMapping$8 = (_CNameMapping$8 = {}, _defineProperty(_CNameMapping$8, NAME$8, NAME$8), _defineProperty(_CNameMapping$8, "sentry", NAME$8), _defineProperty(_CNameMapping$8, "Sentry", NAME$8), _CNameMapping$8);
4860
+ var NAME$8 = "SNAP_PIXEL";
4861
+ var CNameMapping$8 = (_CNameMapping$8 = {}, _defineProperty(_CNameMapping$8, NAME$8, NAME$8), _defineProperty(_CNameMapping$8, "Snap_Pixel", NAME$8), _defineProperty(_CNameMapping$8, "SnapPixel", NAME$8), _defineProperty(_CNameMapping$8, "SNAPPIXEL", NAME$8), _defineProperty(_CNameMapping$8, "snappixel", NAME$8), _defineProperty(_CNameMapping$8, "Snap Pixel", NAME$8), _defineProperty(_CNameMapping$8, "SNAP PIXEL", NAME$8), _defineProperty(_CNameMapping$8, "snap pixel", NAME$8), _CNameMapping$8);
4840
4862
 
4841
4863
  var _CNameMapping$7;
4842
4864
 
4843
- var NAME$7 = "SNAP_PIXEL";
4844
- var CNameMapping$7 = (_CNameMapping$7 = {}, _defineProperty(_CNameMapping$7, NAME$7, NAME$7), _defineProperty(_CNameMapping$7, "Snap_Pixel", NAME$7), _defineProperty(_CNameMapping$7, "SnapPixel", NAME$7), _defineProperty(_CNameMapping$7, "SNAPPIXEL", NAME$7), _defineProperty(_CNameMapping$7, "snappixel", NAME$7), _defineProperty(_CNameMapping$7, "Snap Pixel", NAME$7), _defineProperty(_CNameMapping$7, "SNAP PIXEL", NAME$7), _defineProperty(_CNameMapping$7, "snap pixel", NAME$7), _CNameMapping$7);
4865
+ var NAME$7 = "TVSQUARED";
4866
+ var CNameMapping$7 = (_CNameMapping$7 = {}, _defineProperty(_CNameMapping$7, NAME$7, NAME$7), _defineProperty(_CNameMapping$7, "TVSquared", NAME$7), _CNameMapping$7);
4845
4867
 
4846
4868
  var _CNameMapping$6;
4847
4869
 
4848
- var NAME$6 = "TVSQUARED";
4849
- var CNameMapping$6 = (_CNameMapping$6 = {}, _defineProperty(_CNameMapping$6, NAME$6, NAME$6), _defineProperty(_CNameMapping$6, "TVSquared", NAME$6), _CNameMapping$6);
4870
+ var NAME$6 = "VWO";
4871
+ var CNameMapping$6 = (_CNameMapping$6 = {}, _defineProperty(_CNameMapping$6, NAME$6, NAME$6), _defineProperty(_CNameMapping$6, "Visual Website Optimizer", NAME$6), _CNameMapping$6);
4850
4872
 
4851
4873
  var _CNameMapping$5;
4852
4874
 
4853
- var NAME$5 = "VWO";
4854
- var CNameMapping$5 = (_CNameMapping$5 = {}, _defineProperty(_CNameMapping$5, NAME$5, NAME$5), _defineProperty(_CNameMapping$5, "Visual Website Optimizer", NAME$5), _CNameMapping$5);
4875
+ var NAME$5 = "GA360";
4876
+ var CNameMapping$5 = (_CNameMapping$5 = {}, _defineProperty(_CNameMapping$5, NAME$5, NAME$5), _defineProperty(_CNameMapping$5, "Google Analytics 360", NAME$5), _defineProperty(_CNameMapping$5, "GoogleAnalytics360", NAME$5), _defineProperty(_CNameMapping$5, "GA 360", NAME$5), _CNameMapping$5);
4855
4877
 
4856
4878
  var _CNameMapping$4;
4857
4879
 
4858
- var NAME$4 = "GA360";
4859
- var CNameMapping$4 = (_CNameMapping$4 = {}, _defineProperty(_CNameMapping$4, NAME$4, NAME$4), _defineProperty(_CNameMapping$4, "Google Analytics 360", NAME$4), _defineProperty(_CNameMapping$4, "GoogleAnalytics360", NAME$4), _defineProperty(_CNameMapping$4, "GA 360", NAME$4), _CNameMapping$4);
4880
+ var NAME$4 = "ADROLL";
4881
+ var CNameMapping$4 = (_CNameMapping$4 = {}, _defineProperty(_CNameMapping$4, NAME$4, NAME$4), _defineProperty(_CNameMapping$4, "Adroll", NAME$4), _defineProperty(_CNameMapping$4, "Ad roll", NAME$4), _CNameMapping$4);
4860
4882
 
4861
4883
  var _CNameMapping$3;
4862
4884
 
4863
- var NAME$3 = "ADROLL";
4864
- var CNameMapping$3 = (_CNameMapping$3 = {}, _defineProperty(_CNameMapping$3, NAME$3, NAME$3), _defineProperty(_CNameMapping$3, "Adroll", NAME$3), _defineProperty(_CNameMapping$3, "Ad roll", NAME$3), _CNameMapping$3);
4885
+ var NAME$3 = "DCM_FLOODLIGHT";
4886
+ var CNameMapping$3 = (_CNameMapping$3 = {}, _defineProperty(_CNameMapping$3, NAME$3, NAME$3), _defineProperty(_CNameMapping$3, "DCM Floodlight", NAME$3), _defineProperty(_CNameMapping$3, "dcm floodlight", NAME$3), _defineProperty(_CNameMapping$3, "Dcm Floodlight", NAME$3), _defineProperty(_CNameMapping$3, "DCMFloodlight", NAME$3), _defineProperty(_CNameMapping$3, "dcmfloodlight", NAME$3), _defineProperty(_CNameMapping$3, "DcmFloodlight", NAME$3), _defineProperty(_CNameMapping$3, "DCM_FLOODLIGHT", NAME$3), _defineProperty(_CNameMapping$3, "dcm_floodlight", NAME$3), _defineProperty(_CNameMapping$3, "DCM_Floodlight", NAME$3), _CNameMapping$3);
4865
4887
 
4866
4888
  var _CNameMapping$2;
4867
4889
 
4868
- var NAME$2 = "DCM_FLOODLIGHT";
4869
- var CNameMapping$2 = (_CNameMapping$2 = {}, _defineProperty(_CNameMapping$2, NAME$2, NAME$2), _defineProperty(_CNameMapping$2, "DCM Floodlight", NAME$2), _defineProperty(_CNameMapping$2, "dcm floodlight", NAME$2), _defineProperty(_CNameMapping$2, "Dcm Floodlight", NAME$2), _defineProperty(_CNameMapping$2, "DCMFloodlight", NAME$2), _defineProperty(_CNameMapping$2, "dcmfloodlight", NAME$2), _defineProperty(_CNameMapping$2, "DcmFloodlight", NAME$2), _defineProperty(_CNameMapping$2, "DCM_FLOODLIGHT", NAME$2), _defineProperty(_CNameMapping$2, "dcm_floodlight", NAME$2), _defineProperty(_CNameMapping$2, "DCM_Floodlight", NAME$2), _CNameMapping$2);
4890
+ var NAME$2 = "MATOMO";
4891
+ var CNameMapping$2 = (_CNameMapping$2 = {}, _defineProperty(_CNameMapping$2, NAME$2, NAME$2), _defineProperty(_CNameMapping$2, "MATOMO", NAME$2), _defineProperty(_CNameMapping$2, "Matomo", NAME$2), _defineProperty(_CNameMapping$2, "matomo", NAME$2), _CNameMapping$2);
4870
4892
 
4871
4893
  var _CNameMapping$1;
4872
4894
 
4873
- var NAME$1 = "MATOMO";
4874
- var CNameMapping$1 = (_CNameMapping$1 = {}, _defineProperty(_CNameMapping$1, NAME$1, NAME$1), _defineProperty(_CNameMapping$1, "MATOMO", NAME$1), _defineProperty(_CNameMapping$1, "Matomo", NAME$1), _defineProperty(_CNameMapping$1, "matomo", NAME$1), _CNameMapping$1);
4895
+ var NAME$1 = "VERO";
4896
+ var CNameMapping$1 = (_CNameMapping$1 = {}, _defineProperty(_CNameMapping$1, NAME$1, NAME$1), _defineProperty(_CNameMapping$1, "Vero", NAME$1), _defineProperty(_CNameMapping$1, "vero", NAME$1), _CNameMapping$1);
4875
4897
 
4876
4898
  var _CNameMapping;
4877
4899
 
4878
- var NAME = "VERO";
4879
- var CNameMapping = (_CNameMapping = {}, _defineProperty(_CNameMapping, NAME, NAME), _defineProperty(_CNameMapping, "Vero", NAME), _defineProperty(_CNameMapping, "vero", NAME), _CNameMapping);
4900
+ var NAME = "MOUSEFLOW";
4901
+ var CNameMapping = (_CNameMapping = {}, _defineProperty(_CNameMapping, NAME, NAME), _defineProperty(_CNameMapping, "Mouseflow", NAME), _defineProperty(_CNameMapping, "mouseflow", NAME), _defineProperty(_CNameMapping, "mouseFlow", NAME), _defineProperty(_CNameMapping, "MouseFlow", NAME), _CNameMapping);
4880
4902
 
4881
4903
  // add a mapping from common names to index.js exported key names as identified by Rudder
4882
4904
 
4883
- var commonNames = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
4905
+ var commonNames = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
4884
4906
  All: "All"
4885
- }, CNameMapping$N), CNameMapping$M), CNameMapping$L), CNameMapping$K), CNameMapping$J), CNameMapping$I), CNameMapping$H), CNameMapping$G), CNameMapping$F), CNameMapping$E), CNameMapping$D), CNameMapping$C), CNameMapping$B), CNameMapping$A), CNameMapping$z), CNameMapping$y), CNameMapping$4), CNameMapping$x), CNameMapping$w), CNameMapping$v), CNameMapping$u), CNameMapping$t), CNameMapping$s), CNameMapping$r), CNameMapping$q), CNameMapping$p), CNameMapping$o), CNameMapping$n), CNameMapping$m), CNameMapping$l), CNameMapping$k), CNameMapping$j), CNameMapping$i), CNameMapping$h), CNameMapping$g), CNameMapping$f), CNameMapping$e), CNameMapping$d), CNameMapping$c), CNameMapping$b), CNameMapping$a), CNameMapping$9), CNameMapping$8), CNameMapping$7), CNameMapping$6), CNameMapping$5), CNameMapping$3), CNameMapping$2), CNameMapping$1), CNameMapping);
4907
+ }, CNameMapping$O), CNameMapping$N), CNameMapping$M), CNameMapping$L), CNameMapping$K), CNameMapping$J), CNameMapping$I), CNameMapping$H), CNameMapping$G), CNameMapping$F), CNameMapping$E), CNameMapping$D), CNameMapping$C), CNameMapping$B), CNameMapping$A), CNameMapping$z), CNameMapping$5), CNameMapping$y), CNameMapping$x), CNameMapping$w), CNameMapping$v), CNameMapping$u), CNameMapping$t), CNameMapping$s), CNameMapping$r), CNameMapping$q), CNameMapping$p), CNameMapping$o), CNameMapping$n), CNameMapping$m), CNameMapping$l), CNameMapping$k), CNameMapping$j), CNameMapping$i), CNameMapping$h), CNameMapping$g), CNameMapping$f), CNameMapping$e), CNameMapping$d), CNameMapping$c), CNameMapping$b), CNameMapping$a), CNameMapping$9), CNameMapping$8), CNameMapping$7), CNameMapping$6), CNameMapping$4), CNameMapping$3), CNameMapping$2), CNameMapping$1), CNameMapping);
4886
4908
 
4887
4909
  // from client native integration name to server identified display name
4888
4910
  // add a mapping from Rudder identified key names to Rudder server recognizable names
@@ -4934,18 +4956,19 @@
4934
4956
  GA360: "Google Analytics 360",
4935
4957
  ADROLL: "Adroll",
4936
4958
  VERO: "Vero",
4937
- MATOMO: "Matomo"
4959
+ MATOMO: "Matomo",
4960
+ MOUSEFLOW: "Mouseflow"
4938
4961
  };
4939
4962
 
4940
4963
  // Reserved Keywords for properties/traits
4941
4964
  var RESERVED_KEYS = ['anonymous_id', 'id', 'sent_at', 'received_at', 'timestamp', 'original_timestamp', 'event_text', 'event'];
4942
- var CONFIG_URL = 'https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.9.5';
4965
+ var CONFIG_URL = 'https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.11.0';
4943
4966
  var CDN_INT_DIR = 'js-integrations';
4944
4967
  var DEST_SDK_BASE_URL = "https://cdn.rudderlabs.com/v1.1/".concat(CDN_INT_DIR);
4945
4968
  var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
4946
4969
  var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
4947
4970
  var INTG_SUFFIX = '_RS';
4948
- 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%2CObject.values%2CElement.prototype.dataset';
4971
+ 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%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll";
4949
4972
  var DEFAULT_ERROR_REPORT_PROVIDER = 'bugsnag';
4950
4973
  var ERROR_REPORT_PROVIDERS = [DEFAULT_ERROR_REPORT_PROVIDER];
4951
4974
 
@@ -10318,9 +10341,9 @@
10318
10341
  try {
10319
10342
  if (error instanceof Event) {
10320
10343
  // Discard all the non-script loading errors
10321
- if (error.target && error.target.localName !== "script") return; // Discard errors of scripts that are not loaded by the SDK
10344
+ if (error.target && error.target.localName !== "script") return; // Discard script errors that are not originated at SDK or from native SDKs
10322
10345
 
10323
- if (error.target.dataset && error.target.dataset.loader !== LOAD_ORIGIN) return;
10346
+ if (error.target.dataset && (error.target.dataset.loader !== LOAD_ORIGIN || error.target.dataset.isNonNativeSDK !== "true")) return;
10324
10347
  errorMessage = "error in script loading:: src:: ".concat(error.target.src, " id:: ").concat(error.target.id); // SDK triggered ad-blocker script
10325
10348
 
10326
10349
  if (error.target.id === "ad-block") {
@@ -10597,7 +10620,7 @@
10597
10620
  this.build = "1.0.0";
10598
10621
  this.name = "RudderLabs JavaScript SDK";
10599
10622
  this.namespace = "com.rudderlabs.javascript";
10600
- this.version = "2.9.5";
10623
+ this.version = "2.11.0";
10601
10624
  });
10602
10625
 
10603
10626
  /* eslint-disable max-classes-per-file */
@@ -10606,7 +10629,7 @@
10606
10629
  _classCallCheck(this, RudderLibraryInfo);
10607
10630
 
10608
10631
  this.name = "RudderLabs JavaScript SDK";
10609
- this.version = "2.9.5";
10632
+ this.version = "2.11.0";
10610
10633
  }); // Operating System information class
10611
10634
 
10612
10635
 
@@ -13103,7 +13126,8 @@
13103
13126
  ADROLL: "Adroll",
13104
13127
  DCM_FLOODLIGHT: "DCMFloodlight",
13105
13128
  MATOMO: "Matomo",
13106
- VERO: "Vero"
13129
+ VERO: "Vero",
13130
+ MOUSEFLOW: "Mouseflow"
13107
13131
  };
13108
13132
 
13109
13133
  /* eslint-disable class-methods-use-this */
@@ -13231,19 +13255,15 @@
13231
13255
 
13232
13256
  var META_DATA = {
13233
13257
  SDK: {
13234
- name: "JS",
13235
- installType: "npm"
13258
+ name: 'JS',
13259
+ installType: 'npm'
13236
13260
  }
13237
13261
  }; // This API key token is parsed in the CI pipeline
13238
13262
 
13239
- var API_KEY = "{{RS_BUGSNAG_API_KEY}}"; // Errors only from Below SDKs are allowed to reach Bugsnag
13263
+ var API_KEY = '{{RS_BUGSNAG_API_KEY}}'; // Errors only from Below SDKs are allowed to reach Bugsnag
13240
13264
 
13241
- var SDK_FILE_NAMES = ["browser.js", "rudder-analytics.min.js", "rudder-analytics-staging.min.js", "rudder-analytics.js"].concat(_toConsumableArray(Object.values(configToIntNames).map(function (intgName) {
13242
- return "".concat(intgName, ".js");
13243
- })), _toConsumableArray(Object.values(configToIntNames).map(function (intgName) {
13244
- return "".concat(intgName, ".min.js");
13245
- })), _toConsumableArray(Object.values(configToIntNames).map(function (intgName) {
13246
- return "".concat(intgName, "-staging.min.js");
13265
+ var SDK_FILE_NAMES = ['rudder-analytics.min.js'].concat(_toConsumableArray(Object.keys(configToIntNames).map(function (intgName) {
13266
+ return "".concat(configToIntNames[intgName], ".min.js");
13247
13267
  })));
13248
13268
  /**
13249
13269
  * This function will load the Bugsnag native SDK through CDN
@@ -13251,10 +13271,12 @@
13251
13271
  */
13252
13272
 
13253
13273
  var load$1 = function load() {
13254
- var pluginName = "bugsnag";
13274
+ var pluginName = 'bugsnag';
13255
13275
 
13256
13276
  if (!window.hasOwnProperty(pluginName)) {
13257
- ScriptLoader(pluginName, "https://d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js");
13277
+ ScriptLoader(pluginName, "https://d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js", {
13278
+ isNonNativeSDK: "true"
13279
+ });
13258
13280
  }
13259
13281
  };
13260
13282
  /**
@@ -13271,36 +13293,46 @@
13271
13293
 
13272
13294
  var apiKeyRegex = /{{.+}}/;
13273
13295
  if (API_KEY.match(apiKeyRegex) !== null) return;
13296
+ var host = window.location.hostname;
13297
+ var devHosts = ['localhost', '127.0.0.1', '[::1]'];
13274
13298
  window.rsBugsnagClient = window.Bugsnag.start({
13275
13299
  apiKey: API_KEY,
13276
- appVersion: "2.9.5",
13300
+ appVersion: '2.11.0',
13277
13301
  // Set SDK version as the app version
13278
13302
  metadata: META_DATA,
13279
13303
  onError: function onError(event) {
13280
- var errorOrigin = getValue(event.errors[0], "stacktrace.0.file"); // Skip errors that do not have a valid stack trace
13304
+ try {
13305
+ var errorOrigin = getValue(event, 'errors.0.stacktrace.0.file'); // Skip errors that do not have a valid stack trace
13281
13306
 
13282
- if (!errorOrigin || typeof errorOrigin !== "string") return false;
13283
- var srcFileName = errorOrigin.substring(errorOrigin.lastIndexOf("/") + 1);
13284
- if (!SDK_FILE_NAMES.includes(srcFileName)) // Discard the event if it's not originated at the SDK
13285
- return false;
13286
- event.addMetadata("source", {
13287
- sourceId: sourceId
13288
- });
13289
- var errMsg = event.errors[0].errorMessage;
13290
- event.context = errMsg; // Hack for easily grouping the script load errors
13291
- // on the dashboard
13307
+ if (!errorOrigin || typeof errorOrigin !== 'string') return false;
13308
+ var srcFileName = errorOrigin.substring(errorOrigin.lastIndexOf('/') + 1);
13309
+ if (!SDK_FILE_NAMES.includes(srcFileName)) // Discard the event if it's not originated at the SDK
13310
+ return false;
13311
+ event.addMetadata('source', {
13312
+ sourceId: sourceId
13313
+ });
13314
+ var errMsg = event.errors[0].errorMessage;
13315
+ event.context = errMsg; // Hack for easily grouping the script load errors
13316
+ // on the dashboard
13292
13317
 
13293
- if (errMsg.includes("error in script loading")) event.context = "Script load failures";
13294
- event.severity = "error";
13295
- return true;
13318
+ if (errMsg.includes('error in script loading')) event.context = 'Script load failures';
13319
+ event.severity = 'error';
13320
+ return true;
13321
+ } catch (_unused) {
13322
+ // Drop the error event if it couldn't be filtered as
13323
+ // it is most likely a non-SDK error
13324
+ return false;
13325
+ }
13296
13326
  },
13297
13327
  autoTrackSessions: false,
13298
13328
  // auto tracking sessions is disabled
13299
13329
  collectUserIp: false,
13300
13330
  // collecting user's IP is disabled
13301
- enabledBreadcrumbTypes: ["error", "log", "user"]
13331
+ enabledBreadcrumbTypes: ['error', 'log', 'user'],
13332
+ maxEvents: 100,
13333
+ releaseStage: host && devHosts.includes(host) ? 'development' : 'production' // set the release stage
13334
+
13302
13335
  });
13303
- window.rsBugsnagClient.releaseStage = "production"; // set the release stage
13304
13336
  }
13305
13337
  /**
13306
13338
  * The responsibility of this function is to check Bugsnag native SDK
@@ -13311,7 +13343,7 @@
13311
13343
 
13312
13344
 
13313
13345
  var init = function init(sourceId) {
13314
- if (window.hasOwnProperty("rsBugsnagClient")) return; // return if already initialized
13346
+ if (window.hasOwnProperty('rsBugsnagClient')) return; // return if already initialized
13315
13347
 
13316
13348
  if (window.Bugsnag !== undefined) {
13317
13349
  initClient(sourceId);
@@ -13467,13 +13499,25 @@
13467
13499
 
13468
13500
  }, {
13469
13501
  key: "processResponse",
13470
- value: function processResponse(status, response) {
13502
+ value: function processResponse(status, responseVal) {
13471
13503
  var _this2 = this;
13472
13504
 
13473
13505
  try {
13474
- // logger.debug(`===in process response=== ${status}`)
13475
- if (typeof response === 'string') {
13476
- response = JSON.parse(response);
13506
+ // logger.debug(`===in process response=== ${status}`);
13507
+ var response = responseVal;
13508
+
13509
+ try {
13510
+ if (typeof responseVal === 'string') {
13511
+ response = JSON.parse(responseVal);
13512
+ } // Do not proceed if the ultimate response value is not an object
13513
+
13514
+
13515
+ if (!response || _typeof(response) !== 'object' || Array.isArray(response)) {
13516
+ throw new Error('Invalid source configuration');
13517
+ }
13518
+ } catch (err) {
13519
+ handleError(err);
13520
+ return;
13477
13521
  } // Fetch Error reporting enable option from sourceConfig
13478
13522
 
13479
13523
 
@@ -13545,7 +13589,9 @@
13545
13589
  var modURL = "".concat(_this2.destSDKBaseURL, "/").concat(modName).concat(suffix, ".min.js");
13546
13590
 
13547
13591
  if (!window.hasOwnProperty(pluginName)) {
13548
- ScriptLoader(pluginName, modURL);
13592
+ ScriptLoader(pluginName, modURL, {
13593
+ isNonNativeSDK: true
13594
+ });
13549
13595
  }
13550
13596
 
13551
13597
  var self = _this2;
@@ -14195,6 +14241,12 @@
14195
14241
 
14196
14242
  return true;
14197
14243
  }
14244
+ }, {
14245
+ key: "isDatasetAvailable",
14246
+ value: function isDatasetAvailable() {
14247
+ var t = document.createElement("div");
14248
+ return t.setAttribute("data-a-b", "c"), t.dataset ? t.dataset.aB === "c" : false;
14249
+ }
14198
14250
  /**
14199
14251
  * Load after polyfills are loaded
14200
14252
  * @param {*} writeKey
@@ -14345,12 +14397,18 @@
14345
14397
  if (this.loaded) return; // check if the below features are available in the browser or not
14346
14398
  // If not present dynamically load from the polyfill cdn
14347
14399
 
14348
- if (!String.prototype.endsWith || !String.prototype.startsWith || !String.prototype.includes || !Array.prototype.find || !Array.prototype.includes || !Promise || !Object.entries) {
14349
- ScriptLoader('polyfill', POLYFILL_URL);
14400
+ if (!String.prototype.endsWith || !String.prototype.startsWith || !String.prototype.includes || !Array.prototype.find || !Array.prototype.includes || !Promise || !Object.entries || !Object.values || !String.prototype.replaceAll || !this.isDatasetAvailable()) {
14401
+ var id = "polyfill";
14402
+ ScriptLoader(id, POLYFILL_URL, {
14403
+ skipDatasetAttributes: true
14404
+ });
14350
14405
  var self = this;
14351
14406
  var interval = setInterval(function () {
14352
14407
  // check if the polyfill is loaded
14353
- if (window.hasOwnProperty('polyfill')) {
14408
+ // In chrome 83 and below versions ID of a script is not part of window's scope
14409
+ // even though it is loaded and returns false for <window.hasOwnProperty("polyfill")> this.
14410
+ // So, added another checking to fulfill that purpose.
14411
+ if (window.hasOwnProperty(id) || document.getElementById(id) !== null) {
14354
14412
  clearInterval(interval);
14355
14413
  self.loadAfterPolyfill(writeKey, serverUrl, options);
14356
14414
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rudder-sdk-js",
3
- "version": "2.9.5",
3
+ "version": "2.11.0",
4
4
  "description": "RudderStack Javascript SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",