UNPKG

@chordcommerce/analytics

Version:

Chord Commerce event tracking

70 lines (69 loc) 5.05 kB
import { cartSharedSchema, cartViewedSchema, checkoutAbandonedSchema, checkoutStartedSchema, checkoutStepCompletedSchema, checkoutStepViewedSchema, collectionClickedSchema, couponAppliedSchema, couponDeniedSchema, couponEnteredSchema, couponRemovedSchema, emailCapturedSchema, giftCardAppliedSchema, giftCardDeniedSchema, giftCardEnteredSchema, giftCardRemovedSchema, itemRestockedSchema, loginStartedSchema, navigationClickedSchema, orderCancelledSchema, orderCompletedSchema, orderRefundedSchema, orderUpdatedSchema, passwordResetCompletedSchema, passwordResetStartedSchema, paymentInfoEnteredSchema, productAddedSchema, productAddedToWishlistSchema, productClickedSchema, productDetailsClickedSchema, productListFilteredSchema, productListViewedSchema, productRemovedFromWishlistSchema, productRemovedSchema, productReviewedSchema, productSharedSchema, productViewedSchema, productsSearchedSchema, promotionClickedSchema, promotionViewedSchema, shipmentDeliveredSchema, shipmentShippedSchema, signedInSchema, signedOutSchema, signedUpSchema, stockRequestCreatedSchema, subscriptionAddressUpdatedSchema, subscriptionAutoRenewedSchema, subscriptionCancelledSchema, subscriptionCreatedSchema, subscriptionExpiredSchema, subscriptionOrderSkippedSchema, subscriptionPausedSchema, subscriptionPaymentFailedSchema, subscriptionReminderSentSchema, subscriptionResumedSchema, userAddressAddedSchema, userAddressRemovedSchema, userAddressUpdatedSchema, userCreatedSchema, userUpdatedSchema, variantClickedSchema, wishlistProductAddedToCartSchema, } from './tracking-plan.js'; import { productInProductsSchema } from './custom.js'; const eventSchemas = { 'Cart Shared': [cartSharedSchema], 'Cart Viewed': [cartViewedSchema], 'Checkout Abandoned': [checkoutAbandonedSchema], 'Checkout Started': [checkoutStartedSchema], 'Checkout Step Completed': [checkoutStepCompletedSchema], 'Checkout Step Viewed': [checkoutStepViewedSchema], 'Collection Clicked': [collectionClickedSchema], 'Coupon Applied': [couponAppliedSchema], 'Coupon Denied': [couponDeniedSchema], 'Coupon Entered': [couponEnteredSchema], 'Coupon Removed': [couponRemovedSchema], 'Email Captured': [emailCapturedSchema], 'Gift Card Applied': [giftCardAppliedSchema], 'Gift Card Denied': [giftCardDeniedSchema], 'Gift Card Entered': [giftCardEnteredSchema], 'Gift Card Removed': [giftCardRemovedSchema], 'Item Restocked': [itemRestockedSchema], 'Login Started': [loginStartedSchema], 'Navigation Clicked': [navigationClickedSchema], 'Order Cancelled': [orderCancelledSchema], 'Order Completed': [orderCompletedSchema], 'Order Refunded': [orderRefundedSchema], 'Order Updated': [orderUpdatedSchema], 'Password Reset Completed': [passwordResetCompletedSchema], 'Password Reset Started': [passwordResetStartedSchema], 'Payment Info Entered': [paymentInfoEnteredSchema], 'Product Added': [productAddedSchema, productInProductsSchema], 'Product Added to Wishlist': [productAddedToWishlistSchema], 'Product Clicked': [productClickedSchema], 'Product Details Clicked': [productDetailsClickedSchema], 'Product List Filtered': [productListFilteredSchema], 'Product List Viewed': [productListViewedSchema], 'Product Removed': [productRemovedSchema], 'Product Removed from Wishlist': [productRemovedFromWishlistSchema], 'Product Reviewed': [productReviewedSchema], 'Product Shared': [productSharedSchema], 'Product Viewed': [productViewedSchema], 'Products Searched': [productsSearchedSchema], 'Promotion Clicked': [promotionClickedSchema], 'Promotion Viewed': [promotionViewedSchema], 'Shipment Delivered': [shipmentDeliveredSchema], 'Shipment Shipped': [shipmentShippedSchema], 'Signed In': [signedInSchema], 'Signed Out': [signedOutSchema], 'Signed Up': [signedUpSchema], 'Stock Request Created': [stockRequestCreatedSchema], 'Subscription Address Updated': [subscriptionAddressUpdatedSchema], 'Subscription Auto-Renewed': [subscriptionAutoRenewedSchema], 'Subscription Cancelled': [subscriptionCancelledSchema], 'Subscription Created': [subscriptionCreatedSchema], 'Subscription Payment Info Entered': [paymentInfoEnteredSchema], 'Subscription Expired': [subscriptionExpiredSchema], 'Subscription Order Skipped': [subscriptionOrderSkippedSchema], 'Subscription Paused': [subscriptionPausedSchema], 'Subscription Payment Failed': [subscriptionPaymentFailedSchema], 'Subscription Reminder Sent': [subscriptionReminderSentSchema], 'Subscription Resumed': [subscriptionResumedSchema], 'User Address Added': [userAddressAddedSchema], 'User Address Removed': [userAddressRemovedSchema], 'User Address Updated': [userAddressUpdatedSchema], 'User Created': [userCreatedSchema], 'User Updated': [userUpdatedSchema], 'Variant Clicked': [variantClickedSchema], 'Wishlist Product Added to Cart': [wishlistProductAddedToCartSchema], }; export { eventSchemas };