Can I manipulate the URL parameters using a browser extension?
I am not sure if this is the appropriate forum for this topic but is technical and nothing to do with programming.
At the end of some URL that is linked from other sites, some parameters are added. Like:
?utm_campaign=socialflow_lifehacker_facebook&utm_source=lifehacker_facebook&utm_medium=socialflow
What is this called? I am familiar with parameters that actually effect output of the page like language or userid being passed from the previous page. These things do not in anyway effect the output. Is it possible to sanitize these extra stuffs? What would be the search terms I can use? My search for "manipulate url parameters in browser" has been a dead end.
These are UTM parameters. They are typically used for analytics (e.g., tracking where the user is coming from).
It should be possible for browser extensions to remove these UTM parameters before you send the request to the server (so the tracking doesn’t work).
After a quick search, I found the following extensions, but I have no experience with them, and I didn’t verify if they are stripping the parameters before the server is hit. There are likely more (search for "remove UTM parameters").
Chromium/Chrome:
-
Tracking Token Stripper (source code)
[…] removes those tokens from the URL before the destination site is visited […]
-
Requestly - Step by step guide to remove UTM Parameters in Requestly
Firefox:
-
Link Cleaner (source code) removes the parameters from hyperlinks (so it probably doesn’t work if you copy-paste a URL with the parameters).
-
au-revoir-utm (source code) seems to remove them after the page is loaded, so it doesn’t prevent the tracking.
-
Pure URL - its description doesn’t say if it works before or after loading the page.
-
Requestly - Step by step guide to remove UTM Parameters in Requestly
You can indeed manipulate URLs (including parameters) using a browser extension, provided you request the right permissions. Manipulating them after navigation would be somewhat pointless (the point of those parameters being to track referrals across the web), but you could either modify the URLs on web pages prior to clicking them (this is pretty easy but would not work for script-initiated navigation), or create an extension that filters navigation requests (somewhat like how ad blocking works) and modify the outbound requests so the server never sees those query string elements.