Closed cawlin closed 6 years ago
Sending events seems pretty simple. Here's Google's documentation: https://developers.google.com/analytics/devguides/collection/analyticsjs/events
I propose we create an Event Category of "Favourites" and start by simply recording when someone "adds" a new favourite and when someone "removes" a favourite. We send an event every time someone clicks a star:
Add Event:
ga('send', { hitType: 'event', eventCategory: 'Favourites', eventAction: 'add', eventLabel: 'Monster Name' });
Remove Event
ga('send', { hitType: 'event', eventCategory: 'Favourites', eventAction: 'remove', eventLabel: 'Monster Name' });
The event Label ("Monster Name") would actually be the name of the monster being added or removed Ie. <%= @monster.name %>
Sending events seems pretty simple. Here's Google's documentation: https://developers.google.com/analytics/devguides/collection/analyticsjs/events
I propose we create an Event Category of "Favourites" and start by simply recording when someone "adds" a new favourite and when someone "removes" a favourite. We send an event every time someone clicks a star:
Add Event:
Remove Event
The event Label ("Monster Name") would actually be the name of the monster being added or removed Ie. <%= @monster.name %>