Understanding customer behavior is crucial for an e-commerce business. Shopify store owners can optimize their marketing strategies by analyzing store performance using a comprehensive analytics tool.
Google Analytics 4 (GA4) is a powerful tool from Google that can be integrated with your Shopify store to gain insights into your website traffic and optimize your store for higher sales. However, the GA4 integration process may seem complex and challenging to some store owners.
This blog guides you through the complete integration process and shows you how to fix common errors. No need to be an expert, just follow the simple steps and set up GA4 on Shopify.
First, let me introduce you to GA4. I’ll also explain why you need GA4, where Shopify has built-in analytics.
What is GA4?
Google Analytics 4, commonly known as GA4, is a web analytics tool that tracks and analyzes traffic behavior across different platforms and devices. It can track clicks, scrolls, purchases, sessions, and other actions when visitors come to your website or app.
GA4 replaced its predecessor, Universal Analytics (UA), on July 1, 2024. Most users lost their access to the historical Universal Analytics data, the interface, and the API after this date.
The Shift from Sessions to Events
Universal Analytics was a session-based tracking system, where GA4 introduced an event-based model.
What’s the difference?
In short, you get more precise data about your traffic behaviour with GA4. It focuses on what your customers do rather than who they are. Moreover, AI and machine learning help with predictive insights—even when data is limited.
On the contrary, Universal Analytics used to rely heavily on cookies and session-based tracking, which is not good enough to understand how your customers behave on your website.
Google Analytics 4, when integrated with your Shopify store, also helps you unify web and app data if you’re about to scale up digital operations.
Shopify Analytics vs GA4: Which One Is Better?
So many store owners ask me the exact question. “Which analytics should I use? Shopify built-in Analytics or the GA4”?

I tell them not to choose one over the other. Both analytics track data, that’s true, but they serve different purposes. And their purpose determines how to collect data and what data to collect.
Google Analytics is a web analytics tool that tracks user behavior across the website, measures marketing performance, and provides in-depth information on the customer journey on your website. With this tool, you can understand how visitors interact on your site, which marketing channel they come from, and which touchpoints on a page drive more conversions.
On the other hand, Shopify Analytics is a built-in tracking tool that comes with your store when you purchase a Shopify plan. It is designed to track e-commerce operations. Shopify Analytics focuses on sales, order management, and customer lifetime value.
Because it is directly integrated with the Shopify system, when a customer completes a purchase, Shopify Analytics knows it immediately and accurately tracks that data.
GA4 uses JavaScript-based tracking and cookies, so it depends on client-side code that runs directly on users’ browsers. This is great for tracking user behavior, but ad blockers or strict privacy settings can block it.
Shopify Analytics combines server-side data with client-side events. It has more access to transaction data but provides less visibility into broader customer behavior.
When to Trust Shopify Analytics
Shopify Analytics records a purchase immediately from its own server-side data. So it is your source of truth when calculating sales and managing orders. The main strength of Shopify Analytics is that it records every piece of data precisely related to orders, shopping, taxes, etc.
I recommend using Shopify Analytics for financial assessments, like revenue reports, order counting, inventory management, and net profit calculation.
When GA4 is More Reliable
Google Analytics 4 is best used in planning and executing marketing strategies. It tells you where your customers come from, how they interact in your store, why they leave, and what triggers them to purchase.
All these marketing insights help you understand which of your marketing plans are working and how you can get more traffic to your store, driving more sales.
How to Install Google Analytics on Shopify
To gather marketing data using Google Analytics, you need to set up GA4 on Shopify, as this is a third-party tool developed by Google.
There are different methods to install GA4 on a Shopify store. In this tutorial, I’ll show you the easiest way that a store owner without technical expertise can follow.
The step-by-step installation guide here will show how to set up GA4 without any hiccups:
Step 1: Create a Google account and a Google Analytics account
You need to create a Google Analytics account before using it. To create a Google Analytics account, you need a Google account first. You can use an existing Google account if you have one, of course. But here I’m going to show the whole process from the scrach.
Create a Google account
1. Go to accounts.google.com
2. Click on “Create account”

3. Choose your account purpose from “For my personal use”, “For my child,” or “For work or my business.”
4. Give the required personal information it requires to open an account, get a desired email ID ([email protected]), and set a password

5. You may need to verify your identity with an active phone or phone number.
6. Accept Google terms and conditions
7. Congratulations! You’ve created your Google account.
Now, it’s time to create a Google Analytics account.
Create a Google Analytics account
1. Go to analytics.google.com
2. Click on “Start measuring”

