Repository URL to install this package:
|
Version:
0.0.5 ▾
|
/// <reference types="gapi" />
/// <reference types="gapi.client" />
/// <reference types="gapi.client.tagmanager" />
import { DeleteFromBagInput as DeleteBagType, ProductLite as ProductLiteType, CartProductLiteType as CartProductType } from '@skava/graphql-bindings';
import { VirtualPageViewType } from './typings';
interface AnalyticsEvent {
hitType: string;
eventCategory?: string;
eventAction?: string;
eventLabel?: string;
page?: string;
title?: string;
}
declare class AnalyticsContainer {
queue: AnalyticsEvent[];
timeoutId: unknown;
googleAnalytics: Function;
readonly tracker: typeof gapi.client;
trackPageEvent(): void;
initializeAnalytics(): void;
getCommonCustomDimensions(): {
SK_UserType: string;
SK_Region: any;
SK_Language: any;
};
trackCustomEvent(eventDetails: any): void;
pushToDataLayer(argumentsToTrack: AnalyticsEvent): void;
trackPDPTagManager(item: ProductLiteType): void;
trackPLPTagManager(productLists: any): void;
getProductVariantDetails(productOptions: any): any;
trackVirtualPageView(pageViewDetails: VirtualPageViewType): void;
cartProducts(checkoutProductDetails: CartProductType[]): {
name: string;
identifier: number;
salePrice: any;
brand: string;
category: string;
variant: string;
quantity: number;
list: never[];
position: number;
}[];
trackPurchaseEcommerce(checkoutProductDetails: CartProductType[], orderId: string, orderDetails: any): void;
trackCheckoutEcommerce(checkoutProductDetails: CartProductType[]): void;
trackAddToListGA(productDetails: any): void;
trackRemoveFromCartGA(productDetails: DeleteBagType): void;
pushAddToCartEventLayer(ProductDetail: any): void;
trackAddToCartEventFromPdp(productDetail: any): void;
trackAddToCartEvent(productDetail: any): void;
}
declare const analyticsContainer: AnalyticsContainer;
export { AnalyticsContainer };
export { analyticsContainer };