Skip to content

Commit

Permalink
Strip query string from referrer
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Jun 3, 2024
1 parent c6493a5 commit 3d71568
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ SOFTWARE.

// only set referrer if not internal
let referrer = vars.referrer || "";
// strip query string from referrer
referrer = referrer.split("?")[0];

if (document.referrer.indexOf(hostname) < 0) {
referrer = document.referrer;
}
Expand Down

0 comments on commit 3d71568

Please sign in to comment.