From e3660e59b49e06cbff6398865887889cee70b77d Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 6 Dec 2013 11:46:33 -0500 Subject: [PATCH] Strip http(s) from SiteSetting.ga_domain_name --- app/views/common/_google_analytics.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/common/_google_analytics.html.erb b/app/views/common/_google_analytics.html.erb index 30910978f4f..a3f9beac323 100644 --- a/app/views/common/_google_analytics.html.erb +++ b/app/views/common/_google_analytics.html.erb @@ -4,7 +4,7 @@ _gaq.push(['_setAccount', '<%= SiteSetting.ga_tracking_code %>']); <% if SiteSetting.ga_domain_name.present? %> - _gaq.push(['_setDomainName', '<%= SiteSetting.ga_domain_name %>']); + _gaq.push(['_setDomainName', '<%= SiteSetting.ga_domain_name.gsub(/^http(s)?:\/\//, '') %>']); <% end %> _gaq.push(['_setCustomVar', 1, 'Anonymous', <%= !current_user %>, 2]);