@nuskin/ns-shop 7.2.3-mdigi-2491.2 → 7.2.3-mdigi-2491.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "7.2.3-mdigi-2491.2",
3
+ "version": "7.2.3-mdigi-2491.3",
4
4
  "description": "The description that will amaze and astound your audience when they read it",
5
5
  "main": "src/shop.js",
6
6
  "scripts": {
@@ -497,10 +497,10 @@ const populateCategory = (salesOrder) => {
497
497
  } else if (util.getSponsorId()) {
498
498
  // affiliates don't use a subdomain. So if we have a sponsor and it isn't a pitch then we consider it a storefront
499
499
  salesOrder.Category = "STOREFRONT";
500
- } else if (utmInfo?.utm_medium) {
501
- if (utmInfo?.utm_medium.includes('paidsearch')) {
500
+ } else if (utmInfo && utmInfo.utm_medium) {
501
+ if (utmInfo.utm_medium.includes('paidsearch')) {
502
502
  salesOrder.Category = 'PAIDSEARCH';
503
- } else if (utmInfo?.utm_medium.includes('paidsocial')) {
503
+ } else if (utmInfo.utm_medium.includes('paidsocial')) {
504
504
  salesOrder.Category = 'PAIDAD';
505
505
  } else {
506
506
  salesOrder.Category = 'WEB';
@@ -1040,12 +1040,14 @@ const populateSalesOrder = (action, adr) => {
1040
1040
  if (user && user.isGuest) {
1041
1041
  addToCustomList(salesOrder.Custom, "FLAG", "GUEST", "TRUE");
1042
1042
  }
1043
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_SOURCE", utmInfo?.utm_source);
1044
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_MEDIUM", utmInfo?.utm_medium);
1045
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN", utmInfo?.utm_campaign);
1046
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN_ID", utmInfo?.utm_id);
1047
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_CONTENT", utmInfo?.utm_content);
1048
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_TERM", utmInfo?.utm_term);
1043
+ if (utmInfo) {
1044
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_SOURCE", utmInfo.utm_source);
1045
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_MEDIUM", utmInfo.utm_medium);
1046
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN", utmInfo.utm_campaign);
1047
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN_ID", utmInfo.utm_id);
1048
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_CONTENT", utmInfo.utm_content);
1049
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_TERM", utmInfo.utm_term);
1050
+ }
1049
1051
  const microsite = getCachedConfigField('microsite');
1050
1052
  if (microsite) {
1051
1053
  salesOrder.Reason = "CUSTOM";