17 ms·
Browser extension that strips Google Analytics tokens from URL query strings
- falcon620 8y agoI am not the author. I was just so tired of having to manually strip crap like "?utm_term=.b1e20fe33a88" from the end of URLs before sharing them. This extension solves that problem nicely. I wonder why Google doesn't build something into Chrome that just hides this crap from the visible URL? I guess they could get some PR pushback from paranoids if they did that though. Better to just hide behind some fictitious UTM Inc.
- deleted 8y ago[deleted]
- Ajedi32 8y agoI think the share UI in Chrome mobile already strips that data, provided the site you're on defines a canonical URL in a link tag.
- amelius 8y agoI want my browser to strip UTM from links when I follow them, not just when I share them.
- madeofpalk 8y agoWhy? Just install a blocker extension to stop all of these analytics and tracking solutions, rather than fairly benign UTM tags.
- MightySCollins 8y agoThe site you visit can still use that information with an ad blocker.
- phirschybar 8y agocheers. this was the first appealing thing that came to mind. I am constantly stripping off those query string parameters just to share stuff.
- nwj 8y agoFor those on Firefox, NeatURL[1] does this too. [1] https://addons.mozilla.org/en-US/firefox/addon/neat-url/ https://addons.mozilla.org/en-US/firefox/addon/neat-url/
- laumars 8y agoThe linked repo does Firefox as well. Not sure why the HN title[1] is Chrome specific because that's not the title on GitHub. But it's still a handy submission regardless. [1] At time of writing, "chrome-utm-stripper: Chrome extension to strip Google Analytics data from URLs"
- falcon620 8y agoFixed the title, thanks for telling me that I missed that bit.
- kevlar1818 8y agoIt looks like Neat URL might block more than UTM tags: https://github.com/Smile4ever/firefoxaddons/tree/master/Neat%20URL-webext https://github.com/Smile4ever/firefoxaddons/tree/master/Neat...
- ddtaylor 8y agoGoogle has a history of policing their extensions to favor themselves, example being YouTube downloading extensions.
- adamnemecek 8y agoIf you build it from source they'll have a hard time stopping you.
- ddtaylor 8y agoThey can kill usability, like for this the benefit is being is to install and use.
- tzahola 8y agoOr Ad Nauseam: https://adnauseam.io https://adnauseam.io
- RIMR 8y agoyoutube-dl works better than any of those crappy extensions anyway.
- deleted 8y ago[deleted]
- f2n 8y agoI used to use something called UTM Mangler that would replace the referral links with shock sites. I felt that was much better than simply removing them. Here's the github, it looks like the chrome extension linked in the README is no longer there: https://github.com/huntwelch/UTM-Mangler https://github.com/huntwelch/UTM-Mangler
- madeofpalk 8y agoWow, what a horrible, shitting thing to do. I use Google Analytics for a side project site I run for the video game Destiny. I like to look at referral URLs so I can see if some publication has linked to me, if a video has been made about my site, or if there's a discussion on reddit going on that would be relevant. I know it's popular to think about the only entities using analytics are big faceless organisations and sending them to graphic porn websites is cool, but please remember that a) they're still just humans and b) people run cute little side projects like mine and I don't want to see tubgirl or whatever when going through my referrals. Block GA, strip referrals, whatever. I don't care. Just please don't abuse people like this.
- politician 8y ago(As I asked in the other peer comment, but am curious about your reaction as well) Would it change your mind if the OP were doing it as a form of guerrilla advertising for those sites?
- madeofpalk 8y agoOkay so sending graphic/abusive porn in place of referrer tags to every website you visit is just such a disgusting, fucked up thing to do. Like, if you do this you're objectively a bad person. If you're doing "guerrilla advertising for those sites" - I just think you're a wanker. It's ineffective and silly.
- harry-wood 8y agoNot "every website you visit". Every website you visit where the developers chosen to use messy URLs for tracking.
- Jerry2 8y agoThere is also this extension that strips tracking parameters from all kinds of trackers and not just from the Google one: https://github.com/newhouse/url-tracking-stripper https://github.com/newhouse/url-tracking-stripper https://chrome.google.com/webstore/detail/url-tracking-stripper/flnagcobkfofedknnnmofijmmkbgfamf https://chrome.google.com/webstore/detail/url-tracking-strip...
- skeletonjelly 8y agoDamn. Not for Firefox though. Can't find it at least. Looks great otherwise!
- Vinnl 8y agoSomeone linked this elsewhere: https://addons.mozilla.org/en-US/firefox/addon/neat-url/ https://addons.mozilla.org/en-US/firefox/addon/neat-url/
- neovive 8y agoOut of curiosity, do utm tags still offer much value beyond standard Google Analytics? I remember them being popular back in the pre-GA (Urchin) days. Since GA already tracks referrals coming from email, social media, web, mobile, etc.; perhaps the major benefit is tracking a specific campaign that is already a few steps removed from the initial referral.
- greglindahl 8y agoutm tags let you run 10 different social media campaigns and compare them to each other. GA by default will only show you a social media total, not split into the efforts by Alice's botnet, Bob's human retweet club, and so forth.
- cosmie 8y agoThere are a lot of use cases where they're still quite valuable. - Social sites tend to redirect outbound links to sanitize referral information. So you can get a bunch of traffic from Facebook, and have no idea if it's people viewing your page, going through their news feed, postings in Groups, etc. All of your Facebook traffic will have a referral of (l|lm|m|business|mobile|web).facebook.com/(l.php)? [1] - Unless someone is using a web client, any clicks from email will show up as direct traffic, just as if someone typed the url in their browser directly. So you can't evaluate email performance in GA without dedicated utm parameters. - The Source field in GA defaults to the referrer, but is overridden by any explicitly provided utm_source data. If you capture the true referral information separately (i.e. put the value of document.referrer into a custom dimension), you can compare the two and glean all kinds of nifty info like traffic from Site B and Site C resulted from a link on Site A.[2] - The concerted effort to upgrade sites from http -> https has led to increase in traffic marked as direct that's not direct, because of referral header stripping. Note that it's not inherently an issue with https itself, but with the fact that not everyone is using https yet, combined with the cumulative number of pre-existing http links.[3] There are plenty more, but those are some of the bigger things I can think of off the top of my head where standard GA falls short and having utm-tagged links are beneficial. [1] Yes, I'm aware that this regex is lacking escape characters. But having them reduced readability. [2] If someone takes a utm tagged link from Facebook and shares it on Twitter, by default it'll look like it came from Facebook in GA. Unless you're capturing the document.referrer value manually in a custom dimension, you wouldn't be able to suss out that this was happening and would never know that they're actually coming from Twitter based on a link you shared on Facebook. Or even that they're coming from Twitter at all. [3] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Re...
- pastullo 8y agoWhy do you need this? Is it because you are paranoid of being tracked? UTMs offer a transparent, honest way of tracking where a user is coming from. This is super important for any company that runs multiple channel marketing. Making impossible for company to track their marketing effort doesn't protect your privacy. It just makes it tougher for companies to manage their marketing spending. Marketing is not evil. It's how the world works. You need to market something to be able to sell it. I feel there is a paranoia about being tracked and privacy, where anything that is somehow tracking, is evil and must be stopped. UTMs parameters are absolutely harmless and stripping them away offer no privacy benefit whatsoever.
- falcon620 8y agoIn my case: no privacy paranoia (I just assume everything is being tracked and there's very little I can do about it). I just hate a) having ugly URLs b) having to manually edit the URLS before copy/pasting them somewhere else. Many sites nowadays actually have thoughtfully designed URL schemes. But then there's so often this GA crap that destroys the esthetics. As an example, the URL that triggered me to go find this particular extension was: https://www.washingtonpost.com/news/global-opinions/wp/2018/05/12/trumps-decision-to-blow-up-the-iran-deal-is-a-massive-attack-on-europe/?utm_term=.c4cd15b2caef https://www.washingtonpost.com/news/global-opinions/wp/2018/... (hex chars randomly manipulated for paranoid reasons, hehe.)
- dpedu 8y agoI strip these when manually sharing a URL for the sake of readability.
- partiallypro 8y agoI do the same thing, I would actually like a browser extension that strips the UTM code from my clipboard or from any sharing dialogue box. Sometimes this interferes (I have no idea why?) with link previews on social media, which is highly annoying.
- Moru 8y agoI understand that most people on hackernews sees advertising as something important and that the world would be a worse place without it. But not everyone are able to cope with the modern overload of information competing with our attention so you will have to excuse me for blocking out everything not needed. Its not all about privacy and conspiracy, some of us are just trying to avoid burnout.
- guessmyname 8y agoI created another extension with the same functionality [1] but also added functions to fix other type of links, Amazon product pages [2] for example. Unfortunately, I moved to Safari and have had no time to port the code. If anyone is interested, feel free to fork and improve it [3] — (the main purpose of the extension is to mark links as read though). [1] https://github.com/cixtor/markasread/blob/master/markasread.js#L23-L41 https://github.com/cixtor/markasread/blob/master/markasread.... [2] https://github.com/cixtor/markasread/blob/master/markasread.js#L43-L62 https://github.com/cixtor/markasread/blob/master/markasread.... [3] https://github.com/cixtor/markasread https://github.com/cixtor/markasread
- CapacitorSet 8y agoA Mozilla extension that covers utm_ and more: https://github.com/idlewan/link_cleaner https://github.com/idlewan/link_cleaner
- jwineinger 8y agoWhat are the chances google blacklists the extension? Seems like something outside the browser would be more reliable.
- jpz 8y agoIs it safe to use any of these Chrome extensions? I get quite paranoid about them these days.
- koolba 8y agoIn the end comes down to whether you trust the developer, not the current code, as an "evil" update could come down the line. Heck the developer could even sell the extension and let someone else be evil...
- Sylos 8y agoCome to Firefox, we have actual human beings that look at the source code of new or updated extensions and a strict no telemetry policy (unless the user opts in).
- lzbrc 8y agoSeems like the extension is no longer supported (1 year) also it seems it doesn't work for https. So, not sure what actually works.
- skytrue 8y agoJust going to pile on here and say that GA is pretty benign. I’m very anti-tracking, but GA at least provides a minimally invasive way to verify whether or not you are providing value to a specific audience. It’s impossible to always create something perfect for the right audience. It’s a lot of guess work. Without having at least a little data, it’s like shooting in the dark.
- falcon620 8y agoSo, just to repeat my stance: Google already knows everything about me. I have accepted that, sort of. However, they have crossed a line: they have made URLs ugly by default.
- teej 8y agoNot sure I totally get this argument. The U in UTM tag stands for Urchin. They set this standard sometime before they were acquired by Google in 2005.
- harry-wood 8y agoI agree. For me tracking is an annoyance, but this particular practice should be regarded as bad web design. It should be roundly denounced by the tech community. Why are so many web developers so willing to mess up their URLs in this way?
- nfoz 8y agoGoogle doesn't know everything about me. I don't use gmail, I don't use google search, and I have an iPhone. GA gives them basically all of my browsing habits. It's crazy.
- fapjacks 8y agoOkay. But is it benign in the context of all of the other information Google tracks?
- stephengillie 8y agoGoogle already questions me - "Were you at Seward Park from 7:30 pm to 9:30 pm on May 10th 2018?" They can combine my maps and analytics usage to see when I'm at a PC and when I'm out and about. Additionally, they have my login data to a number of sites. And my Youtube history. As well as everything sent back by Android and Chrome. And my Gmail history.
- lmkg 8y agoThis extension is only mildly useful. The UTM parameters are generally pretty coarse-grained. They don't add information that comes close to individually identifying users. Especially compared to the rest of what Google Analytics tracks by default, the additional data from UTM parameters is very small. Your privacy is much more impacted by the GCLID and DCLID query parameters, which are added by AdWords and DoubleClick campaigns respectively. This are auto-generated by their respective tools and are much more granular.
- ianhawes 8y agoIIRC GCLID and DCLID parameters can't be queried except by Google Analytics.
- greglindahl 8y agoutm parameters also appear in your web logs, and can totally be used to identify individual users.
- Exuma 8y agoThis will ruin a lot of legitimate uses that's not paranoia-induced security protection... I would recommend not using that and simply using uBlock Origin, so people can still read where their users are coming from on their campaigns.
- monochromatic 8y agoIt's not paranoia. Modern advertising/tracking really is awful. Why should I care what uses of my information you believe are legitimate?
- Exuma 8y agoWell... chances are if you're going to PAY for a service, then you find it useful do you not? They might have found you as a customer from different advertising channels. Better optimization means more customers, means more revenue, which means they can iterate faster, delivering you an even better product.
- sincerely 8y agoWhat if I, the user, don't want the website I'm visiting to know where I'm coming from? Why does a website deserve to know what other website I was on before??
- Exuma 8y agoSee my other answers
- ionised 8y agoI don't care what these people consider legitimate.
- Exuma 8y agoSo if you're paying for a useful service, you don't care about helping that SAAS company to optimize their campaigns, to net them more revenue, so they can build a better service that you're using??
- Dig1t 8y agoDoes this do something that Ghostery does not?
- MightySCollins 8y agoPlease don't remove these tags. Our system needs them to tie up your orders to where you came from and your personal information. Which we can use to analyse and ensure we spend more money on targeting people like you.
- unbeli 8y agoInstalling this extension basically means trusting a random dude (the author) with all the data passing through the browser just to screw over some random people trying to get coarse-grained stats on where people come to their websites from. Sounds like a rather idiotic idea, but I'm sure even this will have its users.
- RussianCow 8y agoThe addon is open source (this HN post even links to the GitHub), and the source code is very short, so it's easy to verify that it's doing only what it says. If you are extra paranoid about the addon in the Chrome store not reflecting what's in the repo, you can always install it from source.
- unbeli 8y agoThis is wishful thinking. How confident are you that you'll spot a well planted backdoor? Hint: the more capable you are, the less confident you should be.
- krageon 8y agoIf you're that paranoid, it's actually not very hard to audit the code in this case. Unless you go so far as to not trust the whole stack it's running on, but in that case you should stop using your browser entirely. For a sane threat model the confidence in your own audit should be reasonably high.
- zulln 8y agoIn general I would agree, but the source code is so short here that you would be able to glance through it first to confirm nothing sketchy is going on there: https://github.com/jparise/chrome-utm-stripper/blob/master/background.js https://github.com/jparise/chrome-utm-stripper/blob/master/b...
- Chisnet 8y agoExcept that if you install the add-on from the store it will auto-update with any changes (assuming they pass approval) and you likely wouldn't notice unless permissions are changed.
- trustfundbaby 8y agopinboard does this by default when you save a link and its awesome.
- BerislavLopac 8y agoThis is the bookmarklet I've been using for the same purpose: javascript:window.location=window.location.href.replace(/\?([^#]*)/,function(_,s){s=s.split('&').filter(function(v){return(!/^utm_/.test(v))}).join('&');return(s?'?'+s:'')});
- jagthebeetle 8y agoUnfortunately, or not, GA makes it very easy to work around this. By default, it will do its UTM parsing serverside these days based on the page URL the webmaster sends to it. So all I have to do as a webmaster is start using `?aaa_source=foo&aaa_medium=bob` Then I do `ga(‘send’, ‘pageview’, location.pathname.replace(/aaa/g, ‘utm’)` A more robust implementation would have to modify the web request to GA itself, assuming the goal is to destroy that data. EDIT: Upon looking at the actual implementation (`chrome.webRequest.onBeforeRequest`), the points above should be addressable: the key is to strip out potentially URL-encoded utm values in the requets sent to GA [1], which may be either in the query string or the (beacon) POST payload shipped to google-analytics.com). i.e. `google-analytics.com/collect?v=1&dp={url-encoded-path-with-utm-values}` should be purged as well. [1]: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#content https://developers.google.com/analytics/devguides/collection...
- kapauldo 8y agoLove this and I totally get it. Thx for sharing this.
- deleted 8y ago[deleted]