
Neat URL cleans URLs, removing parameters such as 'fbclid' and 'utm' - mot2ba
https://github.com/Smile4ever/Neat-URL
======
lmkg
Google Analytics expert here.

This is missing some fundamental ones: gclid and dclid. Those are the
parameters that identify _a specific click_ from _a specific user_ on _a
specific ad placement_. They are the keys that Google uses on the back-end to
join Google Analytics data with Google Ads (formerly AdWords) and DV360
(formerly DoubleClick) data.

The utm_ parameters are tame. They are very coarse-grained, usually
representing "which budget did this ad come from" rather than anything about a
user. They're ugly, which is enough reason to strip them, but gclid is also
ugly, and much more identifying.

This is a bit of a fringe opinion, but I actually consider tools that block
utm_ but leave gclid to actually be a _decrease_ in privacy. A lot of people
misconfigure their Google Analytics so that _utm params break the gclid.
Stripping utms allows that join to happen.

~~~
dngray
> _This is missing some fundamental ones: gclid and dclid._

I always preferred CleanURLs as it has an autoupdate feature, which pulls down
this json file
[https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/da...](https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/data.min.json)

[https://gitlab.com/KevinRoebert/ClearUrls/-/wikis/Technical-...](https://gitlab.com/KevinRoebert/ClearUrls/-/wikis/Technical-
details/Rules-file)

CleanURLs does include both gclid and dclid. From memory the other url
cleaning addons required a new version of the addon.

~~~
KozmoNau7
ClearURLs is my choice as well, it seems to catch a lot more stuff, and as you
say it autoupdates definitions (like uBlock Origin etc.).

------
lightswitch05
I've been using this extension for a couple years now. In fact, I submitted
the pull request for the fbclid feature [1]. @Smile4ever merged and released
the change the next day. It is a really great extension with a responsive and
helpful maintainer. I'm glad its getting some more visibility.

Extension Links:

