Don't Track Me Google

Removes Google result redirect wrappers, click tracking and referrers, with optional forced SafeSearch disable.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
K T Z
Daily installs
6
Total installs
58
Ratings
1 0 0
Version
2.1.1
Created
2026-07-31
Updated
2026-08-30
Size
28.2 KB
License
MIT
Applies to

Don't Track Me Google

A lightweight privacy-focused userscript that removes Google's tracking and redirect wrappers from search-result links, reduces outbound referrer information, and can force Google SafeSearch off.

Designed to work across Tampermonkey, Violentmonkey, Greasemonkey, and other userscript managers without requiring a specific userscript API.

Features

  • Google redirect removal — unwraps common Google redirect URLs and converts them into direct destination URLs.
  • Image redirect cleaning — handles Google image-result redirect formats.
  • Advertising redirect cleaning — recognizes supported Google advertising/link redirect wrappers.
  • Nested URL decoding — decodes repeatedly encoded destination URLs before cleaning them.
  • Ping tracking removal — removes the ping attribute from links.
  • Click tracking cleanup — removes common inline Google tracking handlers such as onclick, onmousedown, and related handlers.
  • Google jsaction cleanup — removes common mouse/touch tracking actions without unnecessarily removing unrelated actions.
  • No-referrer mode — applies no-referrer to outbound links and adds noreferrer to their rel attribute.
  • Optional Google tracking-parameter removal — can remove parameters such as gclid, dclid, gbraid, wbraid, ved, and other supported Google parameters.
  • Force SafeSearch OFF — optionally changes supported Google search URLs from SafeSearch-enabled values to safe=off.
  • Dynamic-result protection — automatically cleans links added after the page has loaded.
  • SPA navigation support — monitors Google navigation using pushState, replaceState, popstate, and hashchange.
  • Early event interception — processes links during pointer, mouse, touch, click, auxiliary-click, and context-menu events.
  • Safety sweep — periodically checks for links rewritten by Google's scripts.
  • Userscript-manager independence — does not require GM_getValue, GM_setValue, or GM_registerMenuCommand to function.
  • Storage fallback — uses localStorage when userscript storage APIs are unavailable.
  • Configurable settings — individual features can be enabled or disabled from the userscript manager menu when menu APIs are available.
  • Debug mode — optional console logging for troubleshooting.
  • Manual cleaning — includes a Clean now command.

What It Cleans

The script detects supported Google redirect URLs such as:

  • /url
  • /imgres
  • /aclk
  • /link
  • /webhp

When a supported redirect contains a direct HTTP or HTTPS destination, the script replaces the Google wrapper with the destination URL.

Privacy Improvements

The script is designed to reduce tracking information attached to links leaving Google. Depending on the enabled settings, it can:

  • Remove Google redirect wrappers.
  • Remove link ping attributes.
  • Remove common inline click-tracking handlers.
  • Remove supported Google tracking parameters.
  • Request a no-referrer policy for outbound links.

Important: this script does not claim to provide complete anonymity or eliminate all Google tracking. Google can use many mechanisms that are outside the scope of a userscript.

Force SafeSearch OFF

The optional SafeSearch feature attempts to keep supported Google search URLs configured with:

safe=off

It also updates existing Google search links and supported search form fields when they are detected.

The feature is enabled by default and can be switched off from the userscript manager menu:

DTMG: Force SafeSearch OFF ON/OFF

Settings

The script provides separate controls for:

  • Redirect unwrapping
  • Remove ping
  • No-referrer
  • Strip Google tracking parameters
  • Force SafeSearch OFF
  • Debug mode

There is also a Clean now command for manually triggering a complete link scan.

Compatibility

Designed for modern browsers with standard JavaScript APIs, including Chromium-based and Firefox-based browsers.

It is intended to work with common userscript environments including:

  • Tampermonkey
  • Violentmonkey
  • Greasemonkey
  • Other compatible userscript extensions

The core functionality does not depend on proprietary userscript APIs.

Performance

The script uses a single MutationObserver for dynamic content and batches additional scans when necessary. A low-frequency safety sweep is also used to detect aggressive DOM rewrites.

It does not continuously block page navigation or cancel normal Google clicks.

Diagnostic API

For troubleshooting, the script exposes a small read-only diagnostic interface in the browser console:

DontTrackMeGoogle.version
DontTrackMeGoogle.getSettings()
DontTrackMeGoogle.clean()

Limitations

  • It only operates on pages matching supported Google domains.
  • It cannot prevent tracking performed entirely on Google's servers.
  • It cannot guarantee removal of every tracking mechanism Google may introduce in the future.
  • SafeSearch enforcement depends on the Google interface and parameters used by the particular Google domain or search surface.
  • Some Google functionality may intentionally use dynamic event handlers or navigation mechanisms that cannot safely be removed without affecting functionality.

Version

2.1.1

Focused on stronger redirect cleaning, dynamic-page compatibility, SafeSearch control, userscript-manager compatibility, and safer navigation handling.

License

MIT License