Skip to content

Commit

Permalink
Remove linkid stripping
Browse files Browse the repository at this point in the history
This token name is rather generic and is used by some sites in a
non-tracking context. Rather than complicate the logic with exceptions,
I think the best solution is to simply take no action for this token.

Closes #46
  • Loading branch information
jparise committed Apr 30, 2021
1 parent 42820ef commit 0d16a13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ The following query string parameters are stripped:
- `fbclid`
- Google
- `gclid`
- `linkid`
- `utm_source`
- `utm_medium`
- `utm_term`
Expand Down
4 changes: 2 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* parameter. We'll search the query string portion of the URL for this
* pattern to determine if there's any stripping work to do.
*/
const searchPattern = new RegExp('utm_|stm_|clid|_hs|icid|igshid|linkid|mc_|mkt_tok|yclid|_openstat|wicked|otc|oly_|rb_clickid|soc_', 'i');
const searchPattern = new RegExp('utm_|stm_|clid|_hs|icid|igshid|mc_|mkt_tok|yclid|_openstat|wicked|otc|oly_|rb_clickid|soc_', 'i');

/*
* Pattern matching the query string parameters (key=value) that will be
* stripped from the final URL.
*/
const replacePattern = new RegExp(
'([?&]' +
'(icid|mkt_tok|(g|fb)clid|igshid|_hs(enc|mi)|linkid|mc_[ce]id|(utm|stm)_(source|medium|term|campaign|content|cid|reader|referrer|name|social|social-type)|rb_clickid|yclid|_openstat|wickedid|otc|oly_(anon|enc)_id|soc_(src|trk))' +
'(icid|mkt_tok|(g|fb)clid|igshid|_hs(enc|mi)|mc_[ce]id|(utm|stm)_(source|medium|term|campaign|content|cid|reader|referrer|name|social|social-type)|rb_clickid|yclid|_openstat|wickedid|otc|oly_(anon|enc)_id|soc_(src|trk))' +
'=[^&#]*)',
'ig');

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Tracking Token Stripper",
"version": "2.8",
"version": "2.9",
"manifest_version": 2,
"author": "Jon Parise",
"description": "Removes Google Analytics (UTM) parameters, and various other click tracking tokens, from URL query strings.",
Expand Down

0 comments on commit 0d16a13

Please sign in to comment.