⪼ Made with 💜 by Polyglot.
QuerySweeper cleans up URLs by removing unnecessary tracking parameters, making them shorter and neater for copying and sharing without affecting your browsing session. This makes sharing links more straightforward and subtly enhances privacy by limiting tracking. Ideal for anyone looking to keep URLs clean and concise, QuerySweeper operates in the background, ensuring simplicity and a bit of extra privacy with every link you share.
...
const dirtyUrl = new URL(window.location.href);
const cleanUrl = new URL(window.location.href);
cleanUrl.search = '';
dirtyUrl.searchParams.forEach((parameterValue, parameter) => parametersToSweep.has(parameter) || cleanUrl.searchParams.append(parameter, parameterValue));
window.location.replace(cleanUrl);
const parametersToSweep = new Set([
'utm_source',
'utm_medium',
'utm_campaign',
'gclid',
'fbclid',
'msclkid',
'dclid',
'mc_eid',
'mc_cid',
'igshid',
'_hsenc',
'_hsmi',
'trk',
'trkCampaign',
'sc_campaign',
'sc_channel',
'sc_content',
'sc_medium',
'sc_outcome',
'sc_geo',
'sc_cid',
'piwik_campaign',
'piwik_kwd',
'pk_campaign',
'pk_kwd',
'yclid',
'ali_trackid',
'aff_platform',
'aff_trace_key',
'hmb_campaign',
'hmb_medium',
'hmb_source'
]);
