UNPKG

@shopana/ga

Version:

Type-safe Google Analytics 4 (GA4) tracking library for React and Next.js with ecommerce support, event batching, and SSR compatibility

18 lines 1.86 kB
import { type EventPayload } from '../types/common'; import { type CartEventParams, type PurchaseEventParams, type ViewCartEventParams, type CheckoutEventParams, type PaymentInfoEventParams, type ShippingInfoEventParams, type ViewItemEventParams, type ViewItemListEventParams, type SelectItemEventParams, type PromotionEventParams, type WishlistEventParams, type LeadEventParams } from '../types/events'; import { type TransactionRegistry } from './TransactionRegistry'; export declare function buildPurchaseEvent(params: PurchaseEventParams, registry?: TransactionRegistry, onDuplicate?: (message: string) => void): EventPayload; export declare function buildAddToCartEvent(params: CartEventParams): EventPayload; export declare function buildRemoveFromCartEvent(params: CartEventParams): EventPayload; export declare function buildViewCartEvent(params: ViewCartEventParams): EventPayload; export declare function buildBeginCheckoutEvent(params: CheckoutEventParams): EventPayload; export declare function buildAddPaymentInfoEvent(params: PaymentInfoEventParams): EventPayload; export declare function buildAddShippingInfoEvent(params: ShippingInfoEventParams): EventPayload; export declare function buildViewItemEvent(params: ViewItemEventParams): EventPayload; export declare function buildViewItemListEvent(params: ViewItemListEventParams): EventPayload; export declare function buildSelectItemEvent(params: SelectItemEventParams): EventPayload; export declare function buildViewPromotionEvent(params: PromotionEventParams): EventPayload; export declare function buildSelectPromotionEvent(params: PromotionEventParams): EventPayload; export declare function buildAddToWishlistEvent(params: WishlistEventParams): EventPayload; export declare function buildGenerateLeadEvent(params: LeadEventParams): EventPayload; //# sourceMappingURL=commerceTracking.d.ts.map