Recommendations analytics

This commit is contained in:
James Barnsley
2017-05-16 13:05:35 +12:00
parent 76cfd66f1f
commit 3b4a7d2c64
2 changed files with 9 additions and 1 deletions

View File

@ -58,6 +58,13 @@ const UIMiddleware = (function(){
next(action)
break
case 'SPOTIFY_RECOMMENDATIONS_LOADED':
if (action.seeds_uris){
ReactGA.event({ category: 'Spotify', action: 'Recommendations', label: action.seeds_uris.join(',') })
}
next(action)
break
case 'ALBUM_LOADED':
if (action.data) ReactGA.event({ category: 'Album', action: 'Load', label: action.album.uri })