Google Analytics 4
Shopify Setup Guide
If you are running a Shopify store without Google Analytics, you are flying blind. You might know your revenue numbers, but you have no idea where your traffic comes from, which pages keep people engaged, or where visitors drop off before buying. Google Analytics 4 fixes that. Here is exactly how to set it up, what to track, and how to turn data into decisions.
GA4: What It Is and Why Universal Analytics Is Gone
If you have used Google Analytics before, you probably remember Universal Analytics. It was the standard for over a decade. But Google officially sunset Universal Analytics in July 2023, and all historical data from UA properties stopped being accessible in mid-2024. Universal Analytics is dead. There is no going back to it.
Google Analytics 4 (GA4) is the replacement, and it works fundamentally differently. Instead of tracking pageviews as the core measurement, GA4 is built on an event-based model. Every interaction a user takes, whether it is viewing a page, clicking a button, completing a purchase, or scrolling down the page, is recorded as an event.
This matters for Shopify store owners because GA4 gives you a much richer picture of how customers interact with your store. You can see the full journey from first visit to purchase, understand which touchpoints matter most, and identify exactly where people get stuck.
The learning curve is real. GA4 looks and feels different from Universal Analytics, and some features moved to new locations. But once you understand the basics, it is significantly more powerful for e-commerce.
Step-by-Step: Setting Up GA4 on Shopify
There are two main ways to connect Google Analytics to your Shopify store. The first is through Shopify's built-in preferences. The second is through the Google channel app. Both work, but they have different strengths.
Step 1: Create Your GA4 Property
Start by going to analytics.google.com. If you do not have a Google Analytics account yet, create one. Then click "Admin" in the bottom left, and select "Create Property."
- Name your property (your store name works fine)
- Set your time zone and currency to match your Shopify settings
- Select "Web" as your platform
- Enter your Shopify store URL (your custom domain, not the myshopify.com one)
- Give your data stream a name like "Shopify Store"
Once created, you will see your Measurement ID. It starts with "G-" followed by a string of letters and numbers. Copy this. You will need it in the next step.
Step 2: Add the Measurement ID to Shopify
Option A: Shopify Preferences (simplest method)
In your Shopify admin, go to Online Store > Preferences. Scroll down to the Google Analytics section. Paste your GA4 Measurement ID (the G-XXXXXXXXXX code) into the field. Click Save. That is it.
This method is straightforward and works well for basic tracking. Shopify automatically adds the GA4 tracking code to every page of your store.
Option B: Google & YouTube Channel App (recommended)
For more robust tracking, install the free Google & YouTube channel app from the Shopify App Store. This app connects your Shopify store directly to your Google account and handles the GA4 integration automatically.
- Go to Apps in your Shopify admin and search for "Google & YouTube"
- Install the app and connect your Google account
- Link your GA4 property during setup
- The app will automatically configure enhanced e-commerce tracking
The advantage of the channel app is that it handles e-commerce event tracking out of the box. Purchase events, add-to-cart events, and checkout steps are all configured automatically. With the manual method, you may need additional setup to get these working.
Important: Do not use both methods at the same time. Pick one. Using both will result in double-counted data, which will make all your reports inaccurate.
Step 3: Verify That It Is Working
After setup, open your store in a browser and then check GA4's Realtime report (Reports > Realtime). You should see at least one active user, which is you. Click around your store, add a product to your cart, and watch the events appear in real time.
If nothing shows up after a few minutes, check the following:
- Make sure you entered the correct Measurement ID
- Disable any ad blockers, as they can prevent Google Analytics from loading
- Check that you are not visiting your myshopify.com URL (use your custom domain instead)
- Clear your browser cache and try again
You can also use the Google Tag Assistant Chrome extension. It will tell you whether your GA4 tag is firing correctly and flag any errors.
Key Reports Every Shopify Owner Should Monitor
Having Google Analytics installed is only useful if you actually look at the data. Here are the reports that matter most for e-commerce.
Traffic Sources (Acquisition Reports)
Go to Reports > Acquisition > Traffic Acquisition. This tells you where your visitors come from: organic search, paid ads, social media, direct traffic, email campaigns, or referral links. Understanding your traffic mix helps you know which marketing channels are actually working and where to invest more.
Pay attention to the conversion rate by source. You might get tons of traffic from social media but find that organic search visitors convert at three times the rate. That changes how you allocate your budget.
Top Pages (Engagement Reports)
Under Reports > Engagement > Pages and Screens, you can see which pages get the most views, the highest engagement time, and the best conversion rates. This is gold for optimization. If your best-selling product page has a high bounce rate, something on that page needs fixing. If a blog post drives tons of traffic but nobody clicks through to products, you need better internal linking or CTAs.
Conversion Funnel
GA4 lets you build custom funnels that show exactly where people drop off in the buying process. A basic e-commerce funnel looks like this: Product View > Add to Cart > Begin Checkout > Purchase. If 1,000 people view a product, 200 add it to their cart, 80 begin checkout, and 40 purchase, your biggest drop-off is between product view and add to cart. That tells you to focus on your product pages first.
Audience Demographics
Under Reports > Demographics, you can see the age, gender, location, and interests of your visitors. This helps you confirm whether you are reaching the right audience. If you sell premium skincare targeting women aged 25 to 40 but most of your traffic is from men aged 18 to 24, your targeting needs work.
Setting Up E-commerce Tracking
If you used the Google & YouTube channel app, basic e-commerce tracking is already configured. But it is worth verifying that the following events are being captured:
- view_item: When someone views a product page
- add_to_cart: When a product is added to the cart
- begin_checkout: When the checkout process starts
- purchase: When a transaction is completed
- view_item_list: When someone views a collection or product list
To see your e-commerce data, go to Reports > Monetization > E-commerce Purchases. This shows revenue, items purchased, item views, add-to-cart rates, and purchase rates for every product. You can also see which products are frequently viewed but rarely purchased, a clear signal that the product page or pricing needs attention.
If these events are not showing up, you may need to enable Enhanced Measurement in your GA4 data stream settings. Go to Admin > Data Streams > select your stream > Enhanced Measurement, and make sure the relevant toggles are turned on.
Custom Events: Tracking What Matters to You
GA4 tracks many events automatically, but you might want to track specific interactions that are unique to your store. Common custom events for Shopify include:
- Newsletter signup completions
- Discount code usage
- Wishlist additions
- Product review submissions
- Size guide opens
- Video plays on product pages
You can create custom events directly in GA4 under Admin > Events > Create Event. For simple events like button clicks, you can often set these up without any code. For more complex tracking, you will need to either edit your theme code or use Google Tag Manager.
Google Tag Manager: The Power User Alternative
Google Tag Manager (GTM) is a free tool that sits between your website and your tracking tools. Instead of adding tracking codes directly to your Shopify theme, you add the GTM container code once and then manage all your tags (Google Analytics, Facebook Pixel, Google Ads, etc.) from the GTM dashboard.
Why consider GTM for your Shopify store:
- Centralized control: Manage all tracking pixels from one place
- No code changes needed: Add or modify tracking without touching your theme files
- Advanced tracking: Set up scroll depth tracking, form submissions, and custom click events without a developer
- Version control: Roll back changes if something breaks
- Preview mode: Test your tags before they go live
The downside is complexity. GTM has a steeper learning curve than the basic Shopify integration, and getting e-commerce data layer events to work properly with Shopify requires some technical setup. For most store owners, the Google & YouTube channel app is the better starting point. Move to GTM once you outgrow the basics or need to manage multiple tracking tools.
Common Setup Mistakes (and How to Avoid Them)
After helping merchants set up analytics, these are the mistakes that come up again and again:
- Double tracking: Installing GA4 through both Shopify Preferences and the Google channel app at the same time. This inflates all your numbers. Pick one method.
- Not filtering internal traffic: Your own visits skew the data. In GA4, go to Admin > Data Streams > Configure Tag Settings > Define Internal Traffic, and add your IP address.
- Ignoring referral exclusions: Payment gateways like PayPal redirect customers away from your site and back. Without referral exclusions, GA4 counts PayPal as a traffic source and loses the original attribution. Add your payment provider domains to the referral exclusion list.
- Not enabling Google Signals: Google Signals allows cross-device tracking and unlocks demographic data. Go to Admin > Data Settings > Data Collection and turn it on.
- Forgetting to set up conversions: In GA4, you need to manually mark events as conversions (now called Key Events). Go to Admin > Events, find the "purchase" event, and toggle it as a key event.
- Using the myshopify.com URL: Your data stream should use your custom domain. Tracking on the myshopify.com domain creates a mess of cross-domain issues.
GA4 vs. Shopify Analytics: Do You Need Both?
Shopify has its own built-in analytics dashboard. It shows sales data, sessions, conversion rates, top products, and traffic sources. So why bother with Google Analytics at all?
The short answer: they serve different purposes, and yes, you should use both.
Shopify Analytics excels at:
- Real-time sales and revenue tracking
- Product-level performance data
- Order and inventory insights
- Simple, easy-to-read dashboards
- Financial reports for accounting
GA4 excels at:
- Detailed traffic source analysis and attribution
- User behavior and engagement patterns
- Custom funnel analysis
- Audience segmentation and demographics
- Cross-channel marketing performance
- Custom event tracking
- Integration with Google Ads for campaign optimization
Think of Shopify Analytics as your cash register receipt. It tells you what sold and how much you made. GA4 is your security camera and customer research team combined. It tells you how people found you, what they did on your site, and why they did or did not buy.
One important note on data discrepancies: Shopify and GA4 will almost never show exactly the same numbers. This is normal. They use different tracking methods, handle sessions differently, and count conversions on different timelines. Do not waste time trying to make them match perfectly. Use Shopify for revenue truth and GA4 for behavioral insights.
Quick Setup Checklist
- Create GA4 property with correct time zone and currency
- Add Measurement ID via one method only (Preferences or Google channel app)
- Verify tracking with Realtime report
- Filter out internal traffic
- Enable Google Signals for cross-device tracking
- Add referral exclusions for payment gateways
- Mark "purchase" as a key event
- Confirm e-commerce events are firing
Analytics Tell You What to Fix. Clyro Helps You Fix It Fast.
Setting up Google Analytics is the first step. It shows you what is happening in your store: which pages underperform, where visitors drop off, and what your customers actually want. But data alone does not grow your business. You need to act on it.
That is where Clyro comes in. When your analytics reveal that a product page has a high bounce rate or a collection page is not converting, you can use Clyro to make AI-powered design changes to your Shopify theme in minutes. No developer needed. No waiting days for updates. Just describe the change you want, and Clyro handles the rest.
Try Clyro and turn your analytics insights into real improvements, fast.
Clyro Team
E-commerce & AI Insights