-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Why**: To make it easier to use, and to allow for further simplification down the road. **How**: - Allow the `track_event` method to take a hash as a second argument, which allows adding various properties, rather than having to use the event title as a differentiator. For example, instead of having two event names to track success and failure scenarios, we only have one event name with different attributes. For example: `track_event(:auth, result: 'success')` and `track_event(:auth, result: 'failed')`. - By default, the `track_event` method assumes the user is the current_user or an instance of AnonymousUser. If you need to pass in a specific user, pass in a hash with the key `user_id` and the user's uuid as the value, such as `track_event(:password_reset, user_id: user_from_token.uuid)`. - Remove the `track_anonymous_event` method since it's no longer needed. - Remove the staccato gem and server-side Google Analytics since it doesn't support hash attributes for events. There are other services that can better suit our needs, such as Keen.io, or even storing the data in our own DB.
- Loading branch information
Showing
14 changed files
with
89 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.