From 119d8ecdd0182290fa698f726a38092969ba23f4 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Wed, 12 Mar 2014 13:05:55 +0100 Subject: [PATCH] restore ga in gh-pages --- js/html_actuator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/html_actuator.js b/js/html_actuator.js index c697dab..1892087 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -117,6 +117,10 @@ HTMLActuator.prototype.message = function (won) { var type = won ? "game-won" : "game-over"; var message = won ? "You win!" : "Game over!"; + if (typeof ga !== "undefined") { + ga("send", "event", "game", "end", type, this.score); + } + this.messageContainer.classList.add(type); this.messageContainer.getElementsByTagName("p")[0].textContent = message; -- GitLab