Analytics
This commit is contained in:
@ -49,6 +49,15 @@ const UIMiddleware = (function(){
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'SPOTIFY_IMPORT_AUTHORIZATION':
|
||||
var label = null
|
||||
if (action.me && action.me.id){
|
||||
label = action.me.id
|
||||
}
|
||||
ReactGA.event({ category: 'Spotify', action: 'Authorization imported', label: label })
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'ALBUM_LOADED':
|
||||
if (action.data) ReactGA.event({ category: 'Album', action: 'Load', label: action.album.uri })
|
||||
|
||||
@ -134,6 +143,11 @@ const UIMiddleware = (function(){
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'PUSHER_ERROR':
|
||||
ReactGA.event({ category: 'Pusher', action: 'Error', label: action.message })
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'SEARCH_STARTED':
|
||||
ReactGA.event({ category: 'Search', action: 'Started', label: action.type+': '+action.query })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user