analytics

This commit is contained in:
Mo Bitar
2017-04-18 18:35:00 -05:00
parent db4080924e
commit 0fcd439736
2 changed files with 27 additions and 1 deletions

View File

@@ -24,6 +24,14 @@ angular.module('app.frontend')
}
}
this.getUserAnalyticsId = function() {
if(!this.user || !this.user.uuid) {
return null;
}
// anonymize user id irreversably
return Neeto.crypto.hmac256(this.user.uuid, Neeto.crypto.sha256(localStorage.getItem("pw")));
}
this.offline = function() {
return !this.user;
}