@artisan-commerce/analytics-rn 0.3.0-canary.165 → 0.3.0-canary.166
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 +5 -5
- package/dist/bundle.mjs +6 -12
- package/package.json +6 -6
package/dist/bundle.d.ts
CHANGED
|
@@ -1838,7 +1838,7 @@ interface PurchaseSuccessCommonParams {
|
|
|
1838
1838
|
/** The order shopping cart */
|
|
1839
1839
|
shoppingCart: ShoppingCart;
|
|
1840
1840
|
/** The selected payment type (e.g. Cash, Card) */
|
|
1841
|
-
|
|
1841
|
+
selectedPaymentType: PaymentType;
|
|
1842
1842
|
/** The workflow name (e.g. Delivery) */
|
|
1843
1843
|
fulfillmentType: Workflow;
|
|
1844
1844
|
/** If paying with card the card provider (e.g. visa) */
|
|
@@ -2554,12 +2554,12 @@ interface SetPaymentInfoParams$1 extends SegmentCommonEventParams, SegmentCustom
|
|
|
2554
2554
|
* @interface SetPaymentInfoCommonParams
|
|
2555
2555
|
* @since 0.1.0
|
|
2556
2556
|
* @property {number} orderTotal The total cost of the order
|
|
2557
|
-
* @property {PaymentType}
|
|
2557
|
+
* @property {PaymentType} selectedPaymentType The new set payment type (e.g. Cash)
|
|
2558
2558
|
* @property {string} cardType If paying with card, the card provider (e.g. visa)
|
|
2559
2559
|
*/
|
|
2560
2560
|
interface SetPaymentInfoCommonParams {
|
|
2561
2561
|
orderTotal: number;
|
|
2562
|
-
|
|
2562
|
+
selectedPaymentType: PaymentType;
|
|
2563
2563
|
cardType?: string;
|
|
2564
2564
|
}
|
|
2565
2565
|
/**
|
|
@@ -3387,7 +3387,7 @@ interface ViewPromotionParams$3 extends GoogleAnalyticsCommonEventParams, Google
|
|
|
3387
3387
|
promotionName?: string;
|
|
3388
3388
|
creativeName?: string;
|
|
3389
3389
|
creativeSlot?: string;
|
|
3390
|
-
originalItem?:
|
|
3390
|
+
originalItem?: string;
|
|
3391
3391
|
}
|
|
3392
3392
|
|
|
3393
3393
|
/**
|
|
@@ -3442,7 +3442,7 @@ interface SelectPromotionParams$3 extends GoogleAnalyticsCommonEventParams, Goog
|
|
|
3442
3442
|
promotionName?: string;
|
|
3443
3443
|
creativeName?: string;
|
|
3444
3444
|
creativeSlot?: string;
|
|
3445
|
-
originalItem?:
|
|
3445
|
+
originalItem?: string;
|
|
3446
3446
|
}
|
|
3447
3447
|
|
|
3448
3448
|
/**
|
package/dist/bundle.mjs
CHANGED
|
@@ -51,7 +51,7 @@ const _State = class {
|
|
|
51
51
|
let State$1 = _State;
|
|
52
52
|
State$1._instance = null;
|
|
53
53
|
|
|
54
|
-
var version = "0.3.0-canary.
|
|
54
|
+
var version = "0.3.0-canary.166";
|
|
55
55
|
var packageJSON = {
|
|
56
56
|
version: version};
|
|
57
57
|
|
|
@@ -796,6 +796,8 @@ const getProductListName = (categoryName) => {
|
|
|
796
796
|
return "coupon_menu";
|
|
797
797
|
if (categoryName == null ? void 0 : categoryName.includes("HOME"))
|
|
798
798
|
return "home_product";
|
|
799
|
+
if (categoryName == null ? void 0 : categoryName.includes("REWARDS"))
|
|
800
|
+
return "rewards_menu";
|
|
799
801
|
return "product_menu";
|
|
800
802
|
};
|
|
801
803
|
const getProductAddedFrom = (addedFrom) => {
|
|
@@ -3703,17 +3705,9 @@ const initiateCheckout$2 = (provider, params) => {
|
|
|
3703
3705
|
const totals = getShoppingCartTotal(shoppingCart);
|
|
3704
3706
|
const { total, totalPoints, shippingCost, totalTaxes } = totals;
|
|
3705
3707
|
const items = toItems("initiateCheckout", params);
|
|
3706
|
-
const products = getShoppingCartProducts(shoppingCart);
|
|
3707
|
-
const totalItems = products.reduce((acc, product) => acc + product.amount, 0);
|
|
3708
3708
|
const extraParams = {
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
purchase_revenue: total,
|
|
3712
|
-
shipping_value_in_usd: shippingCost,
|
|
3713
|
-
shipping_value: shippingCost,
|
|
3714
|
-
tax_value_in_usd: totalTaxes,
|
|
3715
|
-
tax_value: totalTaxes,
|
|
3716
|
-
unique_items: items == null ? void 0 : items.length
|
|
3709
|
+
shipping: shippingCost,
|
|
3710
|
+
tax: totalTaxes
|
|
3717
3711
|
};
|
|
3718
3712
|
analytics().logEvent("begin_checkout", __spreadProps$29(__spreadValues$3f(__spreadValues$3f(__spreadValues$3f({
|
|
3719
3713
|
value: total,
|
|
@@ -6615,7 +6609,7 @@ const selectItem = (provider, params) => {
|
|
|
6615
6609
|
const transformedParams = eventParamsToSnakeCase(enhancedParams);
|
|
6616
6610
|
const { meta } = State().state;
|
|
6617
6611
|
const transformedMeta = eventParamsToSnakeCase(meta);
|
|
6618
|
-
const eventName = "
|
|
6612
|
+
const eventName = "SelectItem";
|
|
6619
6613
|
const customData = __spreadValues$2n(__spreadValues$2n({}, transformedParams), transformedMeta);
|
|
6620
6614
|
if (isTrackingAllowed) {
|
|
6621
6615
|
AppEventsLogger.logEvent(eventName, customData);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/analytics-rn",
|
|
3
3
|
"description": "Artisn commerce analytics react native library",
|
|
4
|
-
"version": "0.3.0-canary.
|
|
4
|
+
"version": "0.3.0-canary.166",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/bundle.mjs",
|
|
7
7
|
"module": "./dist/bundle.mjs",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"snake-case": "^3.0.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@artisan-commerce/products": "0.9.0-canary.
|
|
40
|
-
"@artisan-commerce/shopping-cart-core": "0.12.0-canary.
|
|
41
|
-
"@artisan-commerce/state": "0.3.0-canary.
|
|
42
|
-
"@artisan-commerce/types": "0.14.0-canary.
|
|
39
|
+
"@artisan-commerce/products": "0.9.0-canary.112",
|
|
40
|
+
"@artisan-commerce/shopping-cart-core": "0.12.0-canary.150",
|
|
41
|
+
"@artisan-commerce/state": "0.3.0-canary.61",
|
|
42
|
+
"@artisan-commerce/types": "0.14.0-canary.89",
|
|
43
43
|
"@babel/core": "^7.13.15",
|
|
44
44
|
"@babel/preset-env": "^7.10.4",
|
|
45
45
|
"@babel/preset-react": "^7.10.4",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "36698b0b6ad312a3384f4cebaa5444b5993e8bbb"
|
|
88
88
|
}
|