@artisan-commerce/analytics-web 0.2.0-canary.156 → 0.2.0-canary.157

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/bundle.d.ts CHANGED
@@ -2142,7 +2142,7 @@ interface PurchaseSuccessCommonParams {
2142
2142
  /** The order shopping cart */
2143
2143
  shoppingCart?: ShoppingCart;
2144
2144
  /** The selected payment type (e.g. Cash, Card) */
2145
- paymentType: PaymentType;
2145
+ selectedPaymentType: PaymentType;
2146
2146
  /** The workflow name (e.g. Delivery) */
2147
2147
  fulfillmentType: Workflow;
2148
2148
  /** If paying with card the card provider (e.g. visa) */
@@ -2858,12 +2858,12 @@ interface SetPaymentInfoParams$1 extends SegmentCommonEventParams, SegmentCustom
2858
2858
  * @interface SetPaymentInfoCommonParams
2859
2859
  * @since 0.1.0
2860
2860
  * @property {number} orderTotal The total cost of the order
2861
- * @property {PaymentType} paymentType The new set payment type (e.g. Cash)
2861
+ * @property {PaymentType} selectedPaymentType The new set payment type (e.g. Cash)
2862
2862
  * @property {string} cardType If paying with card, the card provider (e.g. visa)
2863
2863
  */
2864
2864
  interface SetPaymentInfoCommonParams {
2865
2865
  orderTotal: number;
2866
- paymentType: PaymentType;
2866
+ selectedPaymentType: PaymentType;
2867
2867
  cardType?: string;
2868
2868
  }
2869
2869
  /**
@@ -3691,7 +3691,7 @@ interface SelectPromotionParams extends GoogleAnalyticsCommonEventParams, Google
3691
3691
  promotionName?: string;
3692
3692
  creativeName?: string;
3693
3693
  creativeSlot?: string;
3694
- originalItem?: Gtag.Item;
3694
+ originalItem?: string;
3695
3695
  }
3696
3696
 
3697
3697
  /**
@@ -3707,7 +3707,7 @@ interface ViewPromotionParams extends GoogleAnalyticsCommonEventParams, GoogleAn
3707
3707
  promotionName?: string;
3708
3708
  creativeName?: string;
3709
3709
  creativeSlot?: string;
3710
- originalItem?: Gtag.Item;
3710
+ originalItem?: string;
3711
3711
  }
3712
3712
 
3713
3713
  /**
package/dist/bundle.mjs CHANGED
@@ -48,7 +48,7 @@ const _State = class {
48
48
  let State$1 = _State;
49
49
  State$1._instance = null;
50
50
 
51
- var version = "0.2.0-canary.156";
51
+ var version = "0.2.0-canary.157";
52
52
  var packageJSON = {
53
53
  version: version};
54
54
 
@@ -914,6 +914,8 @@ const getProductListName = (categoryName) => {
914
914
  return "coupon_menu";
915
915
  if (categoryName == null ? void 0 : categoryName.includes("HOME"))
916
916
  return "home_product";
917
+ if (categoryName == null ? void 0 : categoryName.includes("REWARDS"))
918
+ return "rewards_menu";
917
919
  return "product_menu";
918
920
  };
919
921
  const getProductAddedFrom = (addedFrom) => {
@@ -3716,17 +3718,9 @@ const initiateCheckout$2 = (provider, params) => {
3716
3718
  const totals = getShoppingCartTotal(shoppingCart);
3717
3719
  const { total, totalPoints, shippingCost, totalTaxes } = totals;
3718
3720
  const items = toItems("initiateCheckout", params);
3719
- const products = getShoppingCartProducts(shoppingCart);
3720
- const totalItems = products.reduce((acc, product) => acc + product.amount, 0);
3721
3721
  const extraParams = {
3722
- total_item_quantity: totalItems,
3723
- purchase_revenue_in_usd: total,
3724
- purchase_revenue: total,
3725
- shipping_value_in_usd: shippingCost,
3726
- shipping_value: shippingCost,
3727
- tax_value_in_usd: totalTaxes,
3728
- tax_value: totalTaxes,
3729
- unique_items: items == null ? void 0 : items.length
3722
+ shipping: shippingCost,
3723
+ tax: totalTaxes
3730
3724
  };
3731
3725
  gtag("event", "begin_checkout", __spreadProps$24(__spreadValues$3f(__spreadValues$3f(__spreadValues$3f({
3732
3726
  send_to: trackingId,