Skip to content

Commit

Permalink
GDPR: Anonymize IP addresses for Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
tohjustin committed Dec 20, 2019
1 parent ec782a1 commit e99a00b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if (process.env.NODE_ENV === "production" && process.env.REACT_APP_RAVEN_PUBLIC_

if (process.env.NODE_ENV === "production" && process.env.REACT_APP_GA_TRACKING_ID) {
ReactGA.initialize(process.env.REACT_APP_GA_TRACKING_ID);
ReactGA.ga("set", "anonymizeIp", true);
ReactGA.pageview(window.location.pathname + window.location.search);
}

Expand Down

0 comments on commit e99a00b

Please sign in to comment.