How to Uninstall Google Analytics

Cody Schneider8 min read

Thinking about uninstalling Google Analytics from your website? The process involves more than just hitting a delete button inside your GA account. You first need to remove the tracking code from your site to stop data collection, and only then can you remove the property and its historical data from Google's servers. This guide will walk you through every step of a clean uninstall, from finding the code to confirming it's completely gone.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Remove Google Analytics?

While a powerful tool, there are several solid reasons you might want to part ways with Google Analytics:

  • Privacy Concerns: With regulations like GDPR and CCPA getting stricter, some businesses are opting for more privacy-focused analytics tools that don't rely on cookies or collect personal data.
  • Switching Providers: You might be migrating to a different analytics platform that better suits your needs, such as a self-hosted option like Matomo or a simpler, privacy-first tool like Fathom or Plausible.
  • Website Overhaul: During a major website redesign or re-platforming, it's often a good time to start fresh with a clean analytics setup.
  • Performance Issues: Every script added to your site has a small but measurable impact on page load times. Removing non-essential scripts can help speed things up.
  • Redundancy: Sometimes tracking codes from legacy properties are left on a site, collecting redundant data or cluttering up your setup. Removing them simplifies your tech stack.

Step 1: Locate Your Google Analytics Tracking Code

Before you can remove the code, you have to find out how it was installed. The tracking script is usually added in one of four common ways.

Common Installation Methods:

  • Directly in a Website File: This is common for custom-built websites or older themes. You'll likely find the JavaScript snippet in the site's header file (e.g., header.php, head.html). It typically starts with <script async src="https://www.googletagmanager.com/gtag/js" for GA4.
  • Website Platform Integration: Popular platforms like Shopify, Squarespace, and Wix have a simple interface where you just paste your Measurement ID (e.g., "G-XXXXXXXXXX"). The platform then injects the code for you.
  • Using a WordPress Plugin: Plugins like Google Site Kit, MonsterInsights, or dozens of others make it easy to add Google Analytics to WordPress by asking for your ID and handling the code placement automatically.
  • Through Google Tag Manager (GTM): This is a more advanced method where a single GTM container script is placed on your site, and Google Analytics is deployed as a "tag" from within the GTM interface. If you see code referencing googletagmanager.com/gtm.js, you're using GTM.

Not sure where to start? Right-click on your website's homepage, select "View Page Source," and search (Ctrl+F or Cmd+F) for "gtag.js" or "G-". This will often reveal the script and give you clues about where it's located.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Remove the Tracking Code from Your Website

This is the most important step for stopping data collection. The method depends entirely on how the code was installed in the first place.

Method 1: Removing Code Manually from Site Files

Use this method if you or your developer inserted the JavaScript snippet directly into your site’s theme files.

Warning: Always create a backup of your website files before editing them. A small mistake can break your site.

  1. Log into your website’s admin panel, cPanel, or connect via an FTP client.
  2. Navigate to your theme’s files. This is often in a location like /wp-content/themes/your-theme-name/ for WordPress.
  3. Locate the file containing your header code. This is usually named header.php, head.html, or index.html.
  4. Open the file and look for a block of code similar to the example below, typically found just before the closing </head> tag.
<!-- 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>
  1. Carefully select and delete the entire block of code, from the opening <!-- Global site tag... --> comment to the closing <!-- End Google Analytics --> comment.
  2. Save the file. Your website will now stop sending data to Google Analytics.

Method 2: Removing Code from a Website Platform (Shopify, Squarespace, Wix)

These platforms make it incredibly easy. You’ll be logging into your platform's dashboard, not editing code.

For Shopify:

  1. Log in to your Shopify Admin.
  2. Go to Online Store > Preferences.
  3. Scroll down to the Google Analytics section.
  4. Delete the entire code snippet or ID field from the text box.
  5. Click Save.

For Squarespace:

  1. Log in to your Squarespace dashboard.
  2. Go to the main menu and click on Settings > Advanced > External API Keys.
  3. Find the "Google Analytics Account Number" field.
  4. Clear the field so it is completely empty.
  5. Click Save.

For Wix:

  1. Log in to your Wix account.
  2. Go to your site's dashboard and select Marketing & SEO.
  3. Click on Marketing Integrations.
  4. Find the Google Analytics box. Click "View."
  5. In the top right corner, click the three-dot menu icon and select Remove. Confirm your choice.

