LP#1452883: prevent staff client warnings w/ Google Analytics
authorJason Etheridge <jason@esilibrary.com>
Thu, 7 May 2015 20:02:00 +0000 (16:02 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 11 Jun 2015 01:23:44 +0000 (21:23 -0400)
In particular, the Security Warning that goes "You have requested an encrypted
page that contains some unencrypted information..."

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/goog_analytics.tt2

index ce1e1ae..5070537 100644 (file)
@@ -10,7 +10,7 @@
     (function() {
         var ga = document.createElement('script'); 
         ga.type = 'text/javascript'; ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        ga.src = ('oils:' == document.location.protocol || 'https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
         var s = document.getElementsByTagName('script')[0]; 
         s.parentNode.insertBefore(ga, s);
     })();