UNPKG

@convious/convious-analytics

Version:

A library that allows recording page views and transactions for Convious pricing API

22 lines (21 loc) 905 B
import 'core-js/features/promise'; export declare function logPageView(refererUrl: string, currentUrl: string): Promise<void>; export declare function logUserEnteredCheckout(): Promise<void>; export declare function logUserSelectedDate(): Promise<void>; export declare function logUserViewedProducts(): Promise<void>; export declare function logUserViewedPrices(): Promise<void>; export declare function logUserAddedAnItemToCart(): Promise<void>; export interface OrderItem { productId: string; amount: number; price: number; eventDate?: Date; location?: string; } export interface OrderData { orderId: string; items: OrderItem[]; } export declare function logOrderCreated(orderData: OrderData): Promise<void>; export declare function logTransaction(orderId: string, totalAmount: number): Promise<void>; export declare function init(accountId: string, cookieId: string): void;