How to test a GA4 purchase in DebugView on Shopify
Every guide to GA4 purchase tracking ends the same way. "Test it in DebugView." Here is what that actually involves on a Shopify store, from switching debug mode on to reading the purchase event, and what it means when the purchase never shows up.
In short, switch on debug mode with Google's Tag Assistant, open DebugView in GA4 under Admin, place a Shopify test order in the same browser, and click the purchase event to check it carries a transaction_id, a value, a currency and its items. A purchase that appears once, with those four right, is the proof. Anything else tells you which problem you have.
Before you start
- Know how GA4 is installed. Through Shopify's Google & YouTube app, a custom pixel under Customer events, Tag Manager, or code in your theme. It decides what you should expect to see, and a theme install cannot see checkout at all. Our free Shopify pixel checker shows which route your store uses.
- Set up a test order. Shopify lets you place test orders through its test payment gateway, or with Shopify Payments in test mode, so nothing is charged. Shopify warns that your store cannot take real orders while test mode is on, so pick a quiet moment and switch it off afterwards.
- Use a clean browser. Turn off ad blockers and privacy extensions for the test. Google says DebugView shows nothing when client-side privacy controls block Analytics.
- Accept the cookie banner. In markets where consent is required, Shopify's pixels only run once the visitor gives the permissions they need, and Google says DebugView shows nothing under consent mode until Analytics consent is given. Declining the banner in your test browser looks exactly like broken tracking.
1. Switch on debug mode
DebugView only shows events from browsers in debug mode, so ordinary visitors never appear in it. Google's DebugView guide gives three ways in.
- Tag Assistant. Go to tagassistant.google.com, add your store's address and connect. Your store opens in a new tab in debug mode. This is the route for an app or custom pixel install, where there is no code of yours to edit, and it is what Google's own Shopify setup guide points to for checking the tag.
- Tag Manager preview. If GA4 runs through Google Tag Manager, preview mode switches on debug mode for you.
- The debug_mode parameter. For a gtag install in your theme, add
'debug_mode': trueto theconfigcall while you test. Take it out afterwards.
2. Open DebugView
In GA4, go to Admin, and under Data display click DebugView. If more than one device is in debug mode, pick yours from the Debug device selector at the top left. The seconds stream shows events from the last 60 seconds and the minutes stream covers the last 30 minutes, so events appear as you click.
3. Walk the path a customer takes
In the Tag Assistant tab, browse like a shopper: a collection, a product, add to cart, the cart, then checkout. Watch the events arrive. Which ones you get depends on the install, but Google's Shopify guide lists what the Google & YouTube app sends on its own, including view_item_list on a collection, view_cart on the cart, remove_from_cart, and add_shipping_info when shipping details go in at checkout.
This part tells you a lot before any money moves. Page views but no ecommerce events means GA4 is installed but nothing is sending the shopping events. Storefront events that stop at the checkout point to GA4 being only in your theme, which Shopify does not load on checkout, or to debug mode not reaching the checkout page. Why theme code never sees a sale.
Want to know the route before you test? The free pixel checker reads your homepage and lists every tag, how it is installed, and whether that route runs on checkout. Check your store's pixels →
4. Place the test order
Complete the checkout with the test gateway or a Shopify Payments test card, in the same tab, and land on the thank-you page. Shopify's checkout_completed event, which app and custom pixels send the purchase from, is triggered once per checkout, typically on the Thank you page. Within a minute you should see purchase in DebugView.
5. Read the purchase event
Click purchase in the stream to open its parameters, and check them against the test order in your Shopify admin.
| Parameter | What it should be |
|---|---|
transaction_id | The order number, different for every order. Google marks it required, and it is how GA4 avoids counting one order twice. An empty one is worse than none, because GA4 deduplicates every purchase with an empty ID into one. |
value | A number. Google's purchase reference sets it to the items' price times quantity, without shipping or tax. |
currency | A 3-letter code such as GBP. Google requires it whenever value is set. |
items | One entry per product, each with an item ID or name, and a price and quantity that match the order. |
If you have the code that sends the purchase, from Tag Manager's preview or a custom pixel, our free GA4 purchase event checker checks it against the same reference and writes a corrected version. It runs in your browser, so nothing you paste leaves it.
6. Reload the thank-you page
Refresh the thank-you page, then open the order status page from the confirmation email. A second purchase in DebugView means something besides Shopify's pixel is sending it, such as a second install left in the theme or in Tag Manager. If it carries the same transaction_id, GA4 deduplicates it on web streams, but it is still worth finding. How duplicate purchases happen on Shopify.
If the purchase never shows up
| What you see | What it points to |
|---|---|
| Nothing at all, not even page views | Debug mode is not on in this browser, the cookie banner was declined, an ad blocker is running, or you are looking at the wrong GA4 property. Check the Debug device selector first. |
| Storefront events, nothing from checkout | GA4 is only in your theme, which does not load on checkout. Or debug mode did not reach the checkout page. Open the Realtime report under Reports a few minutes after the order. It does not need debug mode, so look for purchase there. |
| A purchase with no value or currency | Whatever sends the purchase is not reading the order total into those fields. See GA4 purchase event not firing on Shopify, cause 2. |
| Two purchases for one order | Two installs. Finding duplicate GA4 purchases. |
Clean up afterwards
- Switch Shopify's test mode off, so real orders can come through again.
- Cancel or refund the test order so it does not sit in your sales.
- Remove any
debug_modeline you added to your theme. - Google advises filtering out developer traffic, so the events you sent while testing do not end up in your reports.
What this test proves
- A real checkout on your store sends one GA4 purchase
- It carries the order number, value, currency and items
- Reloading the thank-you page does not send another
What it doesn't prove
That every order is tracked. One test order in one browser, with consent given and no ad blocker, is the best case. Real shoppers decline cookies, block scripts and pay in ways a test order does not, so some gap between GA4 and Shopify is normal. Why Shopify and GA4 purchases don't match.
Questions people ask
Why is GA4 DebugView empty?
Usually because debug mode is not switched on for the browser you are testing in, or because the events are not being sent at all. Google also says DebugView shows nothing when client-side privacy controls block Analytics, or when consent mode is in use and the visitor has not consented to Analytics cookies. On Shopify, accept the cookie banner in your test browser, turn off ad blockers, and check the Debug device selector is set to your device.
Can I test a Shopify purchase without paying?
Yes. Shopify lets you place test orders through its test payment gateway, or with Shopify Payments in test mode, so no real card is charged. Shopify warns that while test mode is on, your store cannot take real orders, so switch it off as soon as you are done.
Do DebugView test events count in my GA4 reports?
They can. Google advises filtering out developer traffic so the data collected while debug mode is on does not affect your reports. Cancel or refund the test order in Shopify too, so it does not sit in your sales.
How long do events take to appear in DebugView?
DebugView's seconds stream shows the events logged in the last 60 seconds, and the minutes stream covers the last 30 minutes, so events show up as you click through the store. If nothing appears within a minute or so, debug mode is not reaching that page.
Check what your store runs, before you test
The free audit reads your public Shopify pages and shows which tracking tags are installed and where, so you know what DebugView should show before you place an order. It reads the HTML your pages serve, so it cannot see a purchase fire. That is what this test is for.
Run a free audit →