lp1466201 Disable Google Analytics in the staff client
authorKathy Lussier <klussier@masslnc.org>
Fri, 10 Jul 2015 03:23:08 +0000 (23:23 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 1 Sep 2015 16:54:39 +0000 (12:54 -0400)
As Galen Charlton noted in bug 1452883, "I suggest disabling Google Analytics
outright in the staff client; there's far too much potential for leaking patron
information." This branch aims to do so.

Test plan: Enable Google Analytics in config.tt2. Access the catalog in the
staff client. Click Debug to view the source code. Pre-patch, you'll see
the Google Analytics javascript within the head element. Post-patch, that
javascript will be gone. Viewing the source of a catalog page in a browser
should continue to show the Google Analytics javascript within the head element.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/opac/parts/base.tt2

index cb70e90..8cc3176 100644 (file)
@@ -20,7 +20,9 @@
         </style>
         [% END %]
 
-        [% INCLUDE 'opac/parts/goog_analytics.tt2' %]
+        [% IF !ctx.is_staff %]
+            [% INCLUDE 'opac/parts/goog_analytics.tt2' %]
+        [% END %]
         [% PROCESS 'opac/parts/stripe.tt2' %]
     </head>
     <body[% IF want_dojo; ' class="tundra"'; END %]>