How to test GA4 ecommerce events before trusting the report

Test GA4 purchases, discounts, duplicate orders and partial refunds with a complete example and a worksheet for expected values and actual results.

Planning diagram showing Action, Payload, Collection, Report.

How to test GA4 ecommerce events with one repeatable order

Say you sell skincare, and the revenue in GA4 doesn’t match your store’s order export. Before you trust either number, you place one test order you can repeat: a 150 mL cleanser and two 30 mL moisturizers.

That single order is the simplest way to test GA4 ecommerce events. First, agree the test setup and payment method with the store owner. Name the person checking the order. Name the developer checking the analytics event. Then start at the product page and follow the customer through cart, checkout and confirmation. Write down the variants and quantities you picked.

The order in this guide is fictional. Its order ID is QA-ORDER-1042 and its currency is USD. It describes expected values. It isn’t a record of a live store test. Give each real test order its own ID. Don’t copy this example ID into tracking code.

The merchandise total is $45 after a $9 total discount. The order also records $5 shipping and $3.60 tax. So the checkout charge is $53.60. Those shipping and tax amounts belong to this fictional order. Your test must use the amounts your store records.

Fictional order QA-ORDER-1042, in US dollars

Order lineCalculation after discountMerchandise value
Demo cleanser 150 mL / DEMO-CLEAN-150($30 unit price − $5 unit discount) × 1$25
Demo moisturizer 30 mL / DEMO-MOIST-30($12 unit price − $2 unit discount) × 2$20
Total merchandiseOne cleanser and two moisturizers$45
Go deeperGoogle’s ecommerce event implementation guide

Work out the purchase value once

In GA4, item price is the unit price after discount. The discount field holds the discount per unit as money, not a percentage. Google doesn’t subtract that field from price for you. In this order, send cleanser price 25 and discount 5. Send moisturizer price 10 and discount 2.

Work out the purchase value from those prices and quantities: (25 × 1) + (10 × 2) = 45. Don’t subtract the $9 discount again. Keep shipping and tax in their own fields. If you send the $53.60 checkout charge as value, you’ll overstate merchandise revenue.

Expected purchase event fields for the fictional order
FieldExpected value
Event namepurchase
transaction_idQA-ORDER-1042
currencyUSD
value45
shipping5
tax3.60
items[0]item_id: DEMO-CLEAN-150; item_name: Demo cleanser 150 mL; price: 25; discount: 5; quantity: 1
items[1]item_id: DEMO-MOIST-30; item_name: Demo moisturizer 30 mL; price: 10; discount: 2; quantity: 2
Go deeperGoogle: purchase event parametersGoogle: calculate discounted item prices

Compare the expected fields with the captured event

After the test order completes, the developer captures the purchase event. The developer copies each field next to its expected value. The developer also checks which GA4 property got it. Record the test time, browser and checkout route. Record the consent state, meaning what the visitor agreed to in the cookie banner. Keep customer names, email addresses and other personal details out of the shared record.

Here’s what to look for in the skincare order. Say the event reports value 53.60. Check whether the checkout total was mapped into merchandise value. Say value is 45 but the moisturizer quantity is 1. Then the order total and item-level units disagree. Say both items carry the cleanser SKU, the product’s stock code. The total can still look right while product reports are wrong. These are defects to look for, not findings from a test Dahna has run.

The worksheet leaves the observed value and evidence fields blank. Fill them in from the event capture. Then mark each check pass, fail or not tested. An expected value that looks right isn’t proof that your store sent it.

Reload the confirmation page, then place a different order

One order must keep the same transaction ID, no matter how often the confirmation page loads. A transaction ID is the unique order number GA4 uses to tell purchases apart. To check it, reload the confirmation page. Go back through browser history. Reopen the order link if your store allows it. A timestamp or random ID created on every page view can turn one order into several purchases that look different.

Google documents purchase deduplication for web streams. That means it drops repeat purchase events when the same user sends the same transaction ID. It doesn’t apply to app streams. Use an ID that’s unique to the order and holds no personal information. Avoid empty IDs. Avoid one fixed ID reused across customers. Your setup should also avoid sending the event again when it doesn’t need to.

Then place a second authorized test order. It must get a different ID. Check both cases. Reopening the first order must not raise your recorded purchases. A truly new order must not vanish because it reused the first ID. In the example, QA-ORDER-1042 should count once, no matter how often you reload it.

How the work fits together

Verify the event through four layers

  1. Action

    The customer completes the intended step.

  2. Payload

    The event describes the exact item and value.

  3. Collection

    The event reaches the intended property.

  4. Report

    The agreed metric reflects the tested definition.

Follow the customer action through its fields, collection and reporting.
Go deeperGoogle’s transaction-ID deduplication guidance

Test a partial refund: return one moisturizer

A partial refund event should carry only the returned item, its quantity and its own merchandise value. In this example, the customer returns one of the two moisturizers. The refund record holds $10 merchandise and $0.80 tax. No shipping is refunded, so $10.80 goes back in total. Send a refund event tied to QA-ORDER-1042. Include only the returned moisturizer and quantity 1. Its merchandise value is 10.

