To learn how to set up Google Analytics for a Shopify store, connect a Google Analytics 4 property through Shopify’s Google & YouTube app, then confirm the tag is collecting visits and purchase activity. This is the simplest route. How to set up Google Analytics for a Shopify store has changed since Universal Analytics was retired, so make sure you are using GA4 rather than an old tracking-ID tutorial.
Google Analytics helps you see where visitors came from, what pages they viewed, and whether sessions lead to checkout or purchase events. It will not fix weak traffic or an unclear offer. It gives you evidence to work with.
What you need before setup
You need an active Shopify store, access to its Shopify admin, and a Google account you can use for the business. Keep access organized. If an agency, employee, or partner owns the only Google account, you may lose access to years of reporting later.
You also need a GA4 property. A property is the container in Google Analytics that receives your website data. Create one under the Google account that should retain control of the store, using your business name and the correct reporting time zone and currency.
Before changing anything, check whether analytics is already installed. Look in Shopify admin for the Google & YouTube sales channel or app, review your customer events and pixels area, and inspect any apps that mention Google tags. Duplicate tags create misleading page views, conversions, and revenue numbers.
How to set up Google Analytics for a Shopify store
- Create or open your GA4 property. Sign in to Google Analytics and use the Admin area to create a property if you do not already have one. Select the business time zone and currency carefully. These settings affect how reports group dates and revenue.
- Install the Google & YouTube app in Shopify. In Shopify admin, open the Shopify App Store and install Shopify’s Google & YouTube channel if it is not present. Follow the prompts to connect the Google account that owns the GA4 property.
- Connect Google Analytics. Open the Google & YouTube app in Shopify, find its settings or Google Analytics section, and choose the relevant GA4 property. The labels can change as Shopify updates the app. Select the matching website data stream when Shopify asks.
- Save and allow the connection to publish. Shopify should place its supported Google tag or pixel connection for your storefront. Do not paste a second Google tag into your theme code while this connection is active. One implementation is usually enough.
- Visit the storefront yourself. Use a private browser window, accept analytics cookies if your consent banner asks, then view a product and start checkout without placing an unnecessary test order. Wait a few minutes, then check GA4 Realtime.
Start with the supported integration. Manual theme edits can look tempting because many older videos recommend them, yet Shopify checkout and privacy controls make a copied script less reliable than they once were.
Verify the connection before trusting reports
Open GA4 and go to Reports, then Realtime. You should see at least one active user after your test visit. Small delays happen. If nothing appears after a reasonable wait, revisit the Google & YouTube connection and confirm you selected the intended property.
Use Google’s Tag Assistant browser extension only as a diagnostic aid, not as proof that every order event is correct. A tag can load while consent settings block measurement, or while a second tag sends duplicated page views. Check the actual reports too.
| Check | What to look for | If it fails |
|---|---|---|
| Realtime visit | Your test session appears after visiting the store | Confirm the connected GA4 property and cookie consent settings |
| Page views | Pages such as product pages appear in reports over time | Look for duplicate or conflicting theme scripts |
| Purchase data | Orders appear only after real or approved test transactions | Review the Shopify integration and compare against Shopify orders |
Do not judge the setup from a single afternoon. Standard GA4 reports can take longer to populate than Realtime, and low-traffic stores naturally show small, uneven samples.
Set privacy and consent rules first
Analytics data is tied to privacy obligations, especially when you sell to visitors in regions with consent requirements. Check Shopify’s customer privacy settings and configure a consent banner that matches the places where you operate and sell. Rules vary by region.
Do not assume analytics is anonymous in every practical sense. Your cookie notice, privacy policy, data-retention choices, and vendor settings should accurately describe the tools you use. If you are unsure about your obligations, get advice from a qualified privacy or legal professional.
A common beginner mistake is testing in a browser that has declined tracking consent, then assuming the installation failed. Test both the banner behavior and the reporting behavior. Write down what you accepted during the test.
Reports to use in your first month
Begin with Acquisition reports to compare traffic sources such as unpaid search, email, paid ads, or social referrals. Then review Landing page data to see which pages bring visitors in. Keep it simple.
For a practical example, imagine a product page receives 120 sessions in a week and five people reach checkout. That does not prove the page is good or bad by itself, because traffic quality, price, shipping, and stock all affect the result. It does tell you where to investigate next.
Compare Google Analytics with Shopify’s own reports rather than expecting an exact match. Different systems use different attribution windows, consent rules, time zones, bot filtering, and definitions for sessions or sales. Directional consistency matters more than a perfect one-to-one total.
Common setup mistakes
The biggest problem is duplicate tracking. It often happens when a store has the Google & YouTube app connected, an old GA script in theme code, and an app adding another tag. Remove old code only after checking what it does and saving a theme backup.
Another issue is connecting the wrong Google account or property. Names can be confusing. Verify the property ID, website stream, currency, and time zone before running campaigns or sharing reports with anyone else.
Finally, avoid making store decisions after a handful of visits. Wait for enough relevant traffic to spot patterns, then change one meaningful variable at a time, such as product photography, shipping copy, or the first section of a landing page.
Frequently asked questions
Do I need a separate GA4 property for each Shopify store?
Usually, yes. Separate stores are easier to analyze when each has its own GA4 property and website data stream. Keep ownership under the same business-controlled Google account when appropriate.
Can I add Google Analytics code directly to my Shopify theme?
You can find older instructions for that approach, but it can cause duplicate data or incomplete checkout measurement when a supported app integration is already active. Use one method. Check Shopify’s current documentation before adding custom code.
Why do Shopify and Google Analytics show different sales totals?
Different attribution and consent rules are normal. Shopify order reports are generally the operational source for fulfilled orders, while GA4 helps you understand traffic paths and marketing performance.
How long does Google Analytics take to show data?
Realtime data may appear within minutes after a valid test visit. Other reports can take longer. Give the setup time before concluding it is broken.
Related posts
This article is for general informational and educational purposes only and is not financial, tax, or legal advice. Any income examples are illustrative, not typical or guaranteed — results vary widely by effort, time, niche, and platform changes, and we do not guarantee you will earn any income. Always do your own research and consult a qualified professional before making financial decisions.
Disclosure: This post may contain affiliate links. If you click through and make a purchase, we may earn a commission at no extra cost to you. We only recommend tools we’ve researched or genuinely believe in.