Strip tracking parts from URLs

I was wondering whether it might be possible to let pihole remove the tracking parts of a URL. There's a great extension ClearURLs that does this in the browser.
If this would be possible on a network level, that would be awesome! Or is this something that only the browser could do?

As a DNS filter, Pi-hole is aware of domain names.

Like DNS, Pi-hole is unaware of URLs, so only a browser can implement your request.

thanks for your reply. That's what I've supspected. So to achieve something like this on a network level, we would need probably a proxy?

Only if that would cover HTTPS traffic as well.
(And you'd put substantially more load on a machine by running a proxy (all browser traffic) than you would by running Pi-hole (just DNS)).

It's probably best to leave this to a browser extension, though you probably wouldn't need one just specialising in this. AFAIAAO, extensions like uBlock Origin or Privacy Badger will do that and more.

Closing as a solution was found.