How to Connect Google Analytics to Shopify

Cody Schneider8 min read

Shopify's built-in analytics are great for a top-level look at your sales, but to truly understand how shoppers discover and interact with your store, you need Google Analytics. This powerful, free tool unlocks deeper insights into customer behavior that are essential for growing your business. This guide will give you step-by-step instructions to connect Google Analytics 4 to your Shopify store and explain what to do once you're set up.

Why Bother with Google Analytics When You Have Shopify Analytics?

You might be wondering why you need another analytics tool when Shopify already gives you a dashboard. While Shopify Analytics is perfect for tracking sales, orders, and conversion rates, it only tells part of the story. Google Analytics fills in the crucial gaps.

Think of it this way:

  • Shopify Analytics tells you what happened. (e.g., You made 50 sales yesterday).
  • Google Analytics tells you why it happened. (e.g., Those 50 sales came from a specific blog post, an email campaign, and an Instagram ad, and those customers all live in California and viewed your 'About Us' page before buying).

Here’s what you can do with Google Analytics that’s difficult or impossible with Shopify Analytics alone:

  • Track the Full Customer Journey: See which pages customers visit before making a purchase, how long they stay on your site, and where they tend to leave.
  • Understand Your Marketing Channels: Get crystal-clear data on which channels (organic search, social media, paid ads, email) are actually driving traffic and revenue.
  • Analyze User Behavior: Learn about your visitors' demographics (age, gender), interests, and what devices they use to shop.
  • Create Sophisticated Funnel Reports: Pinpoint exactly where shoppers are dropping off in your checkout process, from a product page view all the way to the final thank you page.
  • Set Up Custom Event Tracking: Track specific actions like video plays, newsletter signups, or button clicks to measure engagement beyond purchases.

Getting Prepared: What You'll Need First

Before you dive in, make sure you have these two things ready. The setup process is quick, but having these in hand makes it even smoother.

  1. A Shopify Store: You'll need admin access to your Shopify dashboard to install apps and edit settings.
  2. A Google Account and GA4 Property: You need a standard Google account (like a Gmail account). If you don't already have a Google Analytics 4 property set up for your store, you'll need to create one.

Quick Steps to Create a New Google Analytics 4 Property

If you're brand new to Google Analytics, here's how to create a property in under two minutes:

  1. Go to the Google Analytics website and log in with your Google account.
  2. Click on "Admin" (the gear icon) in the bottom-left corner.
  3. In the "Property" column, click "Create Property".
  4. Give your property a name (e.g., "My Online Store"), select your reporting time zone and currency, and click "Next".
  5. Answer the brief business information questions and click "Create".
  6. For "Choose a platform," select "Web".
  7. Enter your Shopify store's URL (e.g., your-store.myshopify.com) and a "Stream name" (e.g., "My Shopify Store"). Click "Create stream".

That's it! A page will pop up with your stream details. Keep this page open, as you'll need the "Measurement ID" from it in the next section.

The Easiest Method: Using Shopify’s Google & YouTube App

Shopify has made this process incredibly simple with its official "Google & YouTube" app. It handles all the backend coding for you, ensuring that an enhanced set of e-commerce events are tracked automatically. Avoid any tutorials that tell you to paste code directly into your theme's theme.liquid file - that's an older method that's less reliable and can break.

Step 1: Get Your GA4 Measurement ID

Your Measurement ID is the unique identifier that tells Shopify where to send your store's data. It always starts with "G-".

If you just created a new property, it’s displayed on the "Web stream details" page. If you're navigating back to an existing property:

  1. Go to Google Analytics and click "Admin".
  2. Make sure your desired account and GA4 property are selected.
  3. In the "Property" column, click on "Data Streams" and then select your web stream (the one for your store).
  4. Your Measurement ID is in the top-right corner. Copy it to your clipboard.

Step 2: Add the Google & YouTube App in Shopify

  1. Head over to your Shopify admin dashboard.
  2. On the left-hand navigation menu, go to "Apps" and click "All recommended apps". From there go to the Shopify App Store.
  3. Search for "Google & YouTube".
  4. Click on the app (it is developed by Shopify) and then click "Add app".
  5. You'll be prompted to authorize the connection. Click "Add sales channel" to confirm.

Step 3: Connect Your Google Account

