How to Remove Google Analytics from Shopify

Cody Schneider••7 min read

Removing Google Analytics from your Shopify store seems like it should be a one-click task, but the tracking code can sometimes be hiding in more than one place. Whether you're upgrading to a new GA4 property, switching analytics providers, or simply cleaning up duplicate tracking scripts, getting it wrong can skew your data. This guide will walk you through every location the Google Analytics script could be living on your store so you can remove it cleanly and confidently.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Would You Need to Remove Google Analytics?

Before jumping into the how-to, it’s worth quickly touching on the most common reasons store owners need to do this. You might be:

  • Migrating from Universal Analytics (UA) to GA4: Many older stores may have hardcoded the old Universal Analytics (UA) script. Now that GA4 is the standard, you'll want to remove the old code (which starts with 'UA-') to avoid data confusion and rely solely on the new 'G-' property.
  • Cleaning Up Duplicate Tags: It's surprisingly common to have multiple GA tags firing on a single page. This can happen if the code was added in the theme files and through Shopify’s native integration. Duplicate tags will inflate your traffic numbers, reporting twice as many pageviews and users, making your data inaccurate.
  • Switching Analytics Tools: You might be moving to a different platform entirely, like Plausible, Fathom, or a more comprehensive BI tool, and want to remove GA to simplify your tech stack.
  • Just Starting Over: Sometimes, an analytics setup becomes so cluttered with old goals, events, and filters that it’s easier to start fresh with a new property and a clean installation.

Whatever your reason, the removal process involves checking a few key areas in your Shopify admin. We'll go through them one by one, from most common to least common.

Method 1: Using Shopify’s Native Google Analytics Integration

This is the most common and recommended way to add Google Analytics to Shopify, and thankfully, it’s the easiest place to remove it from. Using this method ensures Shopify correctly implements e-commerce tracking features.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step-by-Step Instructions:

  1. Log in to your Shopify Admin: From your main dashboard, look for the main navigation menu on the left-hand side.
  2. Go to “Online Store”: Click on Online Store under the "Sales channels" section. This will expand several more options.
  3. Select “Preferences”: In the expanded menu, click on Preferences.
  4. Locate the Google Analytics Section: Scroll down the page until you see a section explicitly titled "Google Analytics". You will see a box labeled "Google Analytics account".
  5. Delete the Code Snippet: If there is Google Analytics code here, it will look something like this in a pasted snippet:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [],
  function gtag(){dataLayer.push(arguments),}
  gtag('js', new Date()),
  gtag('config', 'G-XXXXXXXXXX'),
</script>

Or, you may just see the measurement ID (e.g., G-XXXXXXXXXX or UA-XXXXXXXXX-X). Simply highlight all the code or the ID in this box and delete it, leaving the box empty. 6. Click "Save": Once the box is empty, scroll down and click the Save button to confirm your changes.

For most stores, this is the only step required. Shopify will immediately remove the Google Analytics tracking script from all pages of your website, including the checkout process.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Method 2: Checking Your Theme Liquid Files

If you've checked the "Preferences" section and it was already empty, or you're still seeing GA track traffic, the code was likely added directly to your Shopify theme's code. This is a common practice for older themes or for custom implementations. You’ll need to put on your detective hat and dig into the code itself.

Important Note: Before editing any theme code, it's always a best practice to duplicate your theme. Go to Online Store → Themes, click the three-dots 'Actions' menu on your current theme, and select Duplicate. This creates a backup you can restore if anything goes wrong.

Step-by-Step Instructions:

  1. Navigate to Your Theme Editor: From your Shopify Admin, go to Online Store > Themes.
  2. Edit Your Code: Find your current live theme. Click the '...' (three dots) button and select Edit code from the dropdown menu. This will open the theme code editor.
  3. Open theme.liquid: In the left sidebar under the "Layout" folder, find and click on the theme.liquid file. This is the main template file that loads on almost every page.
  4. Search for the GA Script: The Google Analytics script is usually placed inside the <head> section. Click inside the code and use your search function (Ctrl+F or Cmd+F) to find identifiers such as:
  5. Carefully Delete the Script: The script will be within <script> tags. Delete the entire block, from <script> to </script>, making sure not to leave part of it behind to avoid errors.
  6. Check Other Files: The script could also be in snippet files like google-analytics.liquid or analytics.liquid. Look in the "Snippets" folder and delete the code if found.
  7. Save Your Changes: Click the Save button in the top right corner.

Method 3: Reviewing Google Tag Manager (GTM)

If your store uses Google Tag Manager, the process is different. You likely won’t find the GA tag code directly in Shopify. Instead, you'll see a GTM container script installed in your theme, which fires the Google Analytics tags.

In this case, do not remove the entire GTM script unless you want to delete GTM entirely. Instead, you need to remove the specific Google Analytics tag within your GTM account.

Step-by-Step Instructions:

  1. Log in to Google Tag Manager: Visit the GTM website and log into the account linked to your store. Select the container.
  2. Navigate to "Tags": In the left menu, click Tags.
  3. Find Your Google Analytics Tag: Look for the tag responsible for GA tracking, e.g., "GA4 Configuration" or "UA Pageview".
  4. Pause or Delete the Tag:
  5. Publish Changes: Click the Submit button, give a version name like "Removed GA Tag," and click Publish to make changes live.

Method 4: Auditing Your Shopify Apps

Sometimes, third-party apps might inject tracking scripts. While less common for GA, it’s worth checking.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

How to Check:

  1. Go to Apps in your Shopify admin.
  2. Review installed apps, especially those related to marketing or analytics.
  3. Open app settings and disable Google Analytics integrations.

How to Verify the Removal Was Successful

After completing the steps, verify that GA is no longer active:

  • Use Google Tag Assistant: Install the Chrome extension, visit your store, enable it, and reload. If GA is gone, no tags should fire.
  • Use Developer Tools:

Final Thoughts

By checking Shopify’s native integration, your theme files, Google Tag Manager, and installed apps, you can systematically find and remove any instance of the Google Analytics tracking code. Taking the time to verify the removal gives you peace of mind that your analytics setup is clean, accurate, and exactly how you want it.

We know that managing disconnected platforms like Shopify, Google Analytics, social ads, and your CRM can create the kind of data mess that makes you want to start over in the first place. At Graphed, we built a solution to this exact problem. By connecting all your marketing and sales data sources in one place, you can finally see the full picture - no more jumping between tabs. We let you handle the tech so you can use simple, natural language to create dashboards and get answers in seconds, helping you move from manually wrangling data to making confident decisions.

Related Articles