From 043b1ae08ad35270ea269316c3f67b89adce3d5a Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Sun, 9 Mar 2014 23:58:41 +0100 Subject: [PATCH] add analytics --- index.html | 9 +++++++++ js/html_actuator.js | 1 + style/main.css | 2 +- style/main.scss | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index d2009ff..cca0fa6 100644 --- a/index.html +++ b/index.html @@ -62,5 +62,14 @@ Created by Gabriele Cirulli. Based on 1024 by Veewo Studio.

+ diff --git a/js/html_actuator.js b/js/html_actuator.js index a73fdb1..7f47788 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -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); }; diff --git a/style/main.css b/style/main.css index b7d9621..1a1b8f7 100644 --- a/style/main.css +++ b/style/main.css @@ -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; diff --git a/style/main.scss b/style/main.scss index 3d81a13..a224dcc 100644 --- a/style/main.scss +++ b/style/main.scss @@ -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; -- GitLab