Yanet.io
Bronnen

How to Set Up Google Analytics on Shopify (GA4 Guide)

shopify google analytics

Setting up shopify google analytics helps you understand where shoppers come from, which products attract interest, and where people leave before buying. Google Analytics 4 (GA4) adds traffic-source, campaign, and shopping-behaviour analysis alongside your Shopify reports. This guide covers connecting GA4, tracking ecommerce events, testing your installation, and fixing common errors without adding duplicate tracking.

Why Add Shopify Google Analytics to Your Store

Shopify’s built-in reports show sales, sessions, and customers inside your admin. GA4 gives you another view: how visitors discover your store, which campaigns bring engaged shoppers, and how audiences behave before purchasing. You can compare marketing channels in one tool rather than reviewing each advertising platform separately.

The goal of shopify google analytics is not to replace Shopify reporting. Use Shopify to understand store operations and sales, then use GA4 to investigate acquisition and shopping behaviour. For a clearer starting point, read our guide to Shopify analytics reports and metrics.

Merchant comparing shopify google analytics traffic and sales charts on a laptop
GA4 adds traffic-source and behaviour data to what Shopify already reports.

Expect some differences between the two systems. Definitions of sessions, attribution methods, and tracking rules can vary. A shopper who declines analytics consent, for example, may still place an order recorded in Shopify without generating the same activity in GA4.

Start with a practical question, such as “Which email campaigns bring shoppers who purchase?” That gives your setup a purpose and makes the reports easier to use than collecting data without deciding what you want to learn.

What You Need Before You Connect Google Analytics 4 to Shopify

Before starting your shopify google analytics setup, gather the accounts and permissions below. Keeping them ready prevents interruptions when Shopify asks you to select a Google account or analytics destination.

  • A Google account that you can continue using for your business.
  • A GA4 property and web data stream, or permission to create them.
  • Your Measurement ID, which looks like G-XXXXXXXXXX.
  • Store-owner access or staff permissions to manage relevant apps and settings in Shopify.
  • Your online store’s domain.

If you are searching for “google analytics 4 shopify” because you found an older tutorial, check its instructions carefully. Universal Analytics, identified by older UA- IDs, stopped processing standard-property data in 2023. Use GA4 instructions and a G- Measurement ID rather than copying an old Universal Analytics installation.

Decide how your consent banner and customer privacy settings should work before tracking visitors. Privacy laws such as GDPR and CCPA may affect your obligations, including when consent is required before tracking. Check the rules that apply to your business and customers; this guide is not legal advice.

Also note your store’s reporting time zone and currency. Matching these during setup makes comparisons easier, although it will not make every Shopify and GA4 total identical.

How to Set Up Shopify Google Analytics Step by Step

Use one installation method for shopify google analytics, then verify it before changing anything else. For most merchants, the Google & YouTube sales channel is the simplest starting point.

Step 1: Create a GA4 property and web data stream

Open Google Analytics and go to Admin. Create a GA4 property, give it a recognisable store name, and select the reporting time zone and currency that match your store. Menu labels can change, so follow the current property-creation prompts.

  1. Add a data stream and choose Web.
  2. Enter your store’s domain and a descriptive stream name.
  3. Keep enhanced measurement enabled.
  4. Copy the stream’s Measurement ID.

Save the property name and Measurement ID together. If you manage several stores, this small shopify google analytics housekeeping step helps prevent sending one store’s activity to another store’s property.

Step 2: Connect GA4 with the Google & YouTube sales channel

In Shopify admin, install or open Google & YouTube, Shopify’s own sales channel. Connect the Google account that has access to your GA4 property, then follow the analytics setup prompts to select the intended property and web data stream.

This is usually the easiest way to connect google analytics to shopify because ecommerce events are sent for you. The available screens and menu labels can change, so follow the on-screen instructions rather than relying on an older screenshot.

Before finishing your shopify google analytics connection, check the selected property and stream carefully. Do not add a separate theme tag simply because you cannot immediately see data in a standard report; testing comes next.

Step 3: Alternative – add GA4 with a custom pixel

If you need a developer-managed approach, go to Settings > Customer events in Shopify admin and add a custom pixel. The implementation must subscribe to Shopify’s standard customer events and send the corresponding GA4 events to your Measurement ID.

Choose this shopify google analytics method only if you are comfortable with JavaScript or have a developer. Adding an ID alone is not a complete ecommerce implementation: events and their relevant parameters must be mapped correctly.

Customer events run in a sandbox and respect customer privacy settings. That environment differs from ordinary theme code, so a script copied from a generic website tutorial may not work as expected. Treat the custom pixel as an alternative installation, not an extra layer beside another active setup.

Step 4: Avoid legacy and duplicate installs

