Remove URL tracking

Do you ever get links that are a mile long, include a ton of random characters, and take up your entire chat window? The extra fluff that makes up that giant mess are tracking elements gathering data about your browsing habits. We’ll quickly dive into one example, but remember this is just a glimpse into this world.

Have a look at this monster:

https://www.amazon.com/AmazonBasics-Mid-Back-Office-Chair-Armrests/dp/B00IIFW2L4/ref=mp_s_a_1_4?crid=2A1L3JMQQSUKIT&keywords=small+desk+chair+with+arm+rest&qid=9021091251&refinements=p_85%3A2430956011&rnid=8575309&rps=1&sprefix=small+desk+chair+with%2Caps%2C207&sr=8-4&ufe=app_do%3Aamzn1.fos.d977788f-1483-4f76-90a3-786e4cdc8f10#aw-udpv3-customer-reviews_feature_div

Vanilla Amazon product links are clean and don’t carry all that tracking fluff. This and the link above will bring you to the exact same place1.

https://www.amazon.com/dp/B00IIFW2L4

Everything after the ? (and even the /ref= before it) is a tracker. For example, /ref=mp_s_a_1_4 breaks down into: “This user found this link on their phone (m = mobile), as a search result (s), and they clicked on the fourth item in the first set of results (a_1_4).” This is valuable information for Amazon, but it’s not very helpful to you. If we look at the rest, you’ll quickly learn how much information can be found in one, seemingly harmless, link.

Reviewing that link again, we can break it down into individual components separated by the & symbol. The & acts as the connector between URL tracking elements.

https://www.amazon.com/AmazonBasics-Mid-Back-Office-Chair-Armrests/dp/B00IIFW2L4/
ref=mp_s_a_1_4 ?
crid=2A1L3JMQQSUKIT &
keywords=small+desk+chair+with+arm+rest &
qid=9021091251 &
refinements=p_85%3A2430956011 &
rnid=8575309 &
rps=1 &
sprefix=small+desk+chair+with%2Caps%2C207 &
sr=8-4 &
ufe=app_do%3Aamzn1.fos.d5972784f-1284-4q56-90a3-78633cc385510
#aw-udpv3-customer-reviews_feature_div

Parameters

  • ref = we covered above, but it’s keeping track of where you’re coming from
  • crid = your customer ID
  • keywords = what did you search for?
  • quid = the search (query) ID that is matched to a timestamp
  • refinement = how did you filter the search?
  • rnid = refinement ID used to determine category metrics
  • rps = did you filter for Prime?
  • sprefix = tracks search prefix and position in the results where this item was found
  • sr = where the item was found on the page (8-4 is 8th page, 4th row)
  • ufe = unique identifier for other interactions; also used for tracking tests and features
  • # = points to a specific location on the product detail page

What they’re collecting

  • Search behavior (what you searched for, how you refined the search, etc.).
  • User interaction (how you arrived at the page, what filters you used, where in the results you clicked).
  • Session data (timing of your search, unique identifiers for tracking your browsing session).
  • User experience (features or tests you interacted with).

Thankfully, uBlock Origin, the browser extension that makes the internet usable again, offers an additional section for optional Filter Lists. In your extension settings, navigate to Filter Lists, and you’ll find a Custom section at the bottom. The “ClearURLs for uBO” script copies rules from the ClearURLs extension, making them available in uBlock Origin. Enabling this will help remove basic tracking.

Note: If “ClearURLs for uBo” isn’t available, import the following link directly:

https://raw.githubusercontent.com/DandelionSprout/adfilt/master/ClearURLs%20for%20uBo/clear_urls_uboified.txt

For those who prefer a more customized approach, you can also import your own lists, as shown in the example below:

Custom uBo Parameters

! Title: Remove unnecessary parameters from URLs
! Homepage: https://files.mcwain.net/parameters.txt
! Description: Was looking to remove ClearURLs from the browser extension list. This supplements uBlock Origin nicely.
! Last Updated: 08/09/2024
! Important: Add "https://files.mcwain.net/parameters.list" into uBlock Origin under Filter Lists > Import
||amazon.com^$removeparam=crid
||amazon.com^$removeparam=keywords
||amazon.com^$removeparam=qid
||amazon.com^$removeparam=refinements
||amazon.com^$removeparam=rnid
||amazon.com^$removeparam=rps
||amazon.com^$removeparam=sprefix
||amazon.com^$removeparam=sr
||amazon.com^$removeparam=ufe

uBlock Origin will filter these elements out as soon as the URL is accessed by your browser. The full request won’t make it to Amazon’s servers until it’s filtered - effectively preventing them from collecting this information from you.

I’ll be maintaining a supplementary list at https://files.mcwain.net/parameters.txt. This list will nuke any tracking that decides to make themselves known, much like the domains in my DNS lists collection. Feel free to add it to your custom lists in uBo.


  1. Only if you copy and paste that link. I didn’t want you to accidentally click on a link with all that tracking. ↩︎

Previous: Turtle Case Next: The Instigators