Skip to content

Commit

Permalink
Update GA
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderwapstra committed Mar 16, 2021
1 parent e9a4689 commit 817cd2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/AddArtistForm/AddArtistForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ const AddArtistForm: React.FC = () => {
console.error(`❌ Adding artist failed: ${err}`);
}

ReactGA.event({
category: 'Artists',
action: 'User added an artist',
});

if (results && results.artists && results.artists.items.length > 0) {
ReactGA.event({
category: 'Artists',
action: 'User added an artist',
label: results.artists.items[0].name,
});

dispatch(addArtist(results.artists.items[0]));

formRef.current?.reset();
Expand Down
1 change: 1 addition & 0 deletions src/components/GeneratePlaylist/GeneratePlaylist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const GeneratePlaylist: React.FC = () => {
action: name
? 'User has chosen a custom name'
: 'User did not chose a custom name',
label: name || undefined,
});

const [err, playlist] = await to(
Expand Down

0 comments on commit 817cd2e

Please sign in to comment.