Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #2717, send only referrer origin to GA
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed May 2, 2017
1 parent 1add819 commit 4883e11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/src/ga-activation.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ const gaJs = `
if (gaLocation) {
ga("set", "location", gaLocation);
}
if (window.URL && document.referrer) {
ga("set", "referrer", (new URL(document.referrer)).origin);
} else {
ga("set", "referrer", "");
}
if (__HASH_LOCATION__) {
ga("set", "title", "");
}
Expand Down

0 comments on commit 4883e11

Please sign in to comment.