11

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.

4
  • The hard part is going to be that every single site has it different. It would be easier to copy the url, paste it in your browser, edit it and then press enter or the go arrow.
    – LPChip
    Apr 15, 2017 at 9:39
  • That is exactly what I do now. But since there are few sites that I use frequently, I decided to automate it. Where if the site is listed, it will be manipulated. Apr 15, 2017 at 10:08
  • Just so you know that many URLs will not work without these.
    – harrymc
    Apr 15, 2017 at 11:30
  • 1
    @harrymc, there's no reason that URLs won't work without those parameters. And I make a point to remove them when sharing links with others. So far I've never encountered something not working, and to do so implies someone done goofed. The key is to make sure to remove just the UTM parameters and not others (and break the parameters, eg, by accidentally removing the ?).
    – Kat
    Apr 20, 2017 at 19:31

4 Answers 4

7

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:

Firefox:

2
  • Exactly what I am was looking for, jackpot. Thank you. Mind sharing the keywords you used in your search. Apr 17, 2017 at 20:11
  • @user7579349: If you mean keywords for searching suitable extensions: I mentioned "remove UTM parameters" in the answer. You might also try: "remove UTM query", "strip UTM URL" etc.
    – unor
    Apr 17, 2017 at 20:18
1

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.

1

Marketers add UTM parameters like utm_campaign, utm_medium and utm_source to shared URLs for tracking. You can use a chrome extension (like Requestly) which makes it incredibly easy to configure a rule that removes these parameters from all URLs.

screenshot of Requestly example

0

What is this called?

The entire piece of the url including the ? is called the query string. It can be removed like this.

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.

In your example, these are all tracking parameters used by Google Analytics. They are used to track where users came from when they reach a site. The destination site must have GA javascript code embedded in the site to make use of these. It is possible for the site to use the parameters to modify what the user sees (show different content based on where the user came from for example), but this is unusual.

Is it possible to sanitize these extra stuffs?

Looking for specific parameters and trying to strip those from the url before the request is sent could be annoying to maintain (if they change). But definitely possible.

The better option might be to just block Google Analytics like the various "Ad Blocker" extensions already do. Or use the Brave browser :-)

What would be the search terms I can use?

Hopefully everything above gives you the info you need to proceed.

Notes:

1
  • > The better option might be to just block Google Analytics like the various > "Ad Blocker" extensions already do. Or use the Brave browser :-) That is a quick solution. I use ublock origin. Apr 16, 2017 at 4:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .