Skip to content
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

Merged
merged 3 commits into from
May 22, 2024
Merged

Fathom Event Tracking #2082

merged 3 commits into from
May 22, 2024

Conversation

Dhaulagiri
Copy link
Contributor

@Dhaulagiri Dhaulagiri commented May 8, 2024

πŸ“Œ 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

Screenshot 2024-05-17 at 14 32 51

πŸ’¬ Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview May 22, 2024 2:30pm
hds-website βœ… Ready (Inspect) Visit Preview May 22, 2024 2:30pm

Copy link
Contributor

@heatherlarsen heatherlarsen left a 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 πŸ‘πŸ»

@Dhaulagiri Dhaulagiri requested a review from a team May 21, 2024 18:31
@route={{@route}}
@models={{this.models}}
...attributes
{{on "click" (fn this.eventTracking.trackEvent @eventName)}}
Copy link
Contributor

@didoo didoo May 21, 2024

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘

@Dhaulagiri
Copy link
Contributor Author

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.

@Dhaulagiri Dhaulagiri merged commit dfe40a7 into main May 22, 2024
12 checks passed
@Dhaulagiri Dhaulagiri deleted the br-events branch May 22, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants