Home / Resources / How to set up GA4 on Shopify

Tracking and analytics · Guide

How to set up GA4 on Shopify (step by step)

5steps from start to a tested purchase event
4core shopping events to check
1method only for the tag, or sales count twice

Short answer: setting up GA4 on Shopify takes five steps: create the property, add the tag with one method, turn on the four ecommerce events, mark purchase as a key event, then test a real order in DebugView. Use only one method to add the tag, or every sale is counted twice.

Watch it in under a minute

Real jobs, short videos. Press play.

See all videos →
  • Real store

    Tracking rescue: 0 purchases in GA4

    Selling daily, reporting zero. Fixed and proven with test orders.

The journey of one sale

1Visitor browsesview_item fires on a product page
2Adds to cartadd_to_cart fires
3Starts checkoutbegin_checkout fires
4Payspurchase fires with ID, value and currency
5GA4 records itMarked as a key event

If any step in this chain fails to send data, your reports will have a hole in them. The five steps below make sure every link works.

The five steps

  1. Create the GA4 property and web data streamIn Google Analytics, create a property and a web data stream for your store domain. Copy the Measurement ID that starts with G-.
  2. Add the tag with one method onlyShopify has a Google & YouTube app that sets up conversion tracking, and a Customer events section in admin where pixels are managed. Many stores also use Google Tag Manager. Pick one method and remove any older GA4 code, otherwise every event is counted twice.
  3. Turn on the ecommerce eventsCheck that view_item, add_to_cart, begin_checkout and purchase send data. The purchase event must carry a transaction ID, a value and a currency.
  4. Mark purchase as a key eventIn GA4 Admin, open Events and mark purchase as a key event. Google Ads and your reports use it to count sales.
  5. Test with DebugView before you trust any reportPlace a real test order and watch the events arrive in DebugView. Each should appear once with the right value. Then compare the order in Shopify with the purchase in GA4.

Why only one method? Google’s own guidance for the Shopify app warns that turning off its conversion tracking can seriously hurt campaigns unless you set up tracking manually. If you move to another method, switch the old one off the same day.

Which events to check

EventWhen it firesHow to test
view_itemProduct page loadsOpen a product page and check one event appears
add_to_cartAdd to cart buttonAdd an item and check the item name and price
begin_checkoutCheckout startsStart checkout and check the cart value
purchaseOrder confirmationPlace a test order and match transaction ID, value and currency to Shopify

Common mistakes that break GA4 on Shopify

ProblemWhat to do
Duplicate purchase eventsTwo methods are installed. Count GA4 purchases against Shopify orders for the same dates. If GA4 is higher, remove one method.
Missing currencyThe purchase has a value but no currency, so revenue can show as zero. Add the currency code to the event.
Purchase fires on only some checkoutsSome payment methods redirect and can skip the confirmation step. Test each payment method you offer.
Consent blocks everythingShopify’s own help says that, under opt-in consent settings, non-essential data is collected only after consent. Check what fires before and after a visitor accepts.

Shopify’s customer privacy settings control Shopify-specific tools and pixels. Third-party pixels you add by hand may need their own consent logic.

Why GA4 will not match Shopify exactly

Shopify records every paid order. GA4 records only the visits where tracking was allowed to run, so it usually shows a little less. Ad blockers and consent choices both reduce what the browser can send. If the gap is large, treat it as a sign something is broken and work through the mistakes above. For the wider picture see why GA4, Google Ads and Meta show different numbers.

Your final test checklist

  • Only one GA4 tag method is active
  • view_item, add_to_cart, begin_checkout and purchase all appear in DebugView
  • The purchase event has a transaction ID, value and currency
  • One real test order equals one purchase in GA4
  • Purchase is marked as a key event
  • Every payment method you offer was tested

If you spend on Google, Meta or TikTok and cannot reconcile your sales, a tracking audit usually pays for itself. In one audit for a lead-generation client we raised tracked lead events from 1 to 14 of 14 and fixed all 9 findings in 8 days. See the PH Media Group case study.

Sources

Questions answered

Do I need Google Tag Manager to use GA4 on Shopify?

No. Shopify has its own ways to add tags, including the Google and YouTube app and the Customer events section. Google Tag Manager gives more control and is common for stores that run several ad platforms. Choose one method for each tag so events are not sent twice.

Why is GA4 revenue lower than Shopify revenue?

A small gap is normal. Visitors who decline consent and ad blockers can stop events from being recorded, while Shopify records every paid order. A large gap can mean a tracking error, such as a purchase event that fires only on some checkouts.

How long until GA4 data shows after setup?

Events appear in Realtime and DebugView within minutes. Standard reports can take longer to fill in, so test with DebugView first rather than waiting for the reports.

Which GA4 events should a Shopify store track?

At minimum: view_item, add_to_cart, begin_checkout and purchase. The purchase event should send a transaction ID, value and currency, and should be marked as a key event.

Can I use the same setup for Google Ads and Meta?

GA4 and Google Ads can share the purchase key event. Meta needs its own pixel and ideally the Conversions API, which we cover in our server-side tracking guide.

Limon Ghosh

Limon Ghosh runs MindfulClicks from Sydney and manages paid ads, tracking and Claude AI automation for online stores and B2B companies in Australia and the USA.

Free checklist

Is your tracking telling the truth?

Get the Tracking Health Checklist: 35 quick checks for GA4, Google Ads, Meta and your store. Download it free.

This field is required.
This field is required.

We use your details to send the checklist and occasional practical tips. Unsubscribe any time. Privacy policy.

Not sure your tracking is right?

Get a free 30-minute review of your GA4, Tag Manager and ad pixels. We tell you in plain words what is broken and what to fix first.

Book a free strategy call →

Related

Get your consultation booked in

Share a few details in the form so we can better help you and your company


MindfulClicks

Limon Ghosh

PPC/SEO Consultant Expert