move event send after type definition
[2048.git] / js / html_actuator.js
blob:a/js/html_actuator.js -> blob:b/js/html_actuator.js
--- a/js/html_actuator.js
+++ b/js/html_actuator.js
@@ -107,6 +107,8 @@
   var type    = won ? "game-won" : "game-over";
   var message = won ? "You win!" : "Game over!"
 
+  if (ga) ga("send", "event", "game", "end", type, this.score);
+
   this.messageContainer.classList.add(type);
   this.messageContainer.getElementsByTagName("p")[0].textContent = message;
 };

comments