Reddit started tracking the links we click. Here's a GreaseMonkey / Tampermonkey userscript to prevent that.

https://www.reddit.com/r/privacy/comments/4aqdg0/reddit_started_tracking_the_links_we_click_heres/

created by OperaSona on 16/03/2016 at 23:18 UTC*

936 upvotes, 61 top-level comments (showing 25)

As mentioned here[1], reddit is now tracking outbound links. I only noticed it now, I don't know if the change has actually been online for 8 days, but regardless, it's annoying to me. Anyway, if you inspect outbound links (like any imgur link posted on reddit), you should notice that it has two attributes:

1: https://www.reddit.com/r/changelog/comments/49jjb7/reddit_change_click_events_on_outbound_links/

Anyway, here's a short script that overwrites the 2nd attribute with the 1st, making sure you go directly to imgur. It's especially good even if you don't care about your privacy in the scenario where you're on a shitty connection that takes 5 seconds to load any page, because it loads one less page per click, basically.

// ==UserScript==
// @name         Don't track my clicks, reddit
// @namespace    http://reddit.com/u/OperaSona
// @author       OperaSona
// @match        *://*.reddit.com/*
// @grant        none
// ==/UserScript==

var a_col = document.getElementsByTagName('a');
var a, actual_fucking_url;
for(var i = 0; i < a_col.length; i++) {
  a = a_col[i];
  actual_fucking_url = a.getAttribute('data-href-url');
  if(actual_fucking_url) a.setAttribute('data-outbound-url', actual_fucking_url);
}

It's a userscript, so use whichever tool your browser has to install it (TamperMonkey on Chrome, GreaseMonkey on FF, build-in in Opera, or figure it out for whatever else you're using as a browser).

Also, it's a 3 minutes job, it's probably not as beautiful or as short or even as efficient as it could be, but we'll probably have better options soon (options to disable it directly in reddit? or at least in RES?) and in the meantime, it does the job.

--------------------------------------------------------------------------------

A reddit admin just posted this:

https://www.reddit.com/r/changelog/comments/4az6s1/reddit_change_rampdown_of_outbound_click_events/

We're going to add some privacy controls before rolling out fully, so we've turned this off for now. Once we have privacy controls baked in we'll then open it back up for testing.

So hopefully, the script won't be needed anymore and it'll be much easier to users who don't really know how to install it.

Thanks /u/caterpielvl99 for the heads up.

Comments

Comment by KamSolusar at 17/03/2016 at 15:07 UTC*

204 upvotes, 11 direct replies

If you're using Firefox, ~~there's also the RedirectCleaner[1] addon.~~

1: https://addons.mozilla.org/de/firefox/addon/redirectcleaner/

Edit: that addon is no longer available. But Skip Redirect[2] does the job pretty well. Give it a try.

2: https://addons.mozilla.org/en-gb/firefox/addon/skip-redirect/

Comment by omnomnomyurm at 18/03/2016 at 11:16 UTC

43 upvotes, 3 direct replies

What can we do about this on mobile?

Comment by TotesMessenger at 17/03/2016 at 06:48 UTC*

179 upvotes, 1 direct replies

I'm a bot, *bleep*, *bloop*. Someone has linked to this thread from another place on reddit:

[/r/bestof] Reddit started tracking all outbound links we click and /u/OperaSona explains how to prevent that

[/r/conspiracy] Important: How To Disable Reddit Click Tracking

[/r/conspiracymemes] How To Disable Reddit Click Tracking by OperaSona

[/r/de] Hinweis: Reddit startet (bisher scheinbar nur andernorts) das Tracking von Klicks auf Link-Einreichungen - Gegenmaßnahmen sind hier beschrieben

[/r/firstlook] [x-post from r/privacy] Reddit started tracking the links we click. Here's a GreaseMonkey / Tampermonkey userscript to prevent that.

[/r/lurkershares] How to hide from tracking outbound links

[/r/privacytoolsio] Reddit started tracking the links we click. Here's a GreaseMonkey / Tampermonkey userscript to prevent that. (r/privacy)

1: /r/TotesMessenger

2: /message/compose?to=/r/TotesMessenger

Comment by [deleted] at 18/03/2016 at 06:03 UTC

101 upvotes, 11 direct replies

If you use **AdBlock**:

Go to *Options > Customize > Manually edit your filters* and add these:

out.reddit.com$domain=reddit.com

events.redditmedia.com$domain=reddit.com

(or alternatively click "Block an ad by its URL") Tested and working on the latest Chrome and Opera Developer:

Comment by krkoch at 18/03/2016 at 12:12 UTC

15 upvotes, 1 direct replies

I use CleanLinks[1] for firefox. Strips links for all kinds of sites, like google and facebook. The other day I saw it started to strip links for reddit as well (it flashes the address bar yellow when it strips links).

