*How-to › Tracking and data*

# How to Set Up Google Analytics 4 Purchase Tracking

See which pages, products and campaigns make you money. You save your GA4 measurement ID, choose how events travel, retire the old tag and test a purchase. 9 parts.

Quick links

- [What gets tracked](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#how-it-works)
- [Step 1. Create a web data stream in Google](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#stream)
- [Step 2. Save the measurement ID](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#measurement)
- [Step 3 (optional). Send events through Google Tag Manager](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#tag-manager)
- [Step 4 (optional). Also send events from your server](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#server)
- [Step 5. Retire the old Universal Analytics tag](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#ua)
- [How consent affects your tracking](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#consent)
- [Step 6. Test it](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#test)
- [If it does not work](https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/#troubleshooting)

**Where to find it:** WP Admin › EasyCart › Settings › Marketing › Analytics & ads

*Before you start*

## What gets tracked

What you need and which events your store sends to Google.

### What gets tracked

What you need, and the events your store sends to Google

**What you need.** WP EasyCart PRO or Premium, and a Google Analytics 4 property with a web data stream. Every GA4 setting in WP EasyCart is a PRO setting, so the free plugin shows them locked. The free trial unlocks them if you want to try it first.

**What your store sends.** Once your measurement ID is saved, the store loads the Google tag and reports the shopping journey as GA4 ecommerce events:

**view_item_list** when a shopper opens a product list, **view_item** on a product page, **add_to_cart** and **remove_from_cart** as they fill the cart (including the remove button in the one-page checkout’s order summary), **view_cart**, **begin_checkout**, **add_shipping_info** and **add_payment_info** as they move through the cart and checkout pages, and **purchase** on the order confirmation page.

The purchase event carries the order number as the transaction ID, the order total, tax, shipping, the coupon code and every item with its model number, name, price, brand and quantity. Amounts are always in your store’s base currency, whatever currency the shopper browsed in.

The steps: create the data stream, save the ID, choose how events travel, retire the old Universal Analytics tag, set consent, then test.

*Set it up*

## Six steps

Create the data stream, save the ID, choose how events travel, retire the old tag, set consent and test.

### Step 1. Create a web data stream in Google

You need a G- measurement ID

In Google Analytics open **Admin**, pick your GA4 property and add a **Web** data stream for your store’s address. Google shows the stream’s **measurement ID**, which looks like `G-XXXXXXXXXX`. Copy it.

If you already have a GA4 property, reuse its stream. Do not make a second one for the same store, or your numbers split in two.

### Step 2. Save the measurement ID

Settings › Marketing › Analytics & ads

Go to **EasyCart › Settings** and choose **Analytics & ads** under Marketing. On the **Google Analytics 4** card, step 1 **On every page** has **Add**, which opens the Google Analytics 4 box. Paste your ID into **GA4 measurement ID**.

That is all a standard store needs. The Google tag loads on your store pages and every event above starts flowing. Product, cart and checkout events fire on the pages where shoppers do those things, and the purchase event fires on the order confirmation page.

![The Google Analytics 4 card on Settings › Marketing › Analytics & ads, in three steps.](https://docs.wpeasycart.com/wp-content/uploads/2026/11/analytics-and-ads-settings-ga4-607.jpg)

> **💡 Note:** Google Analytics only needs the G- ID. A Google Ads tag and a Meta Pixel are separate settings, covered in the next guide.

### Step 3 (optional). Send events through Google Tag Manager

For stores that already run a Tag Manager container

Turn on **Send events through Google Tag Manager** and the store pushes the same ecommerce events to your Tag Manager *dataLayer* instead of calling the Google tag directly. Your container decides what happens to them. The row’s own note says it: your container must load GA4 itself.

Keep the GA4 measurement ID filled in, because the events only fire while it is set. Then check your Realtime report after saving. If page views double, the container and the store are both loading GA4 and one of them needs to stop.

### Step 4 (optional). Also send events from your server

Server events still count when a browser blocks tracking

Ad blockers and privacy browsers stop the Google tag before it runs. Server events fix that gap. Your store posts view item, add to cart, begin checkout, add shipping info, add payment info and purchase to Google from your own server. On the Google Analytics 4 card, step 2 **Also from your server** has **Change**. In the box it opens, turn on **Also send events from the server** and fill in the three values under it:

**Measurement ID for server events**: the same G- ID from your data stream.
**Measurement Protocol API secret**: in Google, open the data stream and create one under Measurement Protocol API secrets. It is only ever sent from your server.
**Server container URL**: the address of your Tag Manager server container, such as `https://gtm.example.com`.

Server events run only when all three values are filled in and your license is active. A lapsed license or an ended trial stops them. The browser tag keeps working either way.

The server sends purchase when an order is paid, once per order. A bank transfer or check order counts when you mark it paid, not when the customer places it.

Events are skipped for known search-engine bots, and nothing is sent unless the shopper has given statistics consent when your Cookie consent setting asks for it.

![The Google Analytics 4 box with every row shown, the three server event values among them. No values are filled in.](https://docs.wpeasycart.com/wp-content/uploads/2026/11/analytics-and-ads-settings-ga4-box-607.jpg)

> **⚠️ Careful:** Server events need a Tag Manager server container. The store posts them to the container address you enter, not straight to Google, so leave this off unless you already run one.

### Step 5. Retire the old Universal Analytics tag

Google stopped processing it in 2024

While an old `UA-` ID is still saved in **Universal Analytics tracking ID (retired)**, the Google Analytics 4 card says so with **Remove it**. Press it. Google stopped processing Universal Analytics data in 2024, so the old tag only slows your pages down. This one row works in the free plugin too.

While your Cookie consent setting is asking for permission, the store already skips the old tag. Clearing it removes it for everyone.

### How consent affects your tracking

The Cookie consent card decides when Google may run

The first card on the same page, **First: do shoppers have to agree?**, controls whether Google waits for the shopper. It starts on **Don’t ask**, which is right for stores that do not need a cookie banner. If you use one, choose **Ask, through my cookie banner** or **Google Consent Mode**. Google Analytics then waits for the shopper to accept, and Google’s consent signals follow their answer. Consent never blocks checkout.

With **Google Consent Mode** the Google tag loads at once and your banner sets Google’s consent. With any other choice the tag does not load until the shopper accepts marketing or statistics cookies.

Every choice, and how to check it, is in [How to Track Google Ads and Meta Conversions](https://docs.wpeasycart.com/docs/how-to-guides/how-to-track-google-ads-and-meta-conversions/).

![First: do shoppers have to agree? The three ways on Analytics & ads.](https://docs.wpeasycart.com/wp-content/uploads/2026/11/analytics-and-ads-settings-consent-607.jpg)

### Step 6. Test it

Realtime, DebugView and one test order

Open your store in a private window, so an admin login does not get in the way.

**1.** In Google Analytics open **Reports › Realtime**. Browse your store. You should appear within a minute or so.
**2.** For a detailed look, connect Google’s Tag Assistant to your store. It puts the visit in debug mode, and **DebugView** under Admin then lists each event with its values as it arrives.
**3.** Open a product, add it to the cart and go through checkout with your gateway’s test card. You should see view_item, add_to_cart and each checkout step, then purchase on the confirmation page. Open the purchase and check that the transaction ID is your order number and the value is the order total.
**4.** Standard reports, such as the ecommerce purchases report, can take up to a day to fill. Realtime and DebugView do not wait.

To test server events, use your server container’s preview and repeat the same test order.

*Keep it running*

## When something goes wrong

The usual reasons events are missing, doubled or wrong.

### If it does not work

The usual reasons events are missing or doubled

**No events at all.** Check that the ID starts with `G-`, has no spaces and was saved. A store without PRO shows the row locked, and a locked row does not save. Then open your store with `?wpec_consent_check=1` on the address. If the panel says Google Analytics is held back, your cookie banner has not been accepted or Cookie consent is reading the wrong banner.

**Events appear but purchase does not.** The purchase event fires on the order confirmation page, so place a test order and watch that page load. Check that a caching plugin is not serving an old copy of it, and that your Cookie consent choice is not holding the Google tag back.

**Everything is counted twice.** Another plugin, your theme or a Tag Manager container is also loading GA4. Keep one. A leftover Universal Analytics ID is a separate tag, so clear it as in step 5.

**Revenue looks wrong.** Events always use your store’s base currency, not the currency a shopper browsed in. Check that your GA4 property’s currency setting makes sense for it.

**Server events do nothing.** All three values must be filled in, the toggle must be on, and your license must be active. Check that the API secret is from the same data stream as the measurement ID, and that your server container answers at its `/mp/collect` address.

Still stuck? Open a ticket from your account at [wpeasycart.com/my-account](https://wpeasycart.com/my-account).

*Keep going*

## Related panels

- [Google Analytics](https://docs.wpeasycart.com/docs/administrative-console-guide/google-analytics/): The Google Analytics integration guide.
- [Reports](https://docs.wpeasycart.com/docs/administrative-console-guide/reports-store-stats/): Your store’s own sales numbers, to check Google against.
- [Checkout](https://docs.wpeasycart.com/docs/administrative-console-guide/checkout-settings/): Checkout settings, including the one-page checkout.
- [Store Status](https://docs.wpeasycart.com/docs/administrative-console-guide/store-status/): Store Status shows what the Cookie consent setting found.

## Ready to run your store on WP EasyCart?

Everything in this guide works with the free plugin. PRO and Premium add subscriptions, memberships, wholesale pricing and more. Try every PRO feature free for 14 days.

[Start your free trial](https://www.wpeasycart.com/wp-easycart-professional-14-no-risk-trial/) · [See what is included](https://www.wpeasycart.com/wordpress-shopping-cart-pricing/)

![The WP EasyCart admin: orders and offers](https://docs.wpeasycart.com/wp-content/uploads/2026/09/cta-wpeasycart-pro-v2.jpg)

---

Source: https://docs.wpeasycart.com/docs/how-to-guides/how-to-set-up-google-analytics-4-purchase-tracking/ ( updated 2026-11-06 )