Include the item data so item-level refunds can be reported. A refund carrying both original moisturizers would overstate returned units. A refund value of 45 would reverse the whole merchandise amount. Check the real return record before you decide which items, tax and shipping belong in your test.

The expected remaining merchandise amount is $45 minus $10, or $35. Check that the report you use shows the refund under its own definitions and processing schedule. Test cancellations, order changes or exchanges separately if your setup supports them. One refund case doesn’t cover every later change to an order.

Expected partial-refund fields; no live refund was sent

FieldExpected value
Event namerefund
transaction_idQA-ORDER-1042
currencyUSD
value10
shipping0
tax0.80
items[0]item_id: DEMO-MOIST-30; item_name: Demo moisturizer 30 mL; price: 10; discount: 2; quantity: 1
Go deeperGoogle: refund event parameters

Record which checkout paths and consent states you tested

Run every check under the consent setup your site actually uses, and write that state down. Ask the owner to confirm what GA4 should collect in each state. An event that’s missing under a restricted state may be expected. A written note of the state lets another reviewer read your result correctly.

Repeat the journey on the mobile browsers and express payment methods your customers use. Check product selection, add-to-cart and checkout events as well as purchase. A desktop card payment that works doesn’t cover a mobile express checkout. Mark every route you didn’t test, clearly.

Check collection and reporting separately

A debug capture shows the fields collected for a test. A standard report may not show them at the same time. A debug capture is a live view of what an event sent. Record when each check happened. Record which property and report you looked at. Don’t place more orders just because a report hasn’t updated yet.

If the result is missing, trace the trigger, payload, request destination and report settings. The payload is the data the event carries. Keep your store’s order and refund records as the reference for what really happened. Explain any gaps before you use the analytics view for a budget choice.

Keep the evidence for the next release

Save the completed checks with the checkout or tracking change that prompted them. Rerun the relevant cases after theme, app, consent or integration changes. Ask the report owner to confirm the definitions. Ask the developer to confirm what the setup sent.

Approve the tested scope only when mismatches are fixed or are noted in writing. Keep untested paths visible. Then the next person knows what’s left to check. The next time your theme changes, rerun the cleanser and moisturizer order and its refund.

Acceptance record to complete on your own store
CheckExpected resultObserved evidence
Purchase values45 merchandise; 5 shipping; 3.60 tax; two SKU records and three unitsNot tested in this example
Confirmation reloadSame order ID; no additional recorded purchaseNot tested in this example
Different orderA new order-unique transaction IDNot tested in this example
Partial refundOriginal order ID; one moisturizer; merchandise value 10Not tested in this example
Collection coverageNamed browser, payment route and consent stateNot tested in this example
Reporting follow-upPurchase and refund checked in the intended reportNot tested in this example

When to bring in analytics support

Bring Dahna in when you can show the mismatch. Bring the integration list, the report you rely on and a completed worksheet. We can help define the business checks and work with your developer. We can also connect the findings to the report. Agree any real payments or refunds with the commerce owner before testing.

If collection is correct but ad platform and store totals still differ, look at attribution and reconciliation next. Attribution is how credit for a sale gets assigned to ads. Reconciliation is matching those numbers back to real orders.

Go deeperMarketing analytics servicesReconcile ad-platform and store orders

Plan measurement or investigate a reporting mismatch

Use the measurement plan to agree which business questions your setup must answer. Use the reconciliation guide when collected orders and the results ad platforms claim don’t match.

Go deeperAnalytics collectionMarketing measurement planReconcile ad-platform and store orders

Download the expected-versus-observed worksheet

The CSV holds every purchase and refund field in this example, followed by duplicate and reporting checks. Swap the fictional order for your own approved order. Then fill the empty observed-value and evidence columns from your test.

Go deeperDownload the GA4 test-order worksheet

In summary

To test GA4 ecommerce events, place one test order you can repeat and work out its expected values. Then compare them with the events collected and the report built on them. The example here separates a $45 merchandise purchase from a $53.60 checkout charge. It also follows a one-item refund. Use the worksheet to record what your own setup sends before you approve it.

Sources & further reading

  1. Measure ecommerceGoogle Analytics for Developers
  2. Minimize duplicate key events with transaction IDsGoogle Analytics Help
  3. Purchase event parametersGoogle Analytics for Developers
  4. Refund event parametersGoogle Analytics for Developers
  5. Apply a discount to an ecommerce eventGoogle Analytics for Developers
Published Topics
  • Marketing analytics
  • Ecommerce
Ana Yon
More by AnaAna on LinkedIn

Find the order or event behind the mismatch

Share the report you need to trust and the checks your team has completed. Dahna can help connect the business definitions, tracking review and reporting follow-up.

Explore marketing analytics servicesSee how Dahna works with brands

Tell us your story

Share a little about your brand and what you need help with. We reply within 24 hours.

What do you sell, who do you want to reach, and what would you like to achieve?

Add details (optional)
What can we help with? (optional, choose any)