moralab
Store foundations

How to set up Google Analytics 4 on Shopify

To set up Google Analytics 4 on Shopify, create or choose a GA4 property and web data stream, then connect it through Shopify's Google & YouTube channel. Check that visits and shopping events reach the intended property before relying on the reports.

By the MoraLab team · Updated · 2 min read

Before you begin

You need access to the Shopify store and permission to configure the relevant Google Analytics property. Keep the accounts under the business's control rather than an employee's private login.

Check sales channels, customer pixels, the theme and any GTM container for existing Analytics tracking. Record which GA4 property receives data. Do not remove a setup until you know what it measures. These steps follow the documentation; you still need to test them in your own store.

1. Choose the property and web stream

In Google Analytics, use Admin to create a property if the store does not already have one. Choose the timezone and currency you use for reporting. Then add a Web data stream for the store's public address.

Write down the property name and the stream's G- measurement ID. If several properties have similar names, use the ID to confirm the destination. Avoid creating another property just because you cannot find the existing one; ask the account owner first.

Source: Google: Set up Analytics

2. Connect Google & YouTube

Open the Google & YouTube sales channel in Shopify, installing it if needed. Follow its Google Analytics connection flow and select the intended Google account and GA4 property. Confirm that the destination matches the web stream you recorded.

Shopify links to Google's current setup instructions from its help page below. Merchant Center is not required just to complete GA4 setup. Do not add a second GA4 tag to the theme as an extra precaution.

Source: Shopify: Set up Google Analytics 4

3. Check the shopping journey

Visit the public store in a separate browser session and make a deliberate consent choice. In GA4 Realtime, check for your visit. If the store is still password-protected, follow Shopify's guidance before expecting Analytics events.

Then view a product, add it to the cart and complete an agreed test order. Inspect the events available in your setup, including purchase. Check the order identifier, currency, value and items. Realtime lets you check that events are arriving. You will still need to compare purchase values with your order records.

Sources: Google: Realtime report; Google: Recommended events

4. Resolve gaps before using the reports

If no activity arrives, check the selected property, connection, consent state and browser blocking. If page views arrive but purchases do not, inspect the checkout journey and the integration rather than repeatedly reinstalling the page tag.

If purchases appear twice, look for overlapping channel, pixel, app or GTM tracking. Agree who maintains each integration. Recheck consent choices and the purchase journey after changing the theme or tracking configuration.

Source: Google: Set up consent mode

Frequently asked questions

Do I need GTM for this Shopify setup?

No. The standard connection described here uses Google & YouTube. Use a separate GTM implementation only when there is a specific requirement and someone maintains it.

Should GA4 revenue exactly match Shopify?

Do not assume it will. First verify event values and duplicates, then compare the same period and definitions. Orders, refunds, consent and attribution can make reports differ.

Sources

  1. Google: Set up Analytics
  2. Shopify: Set up Google Analytics 4
  3. Google: Realtime report
  4. Google: Recommended events
  5. Google: Set up consent mode

Sources checked 15 November 2026. Figures are reported as the publishers state them; where sources disagree, the article says so.

Better product pages, without rewriting every one by hand.

Book a 30-minute demo. We'll look at your store together and show how MoraLab helps you improve product descriptions, images and SEO.

Book a demo