[m-rev.] for review: Add Google Analytics support to the website.

Paul Bone pbone at csse.unimelb.edu.au
Mon Jan 4 16:31:26 AEDT 2010


For review by anyone.

Add Google Analytics tracking code to the Mercury website.

This helps people within the University measure the impact of the project and
promote it accordingly.  Jo Dalvean in Engineering administers this for us.

include/template.inc:
    As above.

Index: include/template.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/template.inc,v
retrieving revision 1.8
diff -u -p -b -r1.8 template.inc
--- include/template.inc	2 Aug 2001 10:05:54 -0000	1.8
+++ include/template.inc	4 Jan 2010 05:29:15 -0000
@@ -32,4 +32,24 @@
 </TR>
 </TABLE>
 
+<?
+/*
+ * This allows the university to track the popularity of our website via Google
+ * Analytics.
+ */
+?>
+<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 {
+        var pageTracker = _gat._getTracker("UA-2808341-16");
+        pageTracker._trackPageview();
+    } catch(err) {
+    }
+</script>
+
 </BODY>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20100104/b80ac969/attachment.sig>


More information about the reviews mailing list