From: Kohei Yoshino Date: Tue, 18 Dec 2018 23:11:13 +0000 (+0100) Subject: Bug 1515144 - Prevent Google Analytics script from being loaded when DNT:1 so that... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd174665244030c7a67dd8673b643372df4e023b;p=thirdparty%2Fbugzilla.git Bug 1515144 - Prevent Google Analytics script from being loaded when DNT:1 so that Tracking Protection doesn't have to block it --- diff --git a/extensions/GoogleAnalytics/template/en/default/hook/global/header-additional_header.html.tmpl b/extensions/GoogleAnalytics/template/en/default/hook/global/header-additional_header.html.tmpl index fc0ebc480..e1763dd98 100644 --- a/extensions/GoogleAnalytics/template/en/default/hook/global/header-additional_header.html.tmpl +++ b/extensions/GoogleAnalytics/template/en/default/hook/global/header-additional_header.html.tmpl @@ -6,8 +6,8 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[%# Disable tracking of security group members as well as private bugs #%] -[% RETURN IF !Bugzilla.params.google_analytics_tracking_id || +[%# Disable tracking of DNT-enabled users, security group members as well as private bugs #%] +[% RETURN IF !Bugzilla.params.google_analytics_tracking_id || Bugzilla.cgi.http('dnt') == '1' || user.in_group(Param('insidergroup')) || (bug.defined && bug.groups_in.size) %]