add google analytics. why did I wait so long?

This commit is contained in:
Andy Janata 2012-09-22 07:51:23 -07:00
parent 98ea63d26b
commit b57ee2de7e
3 changed files with 14 additions and 0 deletions

12
WebContent/analytics.jsp Normal file
View File

@ -0,0 +1,12 @@
<%-- Obviously, you might want to remove this if you're running your own server... --%>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35005079-1']);
_gaq.push(['_setDomainName', 'socialgamer.net']);
_gaq.push(['_trackPageview']);
(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';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

View File

@ -61,6 +61,7 @@ HttpSession hSession = request.getSession(true);
<script type="text/javascript" src="js/cah.ajax.handlers.js"></script>
<script type="text/javascript" src="js/cah.app.js"></script>
<link rel="stylesheet" type="text/css" href="cah.css" media="screen" />
<jsp:include page="analytics.jsp" />
</head>
<body>

View File

@ -34,6 +34,7 @@ to, for instance, display the number of connected players.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pretend You're Xyzzy</title>
<jsp:include page="analytics.jsp" />
</head>
<body>
<h1>