1: https://github.com/diegocr/cleanlinks

Comment by fantastic_comment at 17/03/2016 at 10:31 UTC

31 upvotes, 2 direct replies

Guide from Ghacks Block Reddit from tracking outbound links

Comment by -code- at 17/03/2016 at 14:52 UTC

13 upvotes, 3 direct replies

Would it be possible to implement this at an application level such as in the Open Source Red Reader app?

Comment by [deleted] at 17/03/2016 at 14:37 UTC

23 upvotes, 1 direct replies

[deleted]

Comment by [deleted] at 17/03/2016 at 07:53 UTC*

19 upvotes, 2 direct replies

[deleted]

Comment by Sahtor at 18/03/2016 at 05:56 UTC

8 upvotes, 1 direct replies

Both TamperMonkey and GreaseMonkey gather usage statistics although you can disable them in options. You're trading 1 privacy loss for potential another unless you're careful.

Comment by sammex at 17/03/2016 at 06:05 UTC

8 upvotes, 0 direct replies

Great work! Thanks!

Comment by Himrin at 17/03/2016 at 13:29 UTC

8 upvotes, 2 direct replies

How does this impact (both the tracking, and the script) RES expanding images inline, even if not directly visiting the site?

Comment by n4noNuclei at 18/03/2016 at 02:11 UTC

5 upvotes, 3 direct replies

I think this would work equally well?

// ==UserScript==
// @name Reddit Clicks
// @description Probably removes Reddit spying
// @match *://*.reddit.com/*
// @run-at document-end
// ==/UserScript==

(function() {
    "use strict";

    $(".outbound").attr("data-outbound-url", null);
    $(".outbound").attr("data-href-url", null);
    $(".outbound").removeClass("outbound");
})();

Comment by [deleted] at 17/03/2016 at 16:54 UTC*

4 upvotes, 1 direct replies

Do you mind releasing this on Greasyfork if no other solutions show up in the coming weeks so you could put updates out when Reddit changes the way they track clicks?

Comment by CelineHagbard at 18/03/2016 at 06:13 UTC

6 upvotes, 2 direct replies

Do you happen to know if reddit's javascript is sending another AJAX-type request to the server in addition to just using the out.reddit redirect?

Comment by [deleted] at 18/03/2016 at 02:30 UTC

3 upvotes, 1 direct replies

[deleted]

Comment by vabecin at 17/03/2016 at 08:53 UTC

9 upvotes, 2 direct replies

It tracks even if user is not logged in. Best option is to disable JavaScript.

Comment by [deleted] at 17/03/2016 at 08:14 UTC*

3 upvotes, 1 direct replies

[deleted]

Comment by [deleted] at 18/03/2016 at 10:29 UTC*

3 upvotes, 1 direct replies

[deleted]

Comment by waleed707 at 18/03/2016 at 12:56 UTC*

3 upvotes, 1 direct replies

I inspected various outgoing links and none of them had the 'data-href-url' or 'data-outbound-url'. I also viewed the page source and searched for those attributes and found nothing!!

Am I missing something here?!

[UPDATE] Someone here[1], suggests that Reddit is rolling out this feature gradually to the community, so it might take a while before hitting me and some other users.

1: http://www.ghacks.net/2016/03/17/block-reddit-from-tracking-outbound-links/

Comment by artyboi37 at 18/03/2016 at 14:35 UTC

3 upvotes, 0 direct replies

Nice variable name.

Comment by sparkler_fimfiction at 18/03/2016 at 14:52 UTC

3 upvotes, 0 direct replies

Reddit is finally going full Digg.

Comment by hardshock at 18/03/2016 at 16:00 UTC

3 upvotes, 0 direct replies

Et tu, Reddit?

Comment by PlasmaRoar at 29/05/2016 at 20:36 UTC

3 upvotes, 0 direct replies

Got AdBlock, AdBlock Plus, uBlock, uBlock Origin, and TamperMonkey simultaneously blocking this.

Come at me bro.

Comment by Jurph at 10/07/2016 at 14:16 UTC

3 upvotes, 0 direct replies

FYI, they have **finished the rollout[1]** and the script in OP works well. Another previously-posted script (see below) breaks outbound links entirely. So if you came across this thread looking for the right way to fix this, the script below **doesn't** work, and the script in OP **does**.

1: https://np.reddit.com/r/changelog/comments/4rl5to/outbound_clicks_rollout_complete/

Enjoy!

   // ==UserScript==
   // @name Break Outbound Reddit Links
   // @description Was supposed to stop tracking but breaks stuff
   // @match *://*.reddit.com/*
   // @run-at document-end
   // ==/UserScript==

   (function() {
       "use strict";

       $(".outbound").attr("data-outbound-url", null);
       $(".outbound").attr("data-href-url", null);
       $(".outbound").removeClass("outbound");
          })();