Firefox: [https://addons.mozilla.org/en-US/firefox/addon/neat-
url/](https://addons.mozilla.org/en-US/firefox/addon/neat-url/)

Chrome: [https://chrome.google.com/webstore/detail/neat-
url/jchobbjgi...](https://chrome.google.com/webstore/detail/neat-
url/jchobbjgibcahbheicfocecmhocglkco?hl=en)

\---

[1] [https://github.com/Smile4ever/Neat-
URL/pull/163](https://github.com/Smile4ever/Neat-URL/pull/163)

~~~
Jeremy0
Sounds good, I didn't know about Neat URL until now as Canonical Url Detector
is what I've been using for a long time. It is slightly smaller in size, but
maybe not as effective:
[https://github.com/irok/CanonicalUrlDetector](https://github.com/irok/CanonicalUrlDetector)

------
nyc_pizzadev
This is a browser extension, I think. No where does it actually say that.

~~~
gurjeet
Created a pull request that fixes this confusion.

[https://github.com/Smile4ever/Neat-
URL/pull/211](https://github.com/Smile4ever/Neat-URL/pull/211)

~~~
oehtXRwMkIs
Very minor nitpick, could you change the commit message to be in imperative
mood? Thanks for contributing.

------
nickjj
In order to install this browser extension it requires permissions of "can
read and change all your data on the websites you visit". So basically a man
in the middle attack that tracks every site you visit and could potentially
modify the content on pages you visit without you knowing.

As much as I enjoy privacy, IMO it's a much bigger violation / risk to give my
complete browsing history to some extension, especially since it can "read all
your data". That means it can look at the HTML response of any page you visit
which means access to your banking details, email account and everything you
ever browse. That's all personally identifiable data.

I wouldn't even consider utm tags a privacy violation since it's really
nothing more than a slightly more useful referrer header that's completely
anonymous.

~~~
hv42
you can always copy the code and install locally if you don't trust the
publisher. That's the full benefit of open source. If it breaks in the future,
just inspect and copy the new version again?

~~~
antpls
I believe the parent is asking for more granularity in browsers permissions in
general. On Firefox, permission granularity is a bit lagging behind other
platforms, for example Android (which is already not perfect/too permissive)

~~~
Too
I think the problem is a plugin that can rewrite the url can rewrite the url
to anywhere else which in effect becomes "read all your data". Firefox has
taken such side channel attacks very rigorously so almost any plugin doing
anything remotely interesting will have such requirement.

------
runxel
This is one of the worst GitHub readmes I've ever encountered!

What is this? A CLI tool? A website? A browser extension?

Had to look in the comments to tell – what a desaster.

~~~
nikanj
Submit a pull request for a better one. Be a force of good in this world. Now
you’re just dumping on work some volunteer does for free

~~~
pferde
The mere fact that something is done for voluntarily and for free does not
mean it cannot be criticized if it is bad. Note that GP did not criticize the
person that made the README, but the README itself. That is how it should be.

------
devindotcom
Love this kind of decluttering. I hate gigantic URLs! I've been using
ClearURLs for Firefox, seems to work well. Anyone know of any major
differences?

[https://gitlab.com/KevinRoebert/ClearUrls](https://gitlab.com/KevinRoebert/ClearUrls)

~~~
ytch
I tried both for about 10 minutes, it seems ClearUrl has rules per domain[1],
therefore it can do more than tracking-prevention by remove some common but
useless query strings in URL (like 'keyword' in amazon.com), but there is no
places for custom rules.

On the other hand, Neat URL's rules apply to all domain, so it won't make
short Amazon links, but you can add your own rules.

[1]
[https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.js...](https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json)

------
BerislavLopac
I've written a simple bookmarklet I call UrchinKiller that does the job:

    
    
        javascript:window.location=window.location.href.replace(/\?([^#]*)/,function(_,s){s=s.split('&').filter(function(v){return(!/^utm_/.test(v))}).join('&');return(s?'?'+s:'')});

~~~
admax88q
Won't this only apply _after_ you've loaded the page? Doesn't really help
prevent the tracking that most of those parameters are used for.

~~~
devindotcom
Could still be handy for people who don't mind the URL loading big but might
later want to copy-paste it somewhere in cleaner format.

~~~
BerislavLopac
I generally use it just before I trigger the "post to News.YC" bookmarklet.
;-)

    
    
        javascript:window.location=%22http://news.ycombinator.com/submitlink?u=%22+encodeURIComponent(document.location)+%22&t=%22+encodeURIComponent(document.title)

------
class4behavior
On Firefox, I dropped this extension for the more versatile Request Control[1]
as Neat URL failed to work for a long time; not sure about now.

[1]: [https://addons.mozilla.org/en-
US/firefox/addon/requestcontro...](https://addons.mozilla.org/en-
US/firefox/addon/requestcontrol/)

------
jvehent
I hate gigantic URLs, but not as much as I hate extensions that want to access
my data for all websites.

~~~
lstamour
Grab the source code, review it for AJAX or DOM manipulations and install it
via Developer mode? Also, set reminders to review diffs and update it as new
releases occur...

~~~
drusepth
That seems like a lot of work for an extension that just makes URLs prettier.

~~~
commoner
Most users of this extension install it because it nullifies some forms of
browser tracking, not because it makes URLs prettier.

I've shared instructions for inspecting the source code of a Firefox add-on
elsewhere in this discussion:

[https://news.ycombinator.com/item?id=22388603](https://news.ycombinator.com/item?id=22388603)

WebExtensions like Neat URL continue to work even if you don't update it. You
only have to inspect the extension code once (no developer mode needed) if you
are skeptical, and you don't have to update it if you don't want to.

~~~
lstamour
The paranoid in me says there’s no point in installing the web store version
unless you download and inspect /it/. The source code published isn’t
necessarily the version distributed, though obviously injecting code in the CI
pipeline would be... excessive. This goes back to the trusting trust problem.
[https://www.schneier.com/blog/archives/2006/01/countering_tr...](https://www.schneier.com/blog/archives/2006/01/countering_trus.html)
If someone managed to skip an exploit into a release of webpack, well, there
goes the Internet ;-)

------
daef
I like to squeeze amazon links to
[https://amazon.com/dp/B0085NTQJK](https://amazon.com/dp/B0085NTQJK) \-
removing the SEO inlining of the article name

Removing those pesky get-parameters aint enough to keep a BOM link list in
line

~~~
frosted-flakes
See, I actually like it when URLs contain human-readable text. Cryptic URLs
like YouTube has are meaningless to me, requiring me to actually visit the
page to see what it is. That's also why I dis-like link shorteners.

I really like Stack Overflow's URLs because of how flexible they are. You can
put _anything_ in the title slug, since only the ID is used. When self-
documenting links aren't useful, then you can omit the title slug completely.

For example, these four links all point to the same page (in a code block so
they don't get truncated):

    
    
       https://stackoverflow.com/questions/37358364/rules-for-the-use-of-angle-brackets-in-typescript 
       https://stackoverflow.com/questions/37358364/typescript-angle-brackets 
       https://stackoverflow.com/questions/37358364
       https://stackoverflow.com/q/37358364

~~~
mehrdadn
You can put anything you want, but if it's not what the page expects, it will
cause a redirect, which will slow down navigation just a bit.

------
prophesi
It'd be cool to implement this as a browser extension, that either silently
strips the parameters, or opens a dialogue upon a link click telling you what
the extension is allowed to strip out before proceeding.

~~~
mcpeepants
That's what it is

[https://addons.mozilla.org/en-US/firefox/addon/neat-
url/](https://addons.mozilla.org/en-US/firefox/addon/neat-url/)

~~~
prophesi
Ah, thanks! I couldn't tell that was a case from the readme.

~~~
symfoniq
In your defense, I don't see a link to the extension anywhere on the GitHub
page.

------
hieudang9
In another approach, we could use userscript for Violentmonkey/Greasemonkey
browser addons. This way remind me the era of UserScript with Firefox version
below 57, I almost can do anything with UserScript. Nowaday, it has some
changes and limitations.

[https://github.com/cloux/LinkSanitizer](https://github.com/cloux/LinkSanitizer)

------
Satwell
I've been using Request Control
([https://github.com/tumpio/requestcontrol](https://github.com/tumpio/requestcontrol))
which does some of the same stuff, though it looks like Neat URL and Clean URL
do more.

------
ronalbarbaren
Cool. Work well on Firefox Mobile. I installed successfully on Kiwi Browser
(Chromium Mobile based) but couldn't edit extension option, glitch somehow.
Hope author add a feature like importing config file.

------
gcmrtc
I don't get this.

My solution is to use uBlock Origin and block tracking altogether.

This still allows GA to track you, it just removes some information from the
tracking beacon.

~~~
t0astbread
Couldn't website owners still analyze their server logs to track users via
tracking parameters?

------
winrid
Anyone know if there's an NPM library that does this? If not I may have to
abstract this out into one for a project (thanks for making it!!).

------
vernie
Won't somebody please think of the advertisers?!

~~~
ytch
complaining from advertisement industry in 3...2...1...

------
de-amped
It doesn't clean AMP URLs?

