Prevent Google from Tracking the Search Results Links That You Click

Google's already tracking everything it can about you, so if you care about privacy, you're probably better off using a search engine that's better in this regard such as DuckDuckGo or StartPage. Yet Google's search results often offer more value when you're looking to solve a specific problem.

They're tracking what you're searching for -- everyone knows that. But they're also tracking what links you click on after you search in what I think is a rather dishonest way: if you hover on a link, you see the actual URL of the result, but once you click on it (even before releasing the mouse button), Google rewrites the link so that it can track you first and then redirect you to the actual URL.

If you don't like that, here's what you can do:

  1. Get ViolentMonkey. It's free, open source and it works on all the major desktop browsers.
  2. Create a new script: image.png
  3. Here's the code:
    // ==UserScript==
    // @name        Remove Google results redirect
    // @namespace   Violentmonkey Scripts
    // @description    Remove Google results redirect
    // @include     https://google.*/search*
    // @include     https://www.google.*/search*
    // @include     https://www.google.*/webhp*
    // @version     1.0
    // ==/UserScript==
    const anchors = Array.from(document.querySelectorAll('a'));
    anchors.map((a) => {
     if (a.getAttribute('data-jsarwt')) {
       a.setAttribute('data-jsarwt', '0');
     }
    });
    
  4. Save & enjoy.

This works by changing the data-jsarwt attribute for anchors from 1 to 0 -- that bit of information lets Google know that the link should be tracked.

Any drawbacks? Not that I know of. Could this script be improved? Yes. It works for all the anchors currently on the page, but if more are added (e.g. you click on one of those question-type results), they are still going to be tracked.