Skip to content

Commit 1351424

Browse files
committed
Strip MailChimp campaign tracking tokens
Strip `mc_cid` and `mc_eid` query string parameters. Closes #12
1 parent 05e19f6 commit 1351424

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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-
var searchPattern = new RegExp('utm_|clid|icid|mkt_tok', 'i');
6+
var searchPattern = new RegExp('utm_|clid|icid|mc_|mkt_tok', 'i');
77

88
/*
99
* Pattern matching the query string parameters (key=value) that will be
1010
* stripped from the final URL.
1111
*/
1212
var replacePattern = new RegExp(
1313
'([?&]' +
14-
'(icid|mkt_tok|(g|fb)clid|utm_(source|medium|term|campaign|content|cid|reader|referrer|name))' +
14+
'(icid|mkt_tok|(g|fb)clid|mc_[ce]id|utm_(source|medium|term|campaign|content|cid|reader|referrer|name))' +
1515
'=[^&#]*)',
1616
'ig');
1717

0 commit comments

Comments
 (0)