Author: andre
Date: 2009-11-14 17:23:02 +0100 (Sat, 14 Nov 2009)
New Revision: 39692

Modified:
   openimages/trunk/src/main/webapp/WEB-INF/tags/oip/googleanalytics.tagx
Log:
Google Analytics XHTML compliance - otherwise document.write gives errors



Modified: openimages/trunk/src/main/webapp/WEB-INF/tags/oip/googleanalytics.tagx
===================================================================
--- openimages/trunk/src/main/webapp/WEB-INF/tags/oip/googleanalytics.tagx      
2009-11-14 09:34:24 UTC (rev 39691)
+++ openimages/trunk/src/main/webapp/WEB-INF/tags/oip/googleanalytics.tagx      
2009-11-14 16:23:02 UTC (rev 39692)
@@ -15,17 +15,14 @@
 
       <c:if test="${!empty property_gacode}">
         
+        <script type="text/javascript" 
src="http://www.google-analytics.com/ga.js";> </script>
         <script type="text/javascript">
-          var gaJsHost = (("https:" == document.location.protocol) ? 
"https://ssl."; : "http://www.";);
-          document.write(unescape("%3Cscript src='" + gaJsHost + 
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-          </script>
-          <script type="text/javascript">
-          try{
+          try {
           var pageTracker = _gat._getTracker("${property_gacode}");
           pageTracker._trackPageview();
           } catch(err) {}
         </script>
-        
+      
       </c:if>
     </mm:node>
 

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to