3. It’ll take you to the Google Analytics account creation page
4. Complete the required fields and click “Next”

5. It’ll take you to the second step to create a property
Step 2: Create or move a GA4 Property
To set up GA4 on Shopify, you either need to create a new Google Analytics 4 property or move an existing one you created earlier.
On GA4, a property is a digital entity that you want to track with your Google Analytics account.
For example, you have two separate Shopify stores, a blog site, and a mobile app. You want all three websites and the mobile app to be tracked with your GA4 account. So, you have to create or add four distinct GA4 properties.
A single GA4 account can have up to 2000 properties, and each property gets a unique tracking ID. This way, you collect data independently for each business without overlapping.
To create a GA4 property:
1. On the “Create a property” page, enter the property name. Set the time zone and currency, and then click “Next”.

2. Provide the required business details (industry and business size). Click “Next”
3. Select how you will use Google Analytics. You can select more than one objective here, but a maximum of two is recommended.
As you are more likely to use Shopify Analytics for sales reports besides GA4, I recommend selecting “Generate leads” and one from “Understand web and/or app traffic” and “View user engagement & retention” based on your data requirements.
4. Click on “Create”

5. Read and accept the Google Analytics Terms of Service Agreement
Step 3: Set up a data stream
In this step, you’ll add a website or app you want to collect the data from.
If you’re creating a new property and adding a new data source, you are on the “Start collecting data” page to add a web or app. However, you can add additional data sources by coming back to Data Streams and clicking Add streams.
We are continuing from Property creation here:
1. Click on “Web” to collect data from your Shopify store

2. This will take you to the “Set up data stream” page
3. Enter your store URL and name the data channel

Step 4: Add the GA4 tracking code (Google Tag) to your Shopify store
Next, you need to link your store to Google Analytics 4 with a tracking code, also known as Tags.
You’ll have three options to integrate the code into your website:
- Install manually
- Use Google Tag Manager
- Install with a CMS or website builder
To install the code manually, copy the tag and paste it into every page of your website, immediately after the <head> element. Add only one Google tag to each page.

As Shopify is a popular CMS, we’ll try to install the tag through Shopify CMS:
1. Choose the “Install with a CMS or website builder” option and click “Next”
2. Click on “Select your platform”. You’ll get a list to choose from for the platform your store is built on. Choose Shopify from the list. You can also scan with your store URL. All the necessary instructions to install the Tag on Shopify will be displayed along with your Tag ID. You can also continue following my instructions if you find them easier.

3. Go to your Shopify admin panel and search for the “Google & YouTube” app in the search bar. It’ll take you to the app in the Shopify App Store. You can also search for the app directly on the Shopify App Store.
4. Install the app
5. In app settings, click on “Connect Google account”

6. Connect the Google account you created at step 1 and complete the setup process. After connecting the Google account, you may need to complete some required Shopify store setup (contact information, shipping policies, terms of service, etc.) if you didn’t do that before.
7. Cross-match the Google tag ID and connect your Google Analytics property at the bottom of the setup page
8. Confirm your Google tags and click on “Complete setup”

Step 5: Verify if your GA4 setup is working
You’re done setting up GA4 on your Shopify store. Now, check if the setup is working properly:
1. Go back to Google Analytics and click on “Test installation” at the top right corner.

2. You’ll get a confirmation message at the bottom of the same page if the setup works properly.

3. Click on “Done” in the top right corner.
Common Shopify GA4 Tracking Problems (And Fixes)
Even though Google Analytics is a great metric to measure website performance, it may have some issues tracking data from your Shopify store.
It does not mean that there were some problems with the installation. Even after the perfect installation, I’ve seen GA4 misfire or generate incomplete data. In case you face similar issues, you need to identify the exact reason behind them and solve the problem at the root.
Here are some common issues you may experience:
Not tracking purchase events
GA4 is not as capable as Shopify Analytics in tracking purchases. I’ve explained that earlier. It may sometimes miss tracking some purchases, and it will make your reporting inaccurate and incomplete.
How to Fix:
Make sure you’re not using multiple GA4 tracking tools, like GTM and the native app from the app store. This may create conflict while tracking events.
Confirm that the purchase event fires only once on the “Thank You” page. Use the GA4 DebugView or GTM Preview to check for the issues.
Double tracking
The tool sometimes tracks duplicate events, causing inaccurate reports and discrepancies. For example, it may count a purchase twice and show that two items are sold.
How to fix:
Never combine automated tag setup with manual code installation. When installing code manually, make sure you paste the code carefully on every page only once.
Use the transaction_id parameter with every purchase to eliminate duplicate issues. It is also wise to cross-check GA4 sales counts with the Shopify built-in analytics count.
Product data missing
As GA4 collects product information from complete product metadata, incomplete data may cause GA4 to miss the data in reports.
How to fix:
First of all, include all product data when listing products on Shopify. If you use GTM, make sure data layer variables are mapped correctly for item_id, item_name, and price.
Check if the product feeds are working properly in Shopify native integration. Also, make sure the schema is clearly structured.
Event delays or inconsistencies
Some events may appear late in GA4, as it is a third-party tool. Besides, GA4 collects data from audience browsers. So, it may miss events because of strict browser settings and script blocking.
How to fix:
Server-side tracking is more reliable. Use server-side tracking for better results. Additionally, place critical GA4 tags carefully in the container.
Discrepancy between GA4 & Shopify Analytics
Discrepancy within a minimal level is normal and acceptable between GA4 and Shipify Analytics. We consider 5-10% as normal. Above that level indicates tracking issues.
How to fix:
Check if all important e-commerce events are firing to both tracking tools. Also, look for any checkout apps or third-party scripts that are blocking signals to GA4.
Final Thoughts
Google Analytics 4 and Shopify Analytics are both very powerful and professional tools. Each of them generates useful reports that help Shopify store owners make data-driven decisions.
Although the GA4 integration process may seem complex to some users, if you follow the steps I have shown here, it should not be difficult to set up GA4 on Shopify. Especially if you’re not a tech-savvy person, I would suggest you install the Google Tag using the Shopify app.
Use GTM or install Tag manually if you are confident and if you think it will give you more control over the tracking events. Anyone with basic expertise should be able to fix GA4 tracking issues; however, if you can’t solve the issues by yourself, contact an expert who will assist you with the fixation.
FAQs
01. Does Shopify use Google Analytics?
Answer: Shopify supports Google Analytics 4 to track store performance. You can install GA4 on your store and track user behavior, events, sales, and other similar actions.
There are multiple ways to install GA4 on Shopify. Create a Google Analytics account (it’s free) and insert Google Tag on your store by following one of the following techniques:
- Use the “Google & YouTube” app from the Shopify App Store
- Install using Google Tag Manager (GTM)
- Install manually
02. Does Shopify have built-in Analytics?
Answer: Yes, Shopify has a built-in Analytics that tracks sales and other e-commerce activities precisely. It is called Shopify Analytics.
You get the analytics pre-installed when you create a Shopify account and purchase a plan. Shopify’s analytics dashboard and reports help you understand your visitors, get insight into store performance, and learn how to optimize your store to increase sales and revenue.
However, Shopify’s built-in analytics is best for tracking transactional events rather than traffic behavior.
03. Is Shopify Analytics good?
Answer: Yes, Shopify Analytics is good enough for tracking sales, transactions, inventory, etc., to prepare financial reports and understand sales performance.
But Google Analytics is much better at tracking audience behavior and interactions on your site that help with marketing strategies and store optimization.
04. Why is GA4 not tracking my Shopify sales?
Answer: GA4 is not very reliable in tracking Shopify sales, even though you install it without any errors. Delays and data discrepancies with Shopify Analytics are common when you compare sales reports. 5-10% didcrepencies are generally acceptable.
If you see that GA4 is not tracking your sales at all or missing fires, check for errors in the Google Tag that you integrated with your store. Common issues behind missing sales events are:
- Using multiple integration tools, like GTM and the native Shopify app
- Errors in manual setup
- Ad blockers and strict privacy settings on the customer’s browser
- Closing the “Thank you” page too quickly by the customer
- Third-party checkouts
05. Can I track refunds in GA4?
Answer: You can track Shopify refunds in GA4, but it’s not available in the standard native installation. To track refunds, you have to use a custom API or a third-party tool.
06. How to track Shopify sales using ga4?
Answer: GA4 tracks Shopify sales automatically if you install the tracking code without any errors. However, there might be delays and data discrepancies when you track sales with GA4.
To decrease the discrepancy, make sure you use Google Tag on the “Thank you” page only once. I recommend using the “Google & YouTube” app from the Shopify App Store because it automatically sends purchase data, revenue, and product information to GA4.





