Google Analytics events

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-25 22:42:53 +01:00
parent 48cd95a11e
commit 5aadb5ab4f
6 changed files with 40 additions and 8 deletions

View File

@@ -252,6 +252,7 @@ function embed_code(autoplay, width, height, color, embed_code){
function change_offline(enabled, already_offline){
Crypt.set_offline(enabled);
offline = enabled;
ga('send', 'event', "button-click", "offline", "", offline ? 1 : 0);
socket.emit("offline", {status: enabled, channel: chan != undefined ? chan.toLowerCase() : ""});
if(!Helper.mobilecheck()) {
$("#offline-mode").tooltip('remove');