-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fathom Event Tracking #2082
Fathom Event Tracking #2082
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good starting point ππ»
@route={{@route}} | ||
@models={{this.models}} | ||
...attributes | ||
{{on "click" (fn this.eventTracking.trackEvent @eventName)}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dhaulagiri while discussing modifiers with @aklkv he mentioned that this could be a custom modifier (it would make the code cleaner). He can probably expand on this more, but something to consider, it would look something like this: {{doc-track-event @eventName}}
(all the logic would be isolated in the modifier)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh, that sounds interesting. Admittedly I built this based on my very stale ember knowledge, so if there is a more idiomatic, current way to do this I'm open to refactoring this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
I'm going to merge what I have here for now. I'll make a note about the modifier suggestion and add it to a follow-up epic I'm building for this work. |
π Summary
This PR creates an event tracking service to send events to Fathom and wires up a few proposed events as a starting point
π οΈ Detailed description
Under the hood this is built using a Service which can be injected wherever we want to track events. I tried to keep the naming relatively agnostic as, in theory, Fathom could be replaced at some point.
πΈ Screenshots
π¬ Please consider using conventional comments when reviewing this PR.