Google Analytics is a free tool by Google that provides robust insights into website visitor performance and statistics.
In this guide you will learn about:
- Why you should not want Google Analytics to track you
- Methods to prevent Google Analytics from tracking you
Many businesses integrate Google Analytics into their websites to track visitor statistics and gather valuable web metrics.
However, blocking Google Analytics is more widespread now due to various privacy concerns. Once a person blocks Google Analytics, that person is not being tracked, and nothing is sent to Google Analytics servers.
This article will explain some popular methods out there to prevent Google Analytics from tracking you.
I explain that Google Analytics collects information about website visitors and provides valuable insights to website owners.
However, some people have privacy concerns and may want to prevent Google Analytics from tracking them.
I provide several methods for blocking Google Analytics, including installing browser extensions, using a firewall or hosts file, using ad-blockers or a script blocker, and using the Brave browser.
Tracking user behavior is very beneficial for website owners. The collected data can be used for marketing, conversion rate optimization, user experience (UX) improvement, auditing, etc.
In general, Google Analytics will collect at least the following information from a website’s guests.
All the above information sounds harmless. However, when websites and apps start sharing data, it gets to the point where marketers can get a creepily accurate image of you. For some visitors, this is unnerving, and they may get annoyed with the relentless stream of targeted ads.
On the other hand, the information users provide to websites is their price to get better product recommendations, search results, specific offers, etc. Abstractly, all these help towards a better web experience.
However, if they want to opt-out of tracking, it should be within their ability.
Check out our guide on privacy friendly Google alternatives if you want to switch away completely from Google.
Below, I’ll show you several methods you can implement to prevent Google Analytics from tracking your browsing and internet activity.
Using this official extension is the best way to opt-out of Google Analytics. The main advantage of using the Opt-Out extension is that you can make sure it always works even when Google makes changes to its services.
However, there are also some downsides to this extension. One is that you have to install it on your computer. Installing software to stop other software from tracking your activities is not very productive. The other disadvantage is that this extension can’t stop Google from knowing about the websites you visit. It just blocks sending events to Google Analytics.
The Google Analytics Opt-Out Extension works with all major browsers, including Google Chrome, Firefox, Safari, Internet Explorer, and Opera.
Another simple method to block Google Analytics is using a Chrome extension called “Block Yourself from Analytics.” It restricts Google Analytics from tracking your visits to specific websites when installed. Interestingly, this extension allows you to set a list of domains you don’t want your visits to get tracked.
Below are the steps to install and set up the “Block Yourself from Analytics” Chrome extension.
Step 1: Open Chrome browser
Step 2: Visit this link to find the extension.
Step 3: Click on the blue “Add to Chrome” button and click “Add Extension” in the following popup.
Press “Add Extension.”
Step 4: Now, you can see an orange icon in your browser’s top right as below.
Step 5: Now, navigate to the website that you don’t want your visits to get tracked by Google Analytics. Then click on that small orange icon on the browser and click “Block Analytics for this website.”
You can also manually add (without navigating to the website) any website/websites you want or view the list of websites you have blocked by clicking on “Options.” To manually add a website using the “Options” area, enter the URL of the website in the text field at the bottom of the window and click “Add.” In the end, make sure to save all the websites you added before exiting.
The main drawback of this method is that it only works with the Chrome browser.
If you have a firewall that can block specific IP ranges or domain names, you can block Google Analytics for your entire network. This option also has some downsides, such as IP addresses changing without notice or multiple services using the same IP address. If your firewall can block DNS requests to particular domain names, you can add a rule to block the domain google-analytics.com and www.google-analytics.com to opt-out Google Analytics.
You can also opt out of Google Analytics by assigning the domain name to a different IP address in the host file. The local hosts file is checked to see if the hostname/domain name is assigned a particular IP address before serving a DNS request.
This is similar to blocking the DNS request of Google Analytics, which we discussed earlier. The steps of this method will vary depending on your operating system, but it works with OS like Linux, Windows, and macOS.
Following are the steps to opt-out of Google Analytics for Microsoft Windows. Here, we will assign the domain name of Google Analytics to a non-existing IP address, leading any request to it getting terminated instead of sending it to Google.
Step 1: Run Command Prompt in administrator mode.
Search for “cmd” in the search bar and right-click on the “Command Prompt” entry that appears there.
Then click on the “Run as administrator” option, and it will launch the Command Prompt as an administrator.
Windows 10 users will have to right-click on the Windows Icon and select “Command Prompt (Admin).”
Step 2: Type the below command in the Command Prompt.
It will open up the host file on your computer.
Step 3: Add a non-existing IP for Google Analytics.
Add two lines at the bottom of the hosts file as following:
Step 4: Finally, Save the hosts file and close all the open web browsers.
Sometimes, you may need to restart your computer for these changes to become effective.
Ad blockers have gained more attention recently due to their wide usage. While their primary purpose is to block the annoying (marketing) ads that follow you across the internet, they can also affect collecting traffic data in various ways, such as by blocking Google Analytics.
By default, many ad blockers blacklist Google Analytics, while some ad blockers need to be configured.
Below are a few simple steps to install and configure Adblock Plus free ad blocker and configure it to block Google Analytics.
Step 1: Visit the Chrome Web Store page of the Adblock Plus extension.
Step 2: Click on the “Add to Chrome” button and then click on the “Add Extension” button in the following popup.
Step 3: Now, you will see a small Adblock plus icon in your browser, and it will display a popup when you hover on it.
Step 4: Click on the Settings icon at the top right of the popup and go to the “Advanced Tab” on the settings page.
Step 5: Turn on the “Easy List” option there to block Google Analytics.
In addition to the above two ad blockers, some other popular ad blockers can block Google Analytics, such as AdBlock Pro, AdGuard AdBlocker, AdRemover, Ghostery, and Block Ads! and SuperBlock Adblocker.
Brave is an open-source, Chromium-based web browser that is free to download and use. It is similar to all the other standard browsers enabling users to navigate websites, view any online content, and run web applications.
However, the primary differentiating factor of Brave, among other Chromium browsers, is its focus on user privacy. By default, Brave achieves this by blocking all ads, third-party cookies, and website trackers like Google Analytics. Therefore, using the Brave browser is a good option for hiding your online activity from Google Analytics while surfing the web.
Since the Brave browser also acts as an ad blocker, blank spaces will appear in the areas of websites that contain ads. Sometimes, the pages won’t load correctly, and in such cases, you will have to either select a different browser or change the ‘Shields Up’ setting to ‘Shields Down’ to turn off the privacy and security protection of Brave.
Below are a few simple steps for downloading and installing the Brave browser.
Step 1: Visit the following link to navigate to the official site of Brave browser.
Step 2: Then, click on the required download option in the middle of the page, and it will download the installable file of the Brave browser.
Step 3: Double click on the installable file, and it will generate a prompt message as shown below. Click “Run” there, and it will install and launch the Brave browser on your PC.
Looks and works like any other web browser:
Data is invaluable, and nowadays, most websites collect at least some basic information about their visitors’ behavior.
As a powerful web analysis tool, Google Analytics allows tracking a wide range of data regarding website performance, traffic, and even user behavior.
However, it is also essential that website users feel safe while visiting websites, and for that, they may need to exercise more control over who’s monitoring their online habits.
Therefore, even if blocking Google Analytics can affect the accuracy of analytics data for site owners, it’s a significant privacy concern for visitors.