@nuskin/ns-shop 7.6.0-mdigi-280.2 → 7.6.0-mdigi-280.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.6.0-mdigi-280.2",
3
+ "version": "7.6.0-mdigi-280.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": {
@@ -486,6 +486,7 @@ function removeItems(cartItems, sapSkus) {
486
486
  }
487
487
 
488
488
  const populateCategory = (salesOrder) => {
489
+ const utmMedium = utmInfo.utm_medium;
489
490
  if (ShoppingContext.isContext(ShoppingContext.MOBILE_AFFILIATE)) {
490
491
  salesOrder.Category = "MOBILE AFFILIATE";
491
492
  } else if (ShoppingContext.isContext(ShoppingContext.MOBILE_CONSUMER)) {
@@ -497,9 +498,9 @@ const populateCategory = (salesOrder) => {
497
498
  } else if (util.getSponsorId()) {
498
499
  // 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
500
  salesOrder.Category = "STOREFRONT";
500
- } else if (utmInfo.utm_medium && utmInfo.utm_medium.includes('paidsearch')) {
501
+ } else if (utmMedium && utmMedium.toLowerCase().includes('paidsearch')) {
501
502
  salesOrder.Category = 'PAIDSEARCH';
502
- } else if (utmInfo.utm_medium && utmInfo.utm_medium.includes('paidsocial')) {
503
+ } else if (utmMedium && utmMedium.toLowerCase().includes('paidsocial')) {
503
504
  salesOrder.Category = 'PAIDAD';
504
505
  } else {
505
506
  salesOrder.Category = 'WEB';