Method 3: Deactivating via a WordPress Plugin

If you used a plugin to install GA, you’ll use that same plugin to remove it.

  1. Log in to your WordPress dashboard.
  2. Navigate to the settings page for your analytics plugin (e.g., Site Kit, MonsterInsights, Analytify).
  3. Look for a settings area related to authentication or your tracking ID.
  4. You should see an option to "Disconnect," "Clear Authorization," or simply a field with your Measurement ID. Delete the ID from the field or click the disconnect button.
  5. Save your changes.
  6. Alternatively, you can just deactivate and delete the plugin itself, which will also remove the tracking code.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 4: Removing a Tag from Google Tag Manager

If your site uses GTM, simply removing the GTM script from your website will remove all of your tags, including Analytics. However, if you want to keep GTM for other tags (like a Facebook Pixel) and only remove Google Analytics, follow these steps:

  1. Log in to your Google Tag Manager account.
  2. Select the container for the website you are working on.
  3. From the left navigation menu, click on Tags.
  4. Find the tag responsible for your Google Analytics tracking. It's often named something like "Google Analytics: GA4 Configuration" or "GA4 Event."
  5. Click on the tag to open its configuration. You can either pause it by clicking the pause icon, or delete it permanently.
  6. To delete, click the three dots in the upper-right corner and select Delete.
  7. CRITICAL NEXT STEP: You have not made any live changes yet. In the top right of the screen, click the blue Submit button to publish your changes.
  8. Give your new version a descriptive name (e.g., "Removed GA4 Tracking Tag") and click Publish. The tag is now officially removed from your live site.

Step 3: Verify That Tracking Has Stopped

Don't just assume the code is gone - double-check to be sure! After removing the code, clear your browser cache and your website cache (if you use a caching plugin). Then, use one of these methods.

  • View Page Source: Go to your website, right-click, and select "View Page Source." Search for your Measurement ID (e.g., "G-12345ABCDE"). If there are no results, you're good.
  • Browser Developer Tools: Open your browser's developer tools (usually F12 or Ctrl+Shift+I). Click on the "Network" tab. In the filter box, type "google-analytics." Refresh your webpage. If no requests appear in the network log, it means your browser isn't sending any data to Google's servers.
  • Tag Assistant Extension: Use the "Tag Assistant Legacy (by Google)" Chrome extension. Navigate to your site, enable the extension, and reload the page. It will show you all active Google tags. If it shows no Google Analytics tag found, you have successfully removed it.

Step 4 (Optional): Delete Your Property & Account

Removing the tracking code stops your website from collecting new data. All your historical data still exists inside your Google Analytics account. If you want to remove this data permanently, you need to delete the property (or the entire account).

Remember, this action is permanent. If you change your mind later, the historical data cannot be recovered after the grace period.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Delete a Google Analytics Property

  1. Log in to Google Analytics.
  2. Click on the Admin gear icon in the bottom-left corner.
  3. Make sure you have the correct account and property selected in the top columns.
  4. In the Property column, click on Property Details.
  5. In the top right corner, click Move to Trash Can.
  6. Follow the on-screen prompts to confirm the deletion.

The property will be placed in the trash for 35 days, during which you can still restore it. After 35 days, it is permanently deleted.

How to Delete an Entire Google Analytics Account

If you want to remove an entire account and all of the properties within it, the process is similar.

  1. Go to Admin.
  2. In the Account column, click on Account Settings.
  3. In the top right corner, click Move to Trash Can.
  4. Confirm the deletion. This will move every property within that account to the trash.

Final Thoughts

Removing Google Analytics is a two-part process: stop data collection by removing the code from your website, then permanently erase historical data by moving the property or account to the trash can. By following a methodical approach - finding where the code is installed, using the correct removal process, and verifying afterward - you can ensure a clean and complete uninstallation.

Once you migrate to a new analytics tool, the core reporting challenge remains the same: bringing data together to find useful insights. Manually piecing together reports from your new web analytics setup, advertising platforms, and CRM is time-consuming. Instead of that constant grind, we built Graphed to connect all your data sources and automate the heavy lifting. You can just ask questions in plain English - like "create a dashboard showing my monthly website traffic, ad spend, and sales conversions" - and get a real-time view of your performance instantly.

Related Articles