theodinproject
theodinproject copied to clipboard
Chore: Dashboard Button Tracking in Google Analytics
Description
We don't have any visibility of dashboard button usage in GA.
Acceptance Criteria
- Track "Resume" button clicks
- Track "Start" button clicks
- Track "Open" button clicks
Additional Information
All of our GA tracking code is in this file: https://github.com/TheOdinProject/theodinproject/blob/main/app/javascript/src/js/analytics.js
example event:
_gaq.push(['_trackEvent', 'dashboard_buttons', 'resume', 'dashboard', 1]);
On a somewhat related note, I had this question when I looked at analytics.js: Is there any significant performance hit from using that many $ calls instead of, say, using the onclick attribute? There's a good Stack Overflow answer for this question: https://stackoverflow.com/questions/19973329/jquery-performance-on-versus-onclick TL;DR: No, it shouldn't matter. (Sorry in advance if this an already known fact, I'm new to the Odin Project)
Thats a good call out @FnControlOption. We haven't noticed anything significant in our performance monitoring tools. But it is likely having some impact.
The tracking code could do with being refactored and modernised. We could also get rid of the trackers for every internal and external link. Those have never been useful in all the time I've been here.
I could work on this. Would it be worth removing the jquery at the same time?
Would it be worth removing the jquery at the same time?
I didn't want to saddle anyone with that when creating the story 😆
But if you're up for doing it, absolutely mate.
yeah its cool, ill wash my hands after don't worry