@pelcro/react-pelcro-js 4.0.0-alpha.40 → 4.0.0-alpha.41

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/index.cjs.js CHANGED
@@ -8222,7 +8222,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8222
8222
  OutboundLink$1.origTrackLink = OutboundLink$1.trackLink;
8223
8223
  OutboundLink$1.trackLink = outboundLink;
8224
8224
  var OutboundLink = OutboundLink$1;
8225
- var ReactGA = _objectSpread({}, Defaults, {
8225
+ var ReactGA$1 = _objectSpread({}, Defaults, {
8226
8226
  OutboundLink: OutboundLink
8227
8227
  });
8228
8228
 
@@ -8507,7 +8507,7 @@ class PelcroActions {
8507
8507
  }
8508
8508
 
8509
8509
  window.Pelcro.user.logout();
8510
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
8510
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
8511
8511
  category: "ACTIONS",
8512
8512
  action: "Logged out",
8513
8513
  nonInteraction: true
@@ -8975,16 +8975,16 @@ const trackSubscriptionOnGA = () => {
8975
8975
  }
8976
8976
 
8977
8977
  const currencyCode = (_window$Pelcro$user$r5 = (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.currency) !== null && _window$Pelcro$user$r5 !== void 0 ? _window$Pelcro$user$r5 : plan.currency;
8978
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$set = ReactGA.set) === null || _ReactGA$set === void 0 ? void 0 : _ReactGA$set.call(ReactGA, {
8978
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$set = ReactGA$1.set) === null || _ReactGA$set === void 0 ? void 0 : _ReactGA$set.call(ReactGA$1, {
8979
8979
  currencyCode: currencyCode
8980
8980
  });
8981
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin = ReactGA.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$execu = _ReactGA$plugin.execute) === null || _ReactGA$plugin$execu === void 0 ? void 0 : _ReactGA$plugin$execu.call(_ReactGA$plugin, "ecommerce", "addTransaction", {
8981
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin = ReactGA$1.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$execu = _ReactGA$plugin.execute) === null || _ReactGA$plugin$execu === void 0 ? void 0 : _ReactGA$plugin$execu.call(_ReactGA$plugin, "ecommerce", "addTransaction", {
8982
8982
  id: lastSubscriptionId,
8983
8983
  affiliation: "Pelcro",
8984
8984
  revenue: plan !== null && plan !== void 0 && plan.amount ? isCurrencyZeroDecimal(currencyCode) ? plan.amount : plan.amount / 100 : 0,
8985
8985
  coupon: couponCode
8986
8986
  });
8987
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin2 = ReactGA.plugin) === null || _ReactGA$plugin2 === void 0 ? void 0 : (_ReactGA$plugin2$exec = _ReactGA$plugin2.execute) === null || _ReactGA$plugin2$exec === void 0 ? void 0 : _ReactGA$plugin2$exec.call(_ReactGA$plugin2, "ecommerce", "addItem", {
8987
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin2 = ReactGA$1.plugin) === null || _ReactGA$plugin2 === void 0 ? void 0 : (_ReactGA$plugin2$exec = _ReactGA$plugin2.execute) === null || _ReactGA$plugin2$exec === void 0 ? void 0 : _ReactGA$plugin2$exec.call(_ReactGA$plugin2, "ecommerce", "addItem", {
8988
8988
  id: lastSubscriptionId,
8989
8989
  name: product.name,
8990
8990
  category: product.description,
@@ -8992,8 +8992,8 @@ const trackSubscriptionOnGA = () => {
8992
8992
  price: plan !== null && plan !== void 0 && plan.amount ? isCurrencyZeroDecimal(currencyCode) ? plan.amount : plan.amount / 100 : 0,
8993
8993
  quantity: 1
8994
8994
  });
8995
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin3 = ReactGA.plugin) === null || _ReactGA$plugin3 === void 0 ? void 0 : (_ReactGA$plugin3$exec = _ReactGA$plugin3.execute) === null || _ReactGA$plugin3$exec === void 0 ? void 0 : _ReactGA$plugin3$exec.call(_ReactGA$plugin3, "ecommerce", "send");
8996
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
8995
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin3 = ReactGA$1.plugin) === null || _ReactGA$plugin3 === void 0 ? void 0 : (_ReactGA$plugin3$exec = _ReactGA$plugin3.execute) === null || _ReactGA$plugin3$exec === void 0 ? void 0 : _ReactGA$plugin3$exec.call(_ReactGA$plugin3, "ecommerce", "send");
8996
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
8997
8997
  category: "ACTIONS",
8998
8998
  action: "Subscribed",
8999
8999
  nonInteraction: true
@@ -9432,7 +9432,7 @@ class SaveToMetadataButtonClass {
9432
9432
 
9433
9433
  _classPrivateFieldGet(this, _markButtonAsSaved).call(this, button);
9434
9434
 
9435
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
9435
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
9436
9436
  category: "ACTIONS",
9437
9437
  action: "Save/Follow",
9438
9438
  label: buttonMetadata === null || buttonMetadata === void 0 ? void 0 : buttonMetadata.title
@@ -9470,7 +9470,7 @@ class SaveToMetadataButtonClass {
9470
9470
 
9471
9471
  _classPrivateFieldGet(this, _unmarkSavedButton).call(this, button);
9472
9472
 
9473
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
9473
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
9474
9474
  category: "ACTIONS",
9475
9475
  action: "Unsave/Unfollow",
9476
9476
  label: title
@@ -11336,13 +11336,13 @@ const initSecuritySdk = () => {
11336
11336
  const initGATracking = () => {
11337
11337
  var _ReactGA$initialize, _ReactGA$plugin, _ReactGA$plugin$requi;
11338
11338
 
11339
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$initialize = ReactGA.initialize) === null || _ReactGA$initialize === void 0 ? void 0 : _ReactGA$initialize.call(ReactGA, window.Pelcro.site.read().google_analytics_id);
11340
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin = ReactGA.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$requi = _ReactGA$plugin.require) === null || _ReactGA$plugin$requi === void 0 ? void 0 : _ReactGA$plugin$requi.call(_ReactGA$plugin, "ecommerce");
11339
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$initialize = ReactGA$1.initialize) === null || _ReactGA$initialize === void 0 ? void 0 : _ReactGA$initialize.call(ReactGA$1, window.Pelcro.site.read().google_analytics_id);
11340
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin = ReactGA$1.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$requi = _ReactGA$plugin.require) === null || _ReactGA$plugin$requi === void 0 ? void 0 : _ReactGA$plugin$requi.call(_ReactGA$plugin, "ecommerce");
11341
11341
  };
11342
11342
  const dispatchModalDisplayEvents = modalName => {
11343
11343
  var _ReactGA$event, _modalName$replace, _modalName$replace2;
11344
11344
 
11345
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
11345
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
11346
11346
  category: "VIEWS",
11347
11347
  action: `${modalName === null || modalName === void 0 ? void 0 : (_modalName$replace = modalName.replace("pelcro-", "")) === null || _modalName$replace === void 0 ? void 0 : _modalName$replace.replaceAll("-", " ")} viewed`,
11348
11348
  nonInteraction: true
@@ -12251,7 +12251,14 @@ const LoginContainer = ({
12251
12251
  });
12252
12252
  onFailure(err);
12253
12253
  } else {
12254
+ var _ReactGA, _ReactGA$event;
12255
+
12254
12256
  onSuccess(res);
12257
+ (_ReactGA = ReactGA) === null || _ReactGA === void 0 ? void 0 : (_ReactGA$event = _ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(_ReactGA, {
12258
+ category: "ACTIONS",
12259
+ action: "Logged in",
12260
+ nonInteraction: true
12261
+ });
12255
12262
  }
12256
12263
  });
