cart-shoppingeCommerce

Track eCommerce transactions across your purchase funnel.

GitBook Assistant

ListenLayer tracks the complete eCommerce funnel from product views through purchase. Events can be captured automatically from GA4 dataLayer pushes, gtag.js calls, or directly via the SDK.


Automatic eCommerce Detection

ListenLayer automatically captures eCommerce events from:

  • GA4 dataLayer - Standard dataLayer.push() with ecommerce object

  • gtag.js - gtag('event', 'purchase', {...}) calls

  • Platform integrations - Shopify, WooCommerce, BigCommerce, Magento

circle-info

More details coming soon.


SDK API

Track eCommerce events directly using the ListenLayer SDK:

Purchase

_ll.ecommerce.purchase({
  order_id: 'ORD-12345',
  currency: 'USD',
  subtotal: 150.00,
  tax: 10.80,
  shipping: 5.00,
  discount: 15.00,
  total: 150.80,
  coupon: 'SPRING10',
  items: [
    {
      item_id: 'SKU-001',
      name: 'Widget Pro',
      price: 50.00,
      quantity: 2,
      variant: 'Red',
      brand: 'ACME',
      category: 'Electronics',
      discount: 10.00
    }
  ]
});

Add to Cart

All eCommerce Methods

Method
Description

_ll.ecommerce.viewItem()

Product detail page view

_ll.ecommerce.viewItemList()

Category/collection page view

_ll.ecommerce.selectItem()

Product clicked in list

_ll.ecommerce.addToCart()

Item added to cart

_ll.ecommerce.removeFromCart()

Item removed from cart

_ll.ecommerce.viewCart()

Cart page viewed

_ll.ecommerce.beginCheckout()

Checkout started

_ll.ecommerce.addShippingInfo()

Shipping details entered

_ll.ecommerce.addPaymentInfo()

Payment details entered

_ll.ecommerce.purchase()

Order completed

_ll.ecommerce.refund()

Order refunded


Field Reference

circle-info

More details coming soon.

Last updated

Was this helpful?