Remove listeners on unmount of auth frames; Removing user hash

This commit is contained in:
James Barnsley
2019-04-22 15:08:38 +12:00
parent f89e44e184
commit 4cae019e17
7 changed files with 188 additions and 173 deletions

View File

@ -27,12 +27,7 @@ const SpotifyMiddleware = (function(){
case 'SPOTIFY_AUTHORIZATION_REVOKED':
if (store.getState().ui.allow_reporting){
var hashed_username = null
if (store.getState().spotify.me){
hashed_username = sha256(store.getState().spotify.me);
ReactGA.set({userId: hashed_username});
}
ReactGA.event({ category: 'Spotify', action: 'Authorization revoked', label: hashed_username});
ReactGA.event({ category: 'Spotify', action: 'Authorization revoked'});
}
next(action);