Why most webshops have GA4 misconfigured

Google Analytics 4 replaced Universal Analytics in July 2023, but many webshops still rely on the default setup. The result: missing purchase data, incorrect revenue tracking, and KPIs that do not match reality.

This guide walks you through the complete GA4 setup for e-commerce — from creating a property to verifying enhanced e-commerce tracking works. No fluff, just the steps that matter.

Step 1: Create your GA4 property

If you do not yet have GA4 set up, start here:

  1. Go to analytics.google.com and sign in with your Google account
  2. Click Admin (gear icon bottom-left) then Create Property
  3. Name your property (e.g., your shop name), set timezone and currency
  4. Choose Web as the platform and enter your webshop URL
  5. Copy the Measurement ID (starts with G-) — you need this for step 2

Step 2: Install the tracking code

How you install the code depends on your platform:

Shopify

Settings → Customer events → Add custom pixel. Paste the GA4 snippet and activate. Shopify automatically sends purchase events to GA4.

WooCommerce

Install the GA4 Google Analytics plugin (free) or use Google Site Kit. Enter your Measurement ID and enable enhanced e-commerce tracking.

Magento

Use the official Adobe Commerce GA4 extension, or install the Weltpixel GTM/GA4 extension which handles enhanced e-commerce events out of the box.

Custom platform

Use Google Tag Manager. Install GTM on your site, then configure GA4 Configuration and GA4 Event tags for each e-commerce action (view_item, add_to_cart, purchase).

Step 3: Enable enhanced e-commerce events

GA4 needs these events to track your funnel properly:

  • view_item_list — fired when a category page loads
  • view_item — fired when a product page loads
  • add_to_cart — fired when a user adds a product to their cart
  • begin_checkout — fired when a user enters the checkout flow
  • add_payment_info — fired when payment details are entered
  • purchase — fired on the order confirmation page with transaction ID, value, currency, and items

Without the purchase event containing the correct parameters, your revenue in GA4 will be zero or wrong.

Step 4: Configure key events (formerly conversions)

In GA4, purchase is automatically a key event. But you should also mark these as key events:

  • add_to_cart — track how many visitors show purchase intent
  • begin_checkout — measure checkout initiation
  • generate_lead — if you have forms for contact or newsletter

Admin → Events → toggle “Mark as key event” on the events you want to track.

Step 5: Link Google Ads and Search Console

These integrations unlock critical data:

  • Google Ads — Admin → Product Links → Google Ads Links. This imports ad cost and enables remarketing audiences.
  • Search Console — Admin → Product Links → Search Console Links. This imports organic search data (queries, CTR, position).
  • Google Merchant Center — links shopping data for better attribution.

Step 6: Configure data retention and settings

GA4 defaults to 2 months data retention for explorations — too short for year-over-year comparisons.

  1. Admin → Data Settings → Data Retention
  2. Change from 2 months to 14 months (the maximum)
  3. Admin → Data Settings → Data Collection — enable Google signals if you want demographic data (requires cookie consent in EU)

Step 7: Filter internal traffic

You and your team visiting your own site will inflate your session count and skew metrics. Set up a filter:

  1. Admin → Data Streams → click your web stream
  2. Configure tag settings → Define internal traffic
  3. Add your office IP address(es) and home IPs of team members
  4. Admin → Data Filters → activate the internal traffic filter

Step 8: Verify everything works

Do not skip this step. Most GA4 setups are broken in subtle ways.

  • Real-time report — open your webshop in another tab, add a product to cart, check if the event appears
  • Test a purchase — place a test order, then verify the purchase event shows up with correct revenue in the real-time report
  • DebugView — Admin → DebugView. This shows detailed event parameters and helps you spot misconfigured events

Common GA4 mistakes to avoid

  • Wrong currency — if your purchase events do not include the currency parameter, GA4 uses the property default. Always pass currency explicitly.
  • Missing item data — the purchase event needs an items array with product ID, name, price, quantity. Without it, you lose product-level insights.
  • Duplicate events — installing GTM and a plugin at the same time can fire events twice, inflating your data.
  • Not filtering bots — GA4 has basic bot filtering but misses most spam. Your real conversion rate is higher than GA4 shows. Read how to detect bot traffic.
  • Ignoring Consent Mode — EU visitors who reject cookies produce no data unless Consent Mode v2 is set up. Without it, you undercount traffic.

What to track beyond the basics

Once your standard setup is verified, add these:

  • Cart abandonment — compare begin_checkout to purchase to get your cart abandonment rate
  • Product performance — use the Monetisation → E-commerce purchases report to see which products generate most revenue
  • User acquisition by cohort — see which marketing channels bring customers who come back
  • Engagement time by page type — diagnose where in your funnel users lose interest

Or skip the setup entirely

Getting GA4 right takes time — and keeping it right takes ongoing attention. If you would rather focus on running your webshop than debugging tracking pixels:

BlueWalnut’s Genius connects to your GA4 automatically, filters bot traffic, aggregates data from all your platforms (Shopify, Google Ads, Meta Ads, Klaviyo), and gives you the KPIs that actually matter — without the configuration headache.

Request a free demo — we will show you what clean, reliable data looks like.

Related articles

Run a free Health Check on your store →