diff --git a/views/partials/analytics.handlebars b/views/partials/analytics.handlebars index 4f6aaff9..3f7babc8 100644 --- a/views/partials/analytics.handlebars +++ b/views/partials/analytics.handlebars @@ -5,6 +5,13 @@ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{{trackerId}}}', 'auto'); + + if (window.URL && document.referrer) { + ga("set", "referrer", (new URL(document.referrer)).origin); + } else { + ga("set", "referrer", ""); + } + ga('set', 'anonymizeIp', true); ga('send', 'pageview'); \ No newline at end of file