Once the app is installed, you’ll be taken to its setup page within Shopify. At the top, you'll see a prompt to connect your Google account.

  1. Click the "Connect" button.
  2. A Google sign-in window will pop up. Choose the Google account that owns the GA4 property you want to connect.
  3. Grant Shopify permission to access your Google account information.

Step 4: Select Your GA4 Measurement ID in Shopify

After your Google Account is connected, you'll be brought back to the setup page in the Shopify app. Scroll down to the "Google Analytics" section.

  1. Click the "Connect" or "Get Started" button next to the Google Analytics 4 property section.
  2. The app should automatically pull in the GA4 properties associated with your connected Google account. Find and select the property you want to use.
  3. Confirm that the Measurement ID displayed matches the one you copied from GA4. If you don't see your desired tag from the list, there's always an option of simply pasting in the Measurement ID you saved. It does the exact same thing though selecting one of the displayed tags is slightly less error-prone.
  4. Click "Connect".

Step 5: Verify the Connection

Your connection is now active! But it's always a good idea to confirm data is flowing correctly. Data can take up to 48 hours to fully populate in your reports, but you can see live activity almost instantly using GA4's Realtime report.

  1. In a new browser tab, go to your Shopify storefront. Click around a few pages.
  2. Switch back to your Google Analytics account.
  3. In the left-hand navigation, go to Reports > Realtime.
  4. You should see yourself as an active user on the map and in the "Users in Last 30 Minutes" card. If you see activity, it’s working!

What Your New Integration Tracks Automatically

Congratulations! By using the Google & YouTube app, you've automatically enabled Enhanced Ecommerce tracking. Shopify will now send crucial e-commerce event data to your GA4 property whenever a customer takes an important action. This includes:

  • page_view: When a user views any page.
  • view_item: When a user views a specific product page.
  • add_to_cart: When a user adds a product to their shopping cart.
  • begin_checkout: When a user starts the checkout process.
  • add_shipping_info: When a user submits their shipping information.
  • add_payment_info: When a user submits their payment information.
  • purchase: When a user completes a purchase.

This data is the bedrock for all your e-commerce analysis, allowing you to build checkout funnels and understand exactly how users are progressing (or not!) toward a purchase.

Common Troubleshooting Questions

Why do my Shopify and Google Analytics revenue numbers not match perfectly?

This is the most common question, and the answer is: they never will. Don't panic. It's normal for a slight discrepancy (usually 5-10%). Here are the primary reasons:

  • Ad Blockers & Privacy Settings: Some users have browsers or extensions that block analytics tracking scripts, meaning GA4 never even sees their session. Shopify's sales reports are server-side, so they log every paid order regardless of a user's browser settings.
  • Attribution Differences: Shopify attributes a sale to the last touchpoint. Google Analytics has more complex attribution models and can give credit to different earlier touchpoints in the customer journey.
  • Processing Delays: Analytics data can take 24-48 hours to be fully processed, while Shopify's data is instant.

The takeaway: Use Shopify for your official financial "source of truth" and Google Analytics to understand behavioral trends and marketing performance.

How can I stop my own visits from skewing the data?

You don't want your team's frequent visits to your own store to count as real customer traffic. You can filter this out in GA4:

  1. In GA4, go to Admin > Data Streams and click your web stream.
  2. Scroll down and click "Configure tag settings".
  3. Under Settings, click "Define internal traffic".
  4. Create a rule. Match type should be "IP address equals". Find your IP address by Googling "what is my IP address" and paste it in.
  5. This will add a parameter to your internal traffic. To fully filter it, go to Admin > Data Settings > Data Filters, and you'll find an "Internal Traffic" filter that is active by default.

Final Thoughts

Connecting your Shopify store to Google Analytics 4 is one of the most impactful things you can do to understand your customers and marketing efforts. By following the steps above, you unlock a much deeper level of data, moving past simply what was sold to understanding the "why" and "how" behind every conversion on your site.

Getting your data sources connected is a huge step, but the next challenge is turning that stream of data into easy-to-understand reports. That’s why we built Graphed. We connect directly to tools like Google Analytics, Shopify, Facebook Ads, and more, allowing you to see your entire business in one place. Instead of learning a complex dashboard tool, you can just ask questions in plain English, like "Show me my top-selling products from my latest Facebook campaign?" and get a dashboard built for you instantly.

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.