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

Commit

Permalink
Merge pull request #2797 from mozilla-services/ga-origin-only
Browse files Browse the repository at this point in the history
Fix #2717, send only referrer origin to GA
  • Loading branch information
dannycoates authored May 3, 2017
2 parents 0b91178 + 4883e11 commit d5dc26b
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 d5dc26b

Please # to comment.