add analytics
This commit is contained in:
@@ -62,5 +62,14 @@
|
||||
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio.</a>
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,"script","//www.google-analytics.com/analytics.js","ga");
|
||||
|
||||
ga("create", "UA-42620757-2", "gabrielecirulli.github.io");
|
||||
ga("send", "pageview");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -89,4 +89,5 @@ HTMLActuator.prototype.updateScore = function (score) {
|
||||
HTMLActuator.prototype.message = function (won) {
|
||||
var type = won ? "game-won" : "game-over";
|
||||
this.gameContainer.classList.add(type);
|
||||
if (ga) ga("send", "event", "game", "end", type, this.score);
|
||||
};
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ h1.title {
|
||||
position: relative;
|
||||
float: right;
|
||||
background: #bbada0;
|
||||
padding: 15px 20px;
|
||||
padding: 15px 25px;
|
||||
font-size: 25px;
|
||||
height: 25px;
|
||||
line-height: 47px;
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ h1.title {
|
||||
position: relative;
|
||||
float: right;
|
||||
background: $game-container-background;
|
||||
padding: 15px 20px;
|
||||
padding: 15px 25px;
|
||||
font-size: $height;
|
||||
height: $height;
|
||||
line-height: $height + 22px;
|
||||
|
||||
Reference in New Issue
Block a user