A common shopify google analytics mistake is keeping two installations active. If the Google & YouTube app or a custom pixel already sends events, do not paste a second GA4 tag into theme.liquid or old “Additional scripts” fields.

Shopify has moved checkout customisation toward checkout extensibility and customer events, and old checkout scripts are being phased out. Review any inherited tracking before changing it, and check Shopify’s current documentation rather than assuming an old checkout tutorial still applies.

For reporting context and current guidance, consult Shopify’s official reports and analytics documentation.

How to Track Shopify GA4 Ecommerce Events

Ecommerce events describe shopping actions, such as viewing a product or starting checkout. With shopify google analytics, these actions help you follow the shopping funnel instead of judging performance from page views alone.

The table below shows common mappings. If you use the sales channel, verify the resulting GA4 events. If you use a custom pixel, your developer needs to implement the mappings and relevant event parameters.

Shopify customer eventGA4 recommended eventWhat it tells you
page_viewedpage_viewA visitor viewed a page.
product_viewedview_itemA shopper viewed a product.
product_added_to_cartadd_to_cartA shopper added a product to their cart.
checkout_startedbegin_checkoutA shopper entered checkout.
checkout_completedpurchaseA shopper completed a purchase.
Shopify GA4 ecommerce tracking funnel from product view to completed purchase
Ecommerce events follow shoppers from product view to purchase.

Mark key events (conversions) in GA4

GA4 now calls conversions “key events.” Open Admin > Events, or the corresponding area in the current interface, and confirm that purchase is marked as a key event. This gives your shopify google analytics reports a clear purchase outcome to evaluate.

Keep your first review focused. Product views and cart additions help explain behaviour, but they are not equivalent to completed orders. For shopify ga4 ecommerce tracking, verify purchase value and currency as well as the event name.

Read the funnel in GA4

Look for the Monetization or Ecommerce purchases report to review product and purchase activity. Use Explore to build a funnel exploration when you want to compare shopping steps. Report names and navigation may change over time.

Add consistent UTM parameters to campaign links so traffic sources remain understandable. Agree on naming conventions for source, medium, and campaign before sending newsletters or launching promotions.

For example, shopify google analytics might show many view_item and add_to_cart events but few begin_checkout events. Inspect your cart experience, shipping-cost information, and any distractions before checkout. The pattern suggests where to investigate; it does not prove one specific cause.

How to Test Your Shopify Google Analytics Setup

Test shopify google analytics before using it to make marketing decisions. A connected account is only the starting point; you need evidence that shopping actions reach the correct property.

  1. Open Realtime. In GA4, go to Reports > Realtime, then visit your store in another browser tab. Confirm that you are viewing the intended property.
  2. Check individual events. Open Admin > DebugView, or its current equivalent, and use a debug-enabled testing session to inspect event-level activity.
  3. Follow the shopping journey. View a product, add it to your cart, and start checkout. Check for the corresponding GA4 events.
  4. Complete a controlled purchase. Use a test payment method or bogus gateway in a development or test setup. Alternatively, place a small real order that you later refund or cancel.
  5. Inspect purchase details. Confirm that purchase arrives with the expected value and currency, and check that one completed order does not generate duplicate purchase events.

Avoid enabling a test payment setup on a live store while customers are shopping. Record which order you used for testing so you can recognise it when reviewing Shopify and GA4 afterwards.

Realtime is useful for quick checks, while standard reports can take 24–48 hours to fully populate. Do not repeatedly reinstall shopify google analytics during that waiting period. First check consent, blockers, your selected property, and whether the expected events appear in your testing tools.

Common Shopify Google Analytics Problems and How to Fix Them

Duplicate page views or doubled revenue

Two active installations can send the same activity twice. Audit your sales channel, custom pixels, theme code, and legacy scripts. Keep one intended shopify google analytics implementation, remove the redundant tracking carefully, and repeat a controlled visit and purchase test.

No purchase events

Possible causes include checkout or thank-you-page tracking that is not firing, declined consent, ad blockers, an incorrect Measurement ID, or a tag installed somewhere that cannot capture checkout completion. Seeing page views does not prove purchase tracking works.

Confirm the destination ID, inspect customer privacy settings, and test the full journey with your chosen installation method. If shopify google analytics depends on an old theme-only or checkout-script approach, review whether it needs replacing with the sales channel or a correctly implemented custom pixel.

GA4 revenue differs from Shopify

Revenue differences can come from definitions, attribution, returns and refunds, taxes, shipping, time zones, currency, consent, and browser blockers. Compare the same dates and understand which amounts each report includes before assuming tracking is broken.

Use Shopify as your source of truth for money and shopify google analytics for behaviour and trends. In particular, do not assume that a refund recorded in Shopify automatically changes GA4 revenue unless your implementation sends the relevant refund information.

