Skip to content

Ecommerce events ​

Eureka uses the GA4 ecommerce model. If your site already pushes GA4 ecommerce events to gtag or the GTM dataLayer, you have nothing to do: Eureka reads them. Otherwise, call the shortcuts directly.

Events ​

view_item_list, view_item, select_item, add_to_cart, remove_from_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info, purchase, refund, add_to_wishlist, view_promotion, select_promotion.

Parameters ​

ParameterMeaning
transaction_idOrder ID (required for purchase and refund)
valueTotal amount
currencyISO code, for example EUR
tax, shippingAmounts
couponPromo code
items[]item_id, item_name, item_category (to item_category5), item_brand, item_variant, price, quantity

Common aliases from other tools are accepted too (order_id, revenue, products, sku, name, category, qty…).

Example ​

js
eureka('add_to_cart', {
  currency: 'EUR', value: 129,
  items: [{ item_id: 'SKU-PEG41-42', item_name: 'Pegasus Trail 41', item_category: 'Trail running shoes', item_variant: '42', price: 129, quantity: 1 }],
})

eureka('purchase', {
  transaction_id: 'T-10293', value: 134.9, currency: 'EUR', tax: 21.5, shipping: 5.9, coupon: 'AUTUMN15',
  items: [{ item_id: 'SKU-PEG41-42', item_name: 'Pegasus Trail 41', price: 129, quantity: 1 }],
})

An order whose transaction_id was already received in the last 7 days is recorded as a duplicate and excluded from revenue, so reloading the confirmation page is safe.

Agents & humans, every visit counts!