Skip to content

Commit 0d16a13

Browse files
committed
Remove linkid stripping
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
1 parent 42820ef commit 0d16a13

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ The following query string parameters are stripped:
1616
- `fbclid`
1717
- Google
1818
- `gclid`
19-
- `linkid`
2019
- `utm_source`
2120
- `utm_medium`
2221
- `utm_term`

background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* parameter. We'll search the query string portion of the URL for this
44
* pattern to determine if there's any stripping work to do.
55
*/
6-
const searchPattern = new RegExp('utm_|stm_|clid|_hs|icid|igshid|linkid|mc_|mkt_tok|yclid|_openstat|wicked|otc|oly_|rb_clickid|soc_', 'i');
6+
const searchPattern = new RegExp('utm_|stm_|clid|_hs|icid|igshid|mc_|mkt_tok|yclid|_openstat|wicked|otc|oly_|rb_clickid|soc_', 'i');
77

88
/*
99
* Pattern matching the query string parameters (key=value) that will be
1010
* stripped from the final URL.
1111
*/
1212
const replacePattern = new RegExp(
1313
'([?&]' +
14-
'(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))' +
14+
'(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))' +
1515
'=[^&#]*)',
1616
'ig');
1717

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Tracking Token Stripper",
3-
"version": "2.8",
3+
"version": "2.9",
44
"manifest_version": 2,
55
"author": "Jon Parise",
66
"description": "Removes Google Analytics (UTM) parameters, and various other click tracking tokens, from URL query strings.",

0 commit comments

Comments
 (0)