add analytics

This commit is contained in:
Gabriele Cirulli
2014-03-09 23:58:41 +01:00
parent e65111f13b
commit 043b1ae08a
4 changed files with 12 additions and 2 deletions
+1
View File
@@ -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);
};