import { BrowserPlugin } from '@snowplow/browser-tracker-core'; import { CommonEventProperties } from '@snowplow/tracker-core'; /** * For tracking GA Enhanced Ecommerce events and contexts * {@link https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce} * * @deprecated Use @snowplow/browser-plugin-snowplow-ecommerce instead */ declare function EnhancedEcommercePlugin(): BrowserPlugin; /** * An Enhanced Ecommerce Action * Used when tracking an GA Enhanced Ecommerce Action with all stored Enhanced Ecommerce contexts */ interface EnhancedEcommerceAction { /** Actions specify how to interpret product and promotion data */ action?: string; } /** * Track a GA Enhanced Ecommerce Action with all stored * Enhanced Ecommerce contexts * * @param event * @param trackers */ declare function trackEnhancedEcommerceAction(event?: EnhancedEcommerceAction & CommonEventProperties, trackers?: Array): void; /** * The Action Context * Represents information about an ecommerce related action that has taken place. */ interface EnhanacedCommerceActionContext { /** The transaction id */ id?: string; /** The store of affiliation from which this transaction occured */ affiliation?: string; /** Specifies the total revenue or grand total associated with the transaction */ revenue?: string; /** The total tax associated with the transaction. */ tax?: number; /** The shipping cost associated with the transaction. */ shipping?: number; /** The transaction coupon redeemed with the transaction. */ coupon?: string; /** The list that the associated products belong to. */ list?: string; /** A number representing a step in the checkout process. Optional on `checkout` actions. */ step?: number; /** Additional field for checkout and checkout_option actions that can describe option information on the checkout page, like selected payment method. */ option?: string; /** The currency of the transactoin */ currency?: string; } /** * Adds a GA Enhanced Ecommerce Action Context * * @param context - The context to be stored * @param trackers - The tracker identifiers which the context will be stored against */ declare function addEnhancedEcommerceActionContext(context?: EnhanacedCommerceActionContext, trackers?: Array): void; /** * An enhanced ecommerce impression context */ interface EnhancedEcommerceImpressionContext { /** The product ID or SKU */ id?: string; /** The name of the product */ name?: string; /** The list or collection to which the product belongs */ list?: string; /** The brand associated with the product */ brand?: string; /** The category to which the product belongs */ category?: string; /** The variant of the product */ variant?: string; /** The product's position in a list or collection */ position?: number; /** The price of a product */ price?: string; /** The currency of a product */ currency?: string; } /** * Adds a GA Enhanced Ecommerce Impression Context * * @param context - The context to be stored * @param trackers - The tracker identifiers which the context will be stored against */ declare function addEnhancedEcommerceImpressionContext(context?: EnhancedEcommerceImpressionContext, trackers?: Array): void; /** * An enhanced ecommerce product context */ interface EnhancedEcommerceProductContext { /** The product ID or SKU */ id?: string; /** The name of the product */ name?: string; /** The list or collection to which the product belongs */ list?: string; /** The brand associated with the product */ brand?: string; /** The category to which the product belongs */ category?: string; /** The variant of the product */ variant?: string; /** The price of a product */ price?: number; /** The quantity of a product */ quantity?: number; /** The coupon code associated with a product */ coupon?: string; /** The product's position in a list or collection */ position?: number; /** The currency of the product */ currency?: string; } /** * Adds a GA Enhanced Ecommerce Product Context * * @param context - The context to be stored * @param trackers - The tracker identifiers which the context will be stored against */ declare function addEnhancedEcommerceProductContext(context?: EnhancedEcommerceProductContext, trackers?: Array): void; /** * An enhanced ecommerce promo context */ interface EnhancedEcommercePromoContext { /** The promotion ID */ id?: string; /** The name of the promotion */ name?: string; /** The creative associated with the promotion */ creative?: string; /** The position of the creative */ position?: string; /** The currency of the product */ currency?: string; } /** * Adds a GA Enhanced Ecommerce Promo Context * * @param context - The context to be stored * @param trackers - The tracker identifiers which the context will be stored against */ declare function addEnhancedEcommercePromoContext(context?: EnhancedEcommercePromoContext, trackers?: Array): void; export { EnhancedEcommercePlugin, EnhancedEcommerceAction, trackEnhancedEcommerceAction, EnhanacedCommerceActionContext, addEnhancedEcommerceActionContext, EnhancedEcommerceImpressionContext, addEnhancedEcommerceImpressionContext, EnhancedEcommerceProductContext, addEnhancedEcommerceProductContext, EnhancedEcommercePromoContext, addEnhancedEcommercePromoContext };