How to Link Shopify to Google Analytics
Connecting your Shopify store to Google Analytics is one of the most important first steps for understanding how customers find and interact with your site. It transforms your store from a simple online space into a powerful source of data you can use to make smarter business decisions. This article will guide you step-by-step through the process, skipping the technical jargon and getting you up and running in minutes.
Why Bother Connecting Shopify to Google Analytics?
Your Shopify dashboard gives you some great top-level sales data, but Google Analytics (GA) answers the why and how behind those numbers. It’s like having a detailed map of your customer's entire journey.
Here’s a quick look at what you can uncover:
- Full Customer Journey: See exactly where your visitors are coming from. Is it a Facebook ad, an Instagram story, a blog post, or a Google search? GA tells you which channels are driving not just traffic, but actual sales.
- User Behavior Insights: Discover which pages are most popular, how long people stay on your site, and where they drop off. Are customers abandoning their carts at a specific step in the checkout process? GA helps you spot these critical friction points.
- Marketing Campaign Performance: Measure the true return on investment (ROI) for your advertising campaigns. You can see directly how many sales a specific Google or Facebook ad campaign generated, helping you decide where to allocate your budget.
- E-commerce Intelligence: Identify your best-selling products, understand your average purchase value, and track conversion rates across different devices and locations. You can answer questions like, "Do mobile visitors buy more or less than desktop visitors?"
Essentially, leaving Google Analytics disconnected from Shopify is like flying blind. You might be making sales, but you're missing out on the rich data that tells you what's working, what isn't, and how to grow faster.
Before You Begin: What You'll Need
Getting set up is straightforward and only takes two things:
- An active Shopify store.
- A Google Analytics 4 property.
If you used Google Analytics in the past, you were likely familiar with Universal Analytics (UA). As of July 2023, Google has fully phased out UA in favor of the newer, more powerful Google Analytics 4. All new setups will use GA4, and this guide is built exclusively for that version.
Don't have a GA4 property yet? No problem. Let’s create one right now.
Part 1: How to Set Up a Google Analytics 4 Property
If you already have a GA4 account and your "G-" Measurement ID, you can skip to Part 2. If you're starting from scratch, follow these simple steps:
- Go to the Google Analytics Website: Go to analytics.google.com and sign in with your Google account. This should be an account you want permanently associated with your business.
- Create an Account: If this is your first time, you'll be prompted to create an account. Click Start measuring. Give your Account a name - typically your business name.
- Create a Property: Next, you'll create a "Property." Your website lives under this property.
- Enter Business Details: Fill out the brief questions about your industry and business size. This helps Google customize your reporting experience.
- Create a Data Stream: A data stream is simply the source of your data. Since you have a website, you’ll choose "Web".
- Find Your Measurement ID: Once you create the stream, you'll see a “Web stream details” page. In the top-right corner, you’ll find your Measurement ID. It will look like this: G-XXXXXX. This is the golden ticket. Copy it and keep it handy for the next part.
Part 2: Connecting Shopify to Google Analytics (The Right Way)
Shopify used to recommend manually pasting the GA code, but their system has improved. The official and most effective method now is using the "Google & YouTube" channel directly within Shopify. This integration ensures that critical e-commerce events (like add_to_cart and purchase) are tracked properly.
Here’s how to do it:
- Log in to your Shopify Admin.
- Navigate to the App Store: From the left-hand menu, click on Add apps. In the search bar, type "Google & YouTube" and select it.
- Install the Channel: Click Add app and then Add sales channel to install it on your store.
- Start the Setup Process: Inside the Google & YouTube channel, you’ll see several setup steps. Look for the "Get started" button in the "Google Analytics" section.
- Connect Your Google Account: Click to connect the Google account where you just created your GA4 property. Grant the necessary permissions when prompted.
- Select Your GA4 Property: After connecting, Shopify will display a dropdown list of your available Google Analytics properties. Choose the GA4 property you just created. You’ll be able to identify it by the Measurement ID ("G-" ID) that you copied earlier.
- Confirm and Finish: Confirm your selection. That's it! Shopify will now automatically add the necessary tracking code to all pages of your store, including your checkout pages.
This "Google & YouTube" method is superior because it automatically configures enhanced e-commerce tracking, which is absolutely vital for an online store.
A Quick Note on Manual Installation
Some older guides tell you to go to Online Store > Preferences and paste your Measurement ID into a box. While this works for basic pageview tracking, it’s no longer the recommended method and may cause issues with full e-commerce event tracking. Stick with the Google & YouTube channel integration to avoid headaches later.
Part 3: How to Verify the Connection is Working
Don't just set it and forget it! A quick 2-minute check can confirm everything is working as expected.
- Open Google Analytics: Head back to your GA4 property.
- Go to the Realtime Report: On the left-hand navigation, go to Reports > Realtime.
- Visit Your Shopify Store: Open your live Shopify website in a new browser tab or on your phone. Click around to a few different pages (e.g., homepage, a product page, your about page).
- Check for Activity: Look at the Realtime report in Google Analytics. You should see yourself appear as a user on the map and see cards showing which pages you are viewing. The count of "Users in last 30 minutes" should be at least 1 (that's you!).
If you see activity, congratulations! You've successfully connected Shopify and Google Analytics. Keep in mind that while Realtime data shows up instantly, standard reports can take 24-48 hours to fully populate, so don't be alarmed if they look empty at first.
Part 4: What Should You Look at First?
Now that the data is flowing, where do you even start? Here are three simple reports to check out that will give you immediate, actionable insights.
1. Traffic Acquisition Report
This report tells you exactly how people are getting to your store.
- How to find it: In GA4, go to Reports > Acquisition > Traffic acquisition.
- What it shows: A breakdown of your traffic sources, such as Organic Search, Direct, Paid Social, Organic Social, and Referral. You can see how many users, sessions, and — most importantly — how much revenue each channel is driving.
- Why it matters: This helps you see which marketing efforts are paying off. Is your SEO work driving sales from Google? Is that new influencer collaboration bringing in valuable customers? This report holds the answer.
2. E-commerce Purchases Report (for Product Performance)
Want to know which products are a hit?
- How to find it: Go to Reports > Monetization > E-commerce purchases.
- What it shows: This page lists your products and shows key metrics like how many times each was viewed, added to the cart, and purchased.
- Why it matters: Use this data to identify your best sellers and potential underperformers. Maybe a product gets tons of views but few purchases — this could signal a need for pricing or product description improvements.
3. Pages and Screens Report
Understand how users are engaging with the content on your site.
- How to find it: Go to Reports > Engagement > Pages and screens.
- What it shows: A list of your most-viewed pages. You can see metrics like views, users, and average engagement time.
- Why it matters: Find your most popular pages outside of products — it could be a blog post, a sizing guide, or your return policy. This tells you what information your audience finds valuable, giving you great ideas for future content.
Final Thoughts
Connecting Shopify to Google Analytics transforms your raw store data into a clear story about your customers and your business. By following the steps above, you've unlocked the ability to understand your traffic, optimize your product listings, and make data-driven decisions that fuel real growth.
Of course, connecting your data sources is just the start. The real magic happens when you can easily surface insights without spending hours wrestling with complex reports. That's why we created Graphed. We connect directly to tools like Shopify and Google Analytics, combining your data into one clear view. You can then use simple, natural language to ask questions like, "Show me which Facebook ad campaigns drove the most Shopify sales last month" and instantly get a shareable dashboard. No deep technical knowledge required, just the curiosity to find out what moves the needle for your business.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?