Repository navigation
Conversation
AI-Assisted-By: Claude Opus 5.5 (xhigh)
This was referenced Oct 15, 2026
Author
|
Closing this here, as this repository is a mirror that only takes merge requests on GitLab. Moved to https://gitlab.com/ClearURLs/rules/-/merge_requests/90 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Covers the open part of GitLab issue 171 by @vigneshrajarr (
_hsmi;_hsencis already in globalRules) and the_kxpart of GitLab issue 219 by @mkbloke.Prerequisites
Description
Email service providers and ad networks append a per-recipient or per-click identifier to every link. These ids tie the visit to a person or a click, they are not needed to show the page. Each name below is documented by the vendor itself as a tracking or attribution parameter:
_hsmihsa_acc, hsa_ad, hsa_cam, hsa_grp, hsa_kw, hsa_mt, hsa_net, hsa_src, hsa_tgt, hsa_ver_kx_cio_idajs_uid, ajs_aid, ajs_event, ajs_prop_*, ajs_trait_*sh_kitspMailingID, spUserID, spJobID, spReportIdomnisendContactIDat_recipient_id, at_recipient_listtrk_msg, trk_contactttclidli_fat_idgbraid, wbraidThe names are specific enough not to collide with functional parameters: every rule matches the whole key, and the prefixed groups (
hsa_,ajs_,sp,trk_,at_recipient_) are spelled out instead of using a wildcard. The existing globalRules exceptions keep applying.Not included on purpose:
sourcefrom GitLab issue 219: a generic name used by many sites for real content.trk.klclick.com/ls/click?upn=…from GitLab issue 219: the destination is encoded on the server and cannot be extracted offline._bhlid(Beehiiv): already proposed in Add beehiiv tracking parameter (_bhlid) removal #190 by @alvincrespo.Affected fields
rulesofglobalRules, appended at the endChange in data.min.json (
globalRules.rules, appended)[ "(?:%3F)?_hsmi", "(?:%3F)?hsa_(?:acc|ad|cam|grp|kw|mt|net|src|tgt|ver)", "(?:%3F)?_kx", "(?:%3F)?_cio_id", "(?:%3F)?ajs_(?:uid|aid|event|prop_[a-z0-9_]+|trait_[a-z0-9_]+)", "(?:%3F)?sh_kit", "(?:%3F)?sp(?:MailingID|UserID|JobID|ReportId)", "(?:%3F)?omnisendContactID", "(?:%3F)?at_recipient_(?:id|list)", "(?:%3F)?trk_(?:msg|contact)", "(?:%3F)?ttclid", "(?:%3F)?li_fat_id", "(?:%3F)?[gw]braid" ]Example URLs
https://shop.example.com/item?id=7&_hsmi=Abc123&color=red#tophttps://shop.example.com/item?id=7&color=red#tophttps://shop.example.com/item?_kx=Q%3D.x&id=7https://shop.example.com/item?id=7https://shop.example.com/item?id=7&spMailingID=Abc123&color=red#tophttps://shop.example.com/item?id=7&color=red#tophttps://shop.example.com/item?id=7&gbraid=Abc123&color=red#tophttps://shop.example.com/item?id=7&color=red#tophttps://shop.example.com/item?id=7&kx=Abc123&color=red#tophttps://shop.example.com/item?id=7&sp=Abc123&color=red#tophttps://shop.example.com/item?id=7&trk_id=Abc123&color=red#tophttps://github.com/org/repo/issues?q=x&_hsmi=1Testing
Tested offline in URL Check 3.5 (Android 15 emulator), which applies this catalog with Java regexes: 33 of 33 parameter cases as expected (every new name removed in 20 cases, 12 similar names kept, 1 globalRules exception kept), 50 of 50 together with the two companion changes. Without the change none of the 20 parameters is removed. Inputs up to 160 KB (long hosts, many parameters, long tokens) took at most 10 ms per pattern in Java and 8 ms in JavaScriptCore, with no stack overflow at a 512 KB thread stack.
Companion PRs: #345 (LinkedIn redirections), #346 (instagram and vk.com redirections). The three change different fields and merge without conflict in any order.
AI-Assisted-By: Claude Opus 5.5 (xhigh)