Add to Cart event - sent when a user adds a product to cart

interface AddToCartEvent {
    ecommerce: {
        add: { products: EnhancedEcomProduct[] };
        currencyCode: string;
    };
    event: "addToCart";
    [key: string]: any;
}

Hierarchy (View Summary)

Indexable

  • [key: string]: any

    Index signature for compatibility with DataLayerItem

Properties

Properties

ecommerce: { add: { products: EnhancedEcomProduct[] }; currencyCode: string }

Ecommerce object with shared structure

event: "addToCart"

Event identifier - standard GA ecommerce events