Closed broadwell closed 4 years ago
I've added some additional GA config -- these comments are on the commit:
ga("set", "transport", "beacon");
saves HTTP requests and improves performance.ga("set", "anonymizeIp", true);
anonymizes IP addresses.
By default Google Analytics records the full IP address of a user visiting the site, but that full IP address is never available to the Google Analytics property admin. By anonymizing the IP address you can make your site more GDPR-compliant as a full IP address can be defined as PII (personally identifiable information.)
Enables Google Analytics on the site, through the Jekyll hooks that were mostly already in place.
NOTE that the environment variable
JEKYLL_ENV=production
must be set when building the site to deploy it to production in order for analytics to enabled. This value must not be set on any other build; otherwise our local, staging, etc. sites will all send reports to Google as well.