Skip to content

Commit

Permalink
Adding analytics.
Browse files Browse the repository at this point in the history
  • Loading branch information
PotHix committed Oct 17, 2012
1 parent 8b9dece commit cc3c94d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ update-git:

copy:
@echo " ----> Copying to production repository"
@cp -R index.html game.min.js media/ production/
@cp -R index.html game.min.js analytics.js media/ production/

# Prepare impact to use on plaev games
impact:
Expand Down
11 changes: 11 additions & 0 deletions analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35654929-2']);
_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);
})();
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
<div class="button" id="buttonAction"></div>
<div class="button" id="buttonJump"></div>
</div>

<script type="text/javascript" src="analytics.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion production

0 comments on commit cc3c94d

Please sign in to comment.