Your own visits and staff orders inflate data

Staff browsing and test orders can distort a small store’s activity. Review GA4’s internal traffic settings and data filters; labels may vary. Define internal traffic carefully and test the filter before activating it so you do not accidentally exclude genuine customers.

Payment gateways appear as referral traffic

A payment provider or another third-party domain may appear as a referral when shoppers return to your store. Review the web data stream’s tag settings and its unwanted-referrals configuration. Add only the relevant domains after confirming they are interrupting attribution; do not exclude legitimate referral partners.

Data is not showing

Check that you opened the correct property and date range, then verify your stream, time zone, and currency settings. Allow for processing and inspect whether your consent banner blocks analytics until consent is given.

For google analytics 4 shopify troubleshooting, change one thing at a time and retest. Replacing several settings together makes it harder to identify the actual cause of missing shopify google analytics data.

What Google Analytics Will Not Tell You About Returns and Exchanges

Even a reliable shopify google analytics setup does not explain why an item comes back. GA4 shows how shoppers arrive and buy; return reasons and return-rate data help you understand what happens after the sale.

Yanet Returns & Exchanges is a Shopify app with a customer-facing Return Portal and a merchant dashboard for managing return and exchange requests. If you are planning that workflow, start with our guide to setting up a self-service returns page.

You can create return and exchange policies and rules, then define the reasons customers select under Settings > Reasons. A consistent reason list makes it easier to review recurring issues instead of interpreting a different explanation for every request.

Adding a return or exchange reason in Yanet Returns & Exchanges settings to complement shopify google analytics data
Reason lists give you the “why” that GA4 cannot show.

The Analytics section in Yanet Returns & Exchanges helps monitor return activity, exchange activity, request trends, and return rates. It can also help identify products or reasons associated with frequent returns. Analytics is available on the Ultimate plan.

Yanet Returns & Exchanges analytics screen for reviewing return and exchange requests by date range
Review return and exchange activity next to your GA4 reports.

Use a simple routine to review shopify google analytics alongside those returns insights. This is a side-by-side review, not a claim of a Google Analytics integration:

  1. Check GA4 acquisition reports for channels bringing purchases and review the products shoppers buy.
  2. Review which products have frequent returns and which reasons customers select.
  3. Investigate product descriptions, sizing information, expectations, and return policies where relevant.
  4. Review the patterns again after making changes.

This broader view helps you question whether strong sales translate into profitable orders, without treating revenue alone as the answer. Avoid assuming a particular channel caused returns unless your records support that conclusion.

Yanet’s Free plan includes 6 requests per month; Professional includes 80 requests per month plus extra requests; Ultimate includes unlimited requests. Always check the Plans page in Shopify admin for current pricing.

Conclusion

A dependable shopify google analytics setup starts with the correct GA4 property and web data stream. Connect through Google & YouTube or a developer-managed custom pixel, avoid duplicate tags, and verify the shopping journey through purchase.

Keep shopify ga4 ecommerce tracking useful by checking event details, investigating missing data methodically, and allowing reports time to populate. Use Shopify for financial totals and GA4 for acquisition and behavioural trends rather than expecting identical numbers.

Then review returns alongside your acquisition and product data. Try Yanet Returns & Exchanges to collect return reasons and, with Ultimate’s Analytics, review return rates next to your GA4 findings in your reporting routine. Read the Yanet Returns & Exchanges app breakdown to decide whether it fits your workflow.

FAQ

Is Google Analytics free for Shopify stores?

The standard version of Google Analytics is free to use. You do not need to change your Shopify plan simply to use standard GA4. However, access to some reports inside Shopify depends on your Shopify plan. Treat the two reporting systems separately when checking which reports and capabilities are available to your store.

Do I need the Google & YouTube app to use Google Analytics on Shopify?

No. You can connect google analytics to shopify through a custom pixel instead. That approach requires subscribing to Shopify customer events and sending the appropriate events and parameters to GA4. For most non-technical merchants, Google & YouTube is the simpler route because it handles ecommerce event sending without a custom JavaScript implementation.

Why don’t my Shopify and GA4 numbers match?

The systems use different definitions, attribution methods, and tracking rules. Consent choices, ad blockers, time zones, currencies, taxes, shipping, and refund handling can also affect comparisons. Match your reporting dates and settings before investigating further. Use Shopify as the source of truth for financial totals and GA4 to understand acquisition, shopping behaviour, and trends.

How long does it take for GA4 data to appear?

Realtime provides a fast way to check incoming activity, while standard reports can take 24–48 hours to fully populate. DebugView helps inspect events during a debug-enabled test session. If activity is missing, check the selected property, Measurement ID, consent settings, and browser blockers before reinstalling your tracking or adding another tag.

← Alle artikelen