12257
12264
  };
@@ -12651,7 +12658,7 @@ const Logout = props => {
12651
12658
  var _ReactGA$event;
12652
12659
 
12653
12660
  window.Pelcro.user.logout();
12654
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
12661
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
12655
12662
  category: "ACTIONS",
12656
12663
  action: "Logged out",
12657
12664
  nonInteraction: true
@@ -14131,7 +14138,7 @@ function RegisterModal(props) {
14131
14138
  const handleAfterRegistrationLogic = () => {
14132
14139
  var _ReactGA$event, _window$Pelcro$site$r, _window$Pelcro$site$r2;
14133
14140
 
14134
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
14141
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
14135
14142
  category: "ACTIONS",
14136
14143
  action: "Registered",
14137
14144
  nonInteraction: true
@@ -19520,7 +19527,7 @@ class SelectModal extends React.Component {
19520
19527
  if (this.state.mode === "product") {
19521
19528
  var _ReactGA$event;
19522
19529
 
19523
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
19530
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
19524
19531
  category: "VIEWS",
19525
19532
  action: "Product Modal Viewed",
19526
19533
  nonInteraction: true
@@ -19528,7 +19535,7 @@ class SelectModal extends React.Component {
19528
19535
  } else if (this.state.mode === "plan") {
19529
19536
  var _ReactGA$event2;
19530
19537
 
19531
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
19538
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
19532
19539
  category: "VIEWS",
19533
19540
  action: "Plan Modal Viewed",
19534
19541
  nonInteraction: true
@@ -24466,7 +24473,7 @@ function SubscriptionRenewModal({
24466
24473
  var _otherProps$onSuccess, _ReactGA$event;
24467
24474
 
24468
24475
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
24469
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24476
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24470
24477
  category: "ACTIONS",
24471
24478
  action: "Renewed",
24472
24479
  nonInteraction: true
@@ -24478,7 +24485,7 @@ function SubscriptionRenewModal({
24478
24485
  var _otherProps$onGiftRen, _ReactGA$event2;
24479
24486
 
24480
24487
  (_otherProps$onGiftRen = otherProps.onGiftRenewalSuccess) === null || _otherProps$onGiftRen === void 0 ? void 0 : _otherProps$onGiftRen.call(otherProps);
24481
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
24488
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
24482
24489
  category: "ACTIONS",
24483
24490
  action: "Renewed Gift",
24484
24491
  nonInteraction: true
@@ -24695,7 +24702,7 @@ const SubscriptionCancelNowButton = ({
24695
24702
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
24696
24703
  }
24697
24704
 
24698
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24705
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24699
24706
  category: "ACTIONS",
24700
24707
  action: "Canceled",
24701
24708
  nonInteraction: true
@@ -24767,7 +24774,7 @@ const SubscriptionCancelLaterButton = ({
24767
24774
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
24768
24775
  }
24769
24776
 
24770
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24777
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24771
24778
  category: "ACTIONS",
24772
24779
  action: "Canceled",
24773
24780
  nonInteraction: true
@@ -25014,7 +25021,7 @@ const SubscriptionSuspendButton = ({
25014
25021
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
25015
25022
  }
25016
25023
 
25017
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
25024
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
25018
25025
  category: "ACTIONS",
25019
25026
  action: "Suspended",
25020
25027
  nonInteraction: true
@@ -28010,6 +28017,8 @@ const AddressUpdateContainer = ({
28010
28017
  });
28011
28018
  onFailure(err);
28012
28019
  } else {
28020
+ var _ReactGA, _ReactGA$event;
28021
+
28013
28022
  dispatch({
28014
28023
  type: SHOW_ALERT,
28015
28024
  payload: {
@@ -28018,6 +28027,11 @@ const AddressUpdateContainer = ({
28018
28027
  }
28019
28028
  });
28020
28029
  onSuccess(res);
28030
+ (_ReactGA = ReactGA) === null || _ReactGA === void 0 ? void 0 : (_ReactGA$event = _ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(_ReactGA, {
28031
+ category: "ACTIONS",
28032
+ action: "Updated address",
28033
+ nonInteraction: true
28034
+ });
28021
28035
  }
28022
28036
  });
28023
28037
  };
@@ -28569,7 +28583,7 @@ const PaymentMethodUpdateModal = props => {
28569
28583
  var _props$onSuccess, _ReactGA$event;
28570
28584
 
28571
28585
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
28572
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
28586
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
28573
28587
  category: "ACTIONS",
28574
28588
  action: "Updated payment card",
28575
28589
  nonInteraction: true
@@ -31360,7 +31374,7 @@ const DashboardContainer = ({
31360
31374
  window.Pelcro.insight.track("Modal Displayed", {
31361
31375
  name: "dashboard"
31362
31376
  });
31363
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
31377
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
31364
31378
  category: "VIEWS",
31365
31379
  action: "Dashboard Modal Viewed",
31366
31380
  nonInteraction: true
@@ -31400,7 +31414,7 @@ const DashboardContainer = ({
31400
31414
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31401
31415
  }
31402
31416
 
31403
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
31417
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
31404
31418
  category: "ACTIONS",
31405
31419
  action: "Canceled",
31406
31420
  nonInteraction: true
@@ -31436,7 +31450,7 @@ const DashboardContainer = ({
31436
31450
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31437
31451
  }
31438
31452
 
31439
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
31453
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event3 = ReactGA$1.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA$1, {
31440
31454
  category: "ACTIONS",
31441
31455
  action: "UnSuspended",
31442
31456
  nonInteraction: true
@@ -32740,7 +32754,7 @@ const SavedItems = ({
32740
32754
  }
32741
32755
 
32742
32756
  setItems(response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.metadata);
32743
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
32757
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
32744
32758
  category: "ACTIONS",
32745
32759
  action: "Unsave/Unfollow",
32746
32760
  label: title
package/dist/index.esm.js CHANGED
@@ -8192,7 +8192,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8192
8192
  OutboundLink$1.origTrackLink = OutboundLink$1.trackLink;
8193
8193
  OutboundLink$1.trackLink = outboundLink;
8194
8194
  var OutboundLink = OutboundLink$1;
8195
- var ReactGA = _objectSpread({}, Defaults, {
8195
+ var ReactGA$1 = _objectSpread({}, Defaults, {
8196
8196
  OutboundLink: OutboundLink
8197
8197
  });
8198
8198
 
@@ -8477,7 +8477,7 @@ class PelcroActions {
8477
8477
  }
8478
8478
 
8479
8479
  window.Pelcro.user.logout();
8480
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
8480
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
8481
8481
  category: "ACTIONS",
8482
8482
  action: "Logged out",
8483
8483
  nonInteraction: true
@@ -8945,16 +8945,16 @@ const trackSubscriptionOnGA = () => {
8945
8945
  }
8946
8946
 
8947
8947
  const currencyCode = (_window$Pelcro$user$r5 = (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.currency) !== null && _window$Pelcro$user$r5 !== void 0 ? _window$Pelcro$user$r5 : plan.currency;
8948
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$set = ReactGA.set) === null || _ReactGA$set === void 0 ? void 0 : _ReactGA$set.call(ReactGA, {
8948
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$set = ReactGA$1.set) === null || _ReactGA$set === void 0 ? void 0 : _ReactGA$set.call(ReactGA$1, {
8949
8949
  currencyCode: currencyCode
8950
8950
  });
8951
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin = ReactGA.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$execu = _ReactGA$plugin.execute) === null || _ReactGA$plugin$execu === void 0 ? void 0 : _ReactGA$plugin$execu.call(_ReactGA$plugin, "ecommerce", "addTransaction", {
8951
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin = ReactGA$1.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$execu = _ReactGA$plugin.execute) === null || _ReactGA$plugin$execu === void 0 ? void 0 : _ReactGA$plugin$execu.call(_ReactGA$plugin, "ecommerce", "addTransaction", {
8952
8952
  id: lastSubscriptionId,
8953
8953
  affiliation: "Pelcro",
8954
8954
  revenue: plan !== null && plan !== void 0 && plan.amount ? isCurrencyZeroDecimal(currencyCode) ? plan.amount : plan.amount / 100 : 0,
8955
8955
  coupon: couponCode
8956
8956
  });
8957
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin2 = ReactGA.plugin) === null || _ReactGA$plugin2 === void 0 ? void 0 : (_ReactGA$plugin2$exec = _ReactGA$plugin2.execute) === null || _ReactGA$plugin2$exec === void 0 ? void 0 : _ReactGA$plugin2$exec.call(_ReactGA$plugin2, "ecommerce", "addItem", {
8957
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin2 = ReactGA$1.plugin) === null || _ReactGA$plugin2 === void 0 ? void 0 : (_ReactGA$plugin2$exec = _ReactGA$plugin2.execute) === null || _ReactGA$plugin2$exec === void 0 ? void 0 : _ReactGA$plugin2$exec.call(_ReactGA$plugin2, "ecommerce", "addItem", {
8958
8958
  id: lastSubscriptionId,
8959
8959
  name: product.name,
8960
8960
  category: product.description,
@@ -8962,8 +8962,8 @@ const trackSubscriptionOnGA = () => {
8962
8962
  price: plan !== null && plan !== void 0 && plan.amount ? isCurrencyZeroDecimal(currencyCode) ? plan.amount : plan.amount / 100 : 0,
8963
8963
  quantity: 1
8964
8964
  });
8965
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin3 = ReactGA.plugin) === null || _ReactGA$plugin3 === void 0 ? void 0 : (_ReactGA$plugin3$exec = _ReactGA$plugin3.execute) === null || _ReactGA$plugin3$exec === void 0 ? void 0 : _ReactGA$plugin3$exec.call(_ReactGA$plugin3, "ecommerce", "send");
8966
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
8965
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin3 = ReactGA$1.plugin) === null || _ReactGA$plugin3 === void 0 ? void 0 : (_ReactGA$plugin3$exec = _ReactGA$plugin3.execute) === null || _ReactGA$plugin3$exec === void 0 ? void 0 : _ReactGA$plugin3$exec.call(_ReactGA$plugin3, "ecommerce", "send");
8966
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
8967
8967
  category: "ACTIONS",
8968
8968
  action: "Subscribed",
8969
8969
  nonInteraction: true
@@ -9402,7 +9402,7 @@ class SaveToMetadataButtonClass {
9402
9402
 
9403
9403
  _classPrivateFieldGet(this, _markButtonAsSaved).call(this, button);
9404
9404
 
9405
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
9405
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
9406
9406
  category: "ACTIONS",
9407
9407
  action: "Save/Follow",
9408
9408
  label: buttonMetadata === null || buttonMetadata === void 0 ? void 0 : buttonMetadata.title
@@ -9440,7 +9440,7 @@ class SaveToMetadataButtonClass {
9440
9440
 
9441
9441
  _classPrivateFieldGet(this, _unmarkSavedButton).call(this, button);
9442
9442
 
9443
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
9443
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
9444
9444
  category: "ACTIONS",
9445
9445
  action: "Unsave/Unfollow",
9446
9446
  label: title
@@ -11306,13 +11306,13 @@ const initSecuritySdk = () => {
11306
11306
  const initGATracking = () => {
11307
11307
  var _ReactGA$initialize, _ReactGA$plugin, _ReactGA$plugin$requi;
11308
11308
 
11309
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$initialize = ReactGA.initialize) === null || _ReactGA$initialize === void 0 ? void 0 : _ReactGA$initialize.call(ReactGA, window.Pelcro.site.read().google_analytics_id);
11310
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin = ReactGA.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$requi = _ReactGA$plugin.require) === null || _ReactGA$plugin$requi === void 0 ? void 0 : _ReactGA$plugin$requi.call(_ReactGA$plugin, "ecommerce");
11309
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$initialize = ReactGA$1.initialize) === null || _ReactGA$initialize === void 0 ? void 0 : _ReactGA$initialize.call(ReactGA$1, window.Pelcro.site.read().google_analytics_id);
11310
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin = ReactGA$1.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$requi = _ReactGA$plugin.require) === null || _ReactGA$plugin$requi === void 0 ? void 0 : _ReactGA$plugin$requi.call(_ReactGA$plugin, "ecommerce");
11311
11311
  };
11312
11312
  const dispatchModalDisplayEvents = modalName => {
11313
11313
  var _ReactGA$event, _modalName$replace, _modalName$replace2;
11314
11314
 
11315
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
11315
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
11316
11316
  category: "VIEWS",
11317
11317
  action: `${modalName === null || modalName === void 0 ? void 0 : (_modalName$replace = modalName.replace("pelcro-", "")) === null || _modalName$replace === void 0 ? void 0 : _modalName$replace.replaceAll("-", " ")} viewed`,
11318
11318
  nonInteraction: true
@@ -12221,7 +12221,14 @@ const LoginContainer = ({
12221
12221
  });
12222
12222
  onFailure(err);
12223
12223
  } else {
12224
+ var _ReactGA, _ReactGA$event;
12225
+
12224
12226
  onSuccess(res);
12227
+ (_ReactGA = ReactGA) === null || _ReactGA === void 0 ? void 0 : (_ReactGA$event = _ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(_ReactGA, {
12228
+ category: "ACTIONS",
12229
+ action: "Logged in",
12230
+ nonInteraction: true
12231
+ });
12225
12232
  }
12226
12233
  });
12227
12234
  };
@@ -12621,7 +12628,7 @@ const Logout = props => {
12621
12628
  var _ReactGA$event;
12622
12629
 
12623
12630
  window.Pelcro.user.logout();
12624
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
12631
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
12625
12632
  category: "ACTIONS",
12626
12633
  action: "Logged out",
12627
12634
  nonInteraction: true
@@ -14101,7 +14108,7 @@ function RegisterModal(props) {
14101
14108
  const handleAfterRegistrationLogic = () => {
14102
14109
  var _ReactGA$event, _window$Pelcro$site$r, _window$Pelcro$site$r2;
14103
14110
 
14104
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
14111
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
14105
14112
  category: "ACTIONS",
14106
14113
  action: "Registered",
14107
14114
  nonInteraction: true
@@ -19490,7 +19497,7 @@ class SelectModal extends Component {
19490
19497
  if (this.state.mode === "product") {
19491
19498
  var _ReactGA$event;
19492
19499
 
19493
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
19500
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
19494
19501
  category: "VIEWS",
19495
19502
  action: "Product Modal Viewed",
19496
19503
  nonInteraction: true
@@ -19498,7 +19505,7 @@ class SelectModal extends Component {
19498
19505
  } else if (this.state.mode === "plan") {
19499
19506
  var _ReactGA$event2;
19500
19507
 
19501
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
19508
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
19502
19509
  category: "VIEWS",
19503
19510
  action: "Plan Modal Viewed",
19504
19511
  nonInteraction: true
@@ -24436,7 +24443,7 @@ function SubscriptionRenewModal({
24436
24443
  var _otherProps$onSuccess, _ReactGA$event;
24437
24444
 
24438
24445
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
24439
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24446
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24440
24447
  category: "ACTIONS",
24441
24448
  action: "Renewed",
24442
24449
  nonInteraction: true
@@ -24448,7 +24455,7 @@ function SubscriptionRenewModal({
24448
24455
  var _otherProps$onGiftRen, _ReactGA$event2;
24449
24456
 
24450
24457
  (_otherProps$onGiftRen = otherProps.onGiftRenewalSuccess) === null || _otherProps$onGiftRen === void 0 ? void 0 : _otherProps$onGiftRen.call(otherProps);
24451
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
24458
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
24452
24459
  category: "ACTIONS",
24453
24460
  action: "Renewed Gift",
24454
24461
  nonInteraction: true
@@ -24665,7 +24672,7 @@ const SubscriptionCancelNowButton = ({
24665
24672
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
24666
24673
  }
24667
24674
 
24668
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24675
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24669
24676
  category: "ACTIONS",
24670
24677
  action: "Canceled",
24671
24678
  nonInteraction: true
@@ -24737,7 +24744,7 @@ const SubscriptionCancelLaterButton = ({
24737
24744
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
24738
24745
  }
24739
24746
 
24740
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24747
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24741
24748
  category: "ACTIONS",
24742
24749
  action: "Canceled",
24743
24750
  nonInteraction: true
@@ -24984,7 +24991,7 @@ const SubscriptionSuspendButton = ({
24984
24991
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
24985
24992
  }
24986
24993
 
24987
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24994
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
24988
24995
  category: "ACTIONS",
24989
24996
  action: "Suspended",
24990
24997
  nonInteraction: true
@@ -27980,6 +27987,8 @@ const AddressUpdateContainer = ({
27980
27987
  });
27981
27988
  onFailure(err);
27982
27989
  } else {
27990
+ var _ReactGA, _ReactGA$event;
27991
+
27983
27992
  dispatch({
27984
27993
  type: SHOW_ALERT,
27985
27994
  payload: {
@@ -27988,6 +27997,11 @@ const AddressUpdateContainer = ({
27988
27997
  }
27989
27998
  });
27990
27999
  onSuccess(res);
28000
+ (_ReactGA = ReactGA) === null || _ReactGA === void 0 ? void 0 : (_ReactGA$event = _ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(_ReactGA, {
28001
+ category: "ACTIONS",
28002
+ action: "Updated address",
28003
+ nonInteraction: true
28004
+ });
27991
28005
  }
27992
28006
  });
27993
28007
  };
@@ -28539,7 +28553,7 @@ const PaymentMethodUpdateModal = props => {
28539
28553
  var _props$onSuccess, _ReactGA$event;
28540
28554
 
28541
28555
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
28542
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
28556
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
28543
28557
  category: "ACTIONS",
28544
28558
  action: "Updated payment card",
28545
28559
  nonInteraction: true
@@ -31330,7 +31344,7 @@ const DashboardContainer = ({
31330
31344
  window.Pelcro.insight.track("Modal Displayed", {
31331
31345
  name: "dashboard"
31332
31346
  });
31333
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
31347
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
31334
31348
  category: "VIEWS",
31335
31349
  action: "Dashboard Modal Viewed",
31336
31350
  nonInteraction: true
@@ -31370,7 +31384,7 @@ const DashboardContainer = ({
31370
31384
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31371
31385
  }
31372
31386
 
31373
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
31387
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
31374
31388
  category: "ACTIONS",
31375
31389
  action: "Canceled",
31376
31390
  nonInteraction: true
@@ -31406,7 +31420,7 @@ const DashboardContainer = ({
31406
31420
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31407
31421
  }
31408
31422
 
31409
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
31423
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event3 = ReactGA$1.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA$1, {
31410
31424
  category: "ACTIONS",
31411
31425
  action: "UnSuspended",
31412
31426
  nonInteraction: true
@@ -32710,7 +32724,7 @@ const SavedItems = ({
32710
32724
  }
32711
32725
 
32712
32726
  setItems(response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.metadata);
32713
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
32727
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
32714
32728
  category: "ACTIONS",
32715
32729
  action: "Unsave/Unfollow",
32716
32730
  label: title
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "4.0.0-alpha.40",
4
+ "version": "4.0.0-alpha.41",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",