Skip to content
Will your site survive Black Friday? Free peak-readiness audit →
ANALYTICS

GA4 ecommerce events: the complete setup guide

Every GA4 recommended ecommerce event explained — view_item to purchase — with the parameters you need, dataLayer examples and how to test them.

By VISIBI Analytics team·Reviewed by Adnan Khan, Co-founder & CEO·Updated 29 September 2026·10 min read
QUICK ANSWER

Every GA4 recommended ecommerce event explained — view_item to purchase — with the parameters you need, dataLayer examples and how to test them.

KEY TAKEAWAYS
✓GA4 uses recommended events such as view_item, add_to_cart, begin_checkout and purchase.
✓Each event needs an items array with item_id or item_name.
✓Send purchase once per order with a unique transaction_id to avoid duplicates.
✓Test in DebugView before trusting reports.

Required parameters

Every ecommerce event should include currency, value and an items array. Each item needs item_id or item_name, plus price and quantity. Add item_brand, item_category (up to five levels), item_variant and coupon for richer reports. The purchase event also needs transaction_id, and ideally tax and shipping.

Is your GA4 tracking accurate?We set up GA4, GTM and ad conversions properly — tested against real orders.Get a free tracking audit →

gtag.js or Google Tag Manager?

Both work. gtag.js is simpler for a single destination. Google Tag Manager is better when you also need Google Ads, Meta, TikTok or Microsoft Ads tags, because one dataLayer can feed them all. Platforms like Shopify now use Customer Events; Magento and WooCommerce usually need a dataLayer module or custom code.

Common mistakes

  • Firing purchase on page refresh — deduplicate with transaction_id
  • Sending value as a string with a currency symbol
  • Missing currency (revenue shows as zero)
  • Different item_id formats across events
  • Consent Mode not configured for UK/EEA traffic

How to test

Enable debug mode with the GA Debugger extension or Tag Assistant, then watch events arrive in Admin → DebugView. Place a real test order and compare GA4 revenue against your platform the next day.

Common mistakes to avoid

✕Trusting GA4 numbers without checking them against real orders
✕Firing purchase events more than once per order
✕Skipping Consent Mode for UK/EEA traffic
✕Having no documentation of what is tracked and why
HOW VISIBI CAN HELP

How we help with analytics

01Health checkWe test your tags against real orders and consent choices.
02Measurement planA documented dataLayer and event spec for your platform.
03Implement & QABuilt on staging, verified with test orders, then released.
04MonitorAlerts when tags break after site changes.
Get a free tracking audit →Free · No obligation · Reply within 24 hours

Frequently asked questions

Why is my GA4 revenue lower than my store?

Consent refusals, ad blockers, missing purchase events on some payment methods and duplicate or missing transaction IDs are the usual causes.

Do I need Google Tag Manager for GA4?

No, but it makes managing multiple tags much easier.

What is enhanced measurement?

Automatic tracking of page views, scrolls, outbound clicks, site search and video — it does not include ecommerce events.

AK
Reviewed by Adnan Khan · Co-founder & CEO25 years growing digital businesses across search, AI visibility and ecommerce. Written by the VISIBI Analytics team.Meet the team →
Was this guide helpful?
Share:LinkedInXEmail
RELATED SERVICES

Keep reading

ANALYTICS · 7 MINMeta Conversions API explained: why your pixel isn’t enoughRead →ANALYTICS · 7 MINGoogle Consent Mode v2: what UK businesses need to doRead →ANALYTICS · 6 MINGoogle Tag Manager and tracking scripts breaking Magento CSPRead →
FREE · NO OBLIGATION

Is your GA4 tracking accurate?

We set up GA4, GTM and ad conversions properly — tested against real orders.

Get a free tracking audit →Talk to a specialist
✓ Senior specialist, not a bot✓ Reply within 24 hours✓ Clients in 18 countries
TRACKING HEALTH CHECKEXAMPLE
Are your tags telling the truth?
GA4 revenue vs orders−18%
Consent Mode v2Missing
Google Ads conversionsFiring
Your free review shows your real numbers.