Don't have one? Create one ↗
Shopify setups — Customer Events & a GTM custom pixel

Lesson 5 of 8

The Events And Their GA4 Mapping

Once events are landing in the dataLayer, the work is mapping Shopify's names and fields onto GA4's. Shopify publishes the canonical mapping, and following it keeps your ecommerce reports correct.

Event → GA4 event

  • product_viewedview_item
  • product_added_to_cartadd_to_cart
  • cart_viewedview_cart
  • checkout_startedbegin_checkout
  • payment_info_submittedadd_payment_info
  • checkout_completedpurchase

Field → GA4 parameter (on checkout_completed)

  • checkout.order.idtransaction_id
  • checkout.totalPrice.amountvalue
  • checkout.currencyCodecurrency
  • checkout.shippingLine.price.amountshipping
  • checkout.totalTax.amounttax
  • checkout.discountApplicationscoupon
  • checkout.lineItemsitems (needs reshaping)

The one field that isn't a straight rename is lineItems: GA4's items array wants item_id, item_name, price, quantity, so you map each Shopify line item into that shape (often in the pixel, or in a Custom JS variable in GTM).

items: event.data.checkout.lineItems.map((li) => ({
  item_id: li.variant?.sku || li.variant?.product?.id,
  item_name: li.title,
  price: li.variant?.price?.amount,
  quantity: li.quantity,
}))

Key takeaway

Follow Shopify's published mapping: each event maps to a GA4 event and each field to a GA4 parameter. Most are renames; lineItems is the exception and must be reshaped into GA4's items array.