From 2e82731bf3618724973bbbfd23411d6485d0c160 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 5 Oct 2016 15:16:11 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20include=20hostname=20in=20page?= =?UTF-8?q?=20passed=20to=20analytics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Analytics only expects to get the path part of the URL, not the full URL. --- app/templates/admin_template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index 4de2bf288..aea332980 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -136,7 +136,7 @@ })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-75215134-1', 'auto'); // strip UUIDs - page = window.location.href.replace( + page = (window.location.pathname + window.location.search).replace( /[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}/g, '…' ) ga('send', 'pageview', page);