#tracking #url #remove #parameters #rules #parser #defined

tracking-params

Removes unwanted tracking parameters from URLs

4 releases

0.1.6 Jan 9, 2023
0.1.5 Jan 2, 2023
0.1.3 Dec 31, 2022

#41 in #defined

MIT/Apache

26KB
509 lines

tracking-params

Library to remove various known tracking parameters from a given URL.


Parser rules are defined in rules.rs file.

Example

let dirty_url = url::Url::parse("https://twitter.com/elonmusk/status/1608273870901096454?ref_src=twsrc%5EdUmBgUY").unwrap();
let clean_url = tracking_params::clean(dirty_url); // returns `Cleaned` which derefs to `url::Url`

assert_eq!(
    clean_url.to_string(),
    "https://twitter.com/elonmusk/status/1608273870901096454".to_string() // No `ref_src` tracking params
);

Dependencies

~4MB
~79K SLoC