-
Notifications
You must be signed in to change notification settings - Fork 0
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
Measure user usage of the Cribbage Trainer automatically deployed to GitHub Pages #21
Comments
I'm currently investigating whether Google Analytics will suffice as a starting point to provide basic user usage info. |
Consider adding per user action tracking as well for:
in order to measure how much users use the app per page load. (#6 will affect these analytics, allowing users to stay on the same page without reloading for multiple hands.) |
The Google Analytics Terms and Conditions requires a Privacy Policy and user consent to Google Analytics cookies and/or local storage in section 7. Privacy:
Working on that now.
|
Adding Storybook to more effectively iterate on the Google Analytics consent widget before incorporating it into the main user interface.
|
Storybook does not appear to support Parcel. Default Storybook instructions only show how to use it with Webpack and Vite. Vite seems to be more future-proof and its use of ECMAScript modules very likely works with the evergreen browsers this project is targeting. Perhaps consider a move to Vite via this migration guide from Parcel) as a supported path to using Storybook? There's no obvious sign of Parcel support coming to Storybook and a move to Vite would buy some local development performance gains. Also, Storybook based UI component development looks rather awesome!
|
TIL: The GitHub Pages Action has a feature in development to: The feature is still in non-public alpha, but let's monitor to enable the possibility of deploys to a preview site from PRs. |
Install and use of Vite followed by disuse and uninstall of Parcel may be easier and another than using a third party migration guide. |
Replaced Parcel with Vite in 633c7d6. |
The
|
Storybook with Card stories added in 4281a13. |
|
Storybook Test Runner incorporated in local and GitHub Actions checks in 81f6df8. |
PR branch getting too big: 9,654 lines added and 3,421 lines removed. I think I'll start merging the supporting changes for the resolution of this issue into |
Automated local serving of Storybook for Storybook tests in the 21-measure-cribbage-trainer-github-pages-usage branch to automate one sometimes needed local development separate step. |
Adding Storybook well will likely require modifying how the existing components work as stories are added. TODO:
|
822cfae pushed to this branch and draft PR to simplify the Card component to fire events instead of directly modifying state via parent component overall hand state hook calls. |
|
Probably |
PR has gotten too big. Will merge it into Issue resolution strategy remains the same: supporting technical infrastructure before feature + issue remains open until both technical support and the feature are complete with minimal technical debt, where all technical debt is captured in Issues. |
TODO:
|
First three commits of the PR (#27) now exist in
Next: add Storybook in |
Next three commits of the PR (#27) now exist in
Next: use the Storybook Test Runner. |
All dependencies except I'll defer on upgrading to ESLint 9 for now, waiting until at least a non-alpha, |
I had a quick look over Mixpanel and Clicky as alternatives to using Google Analytics, and concluded that because Google Analytics is suitable for both now (small-scale, growing app) and the future (during the growth phase), I'll stick with Google Analytics as the initial analytics provider for Cribbage Trainer. |
All dependencies except |
"Add the user consent component to the main application user interface" TODO almost ready for push to branch: functional code is complete, style is complete, unit test coverage is almost complete. |
"Add the user consent component to the main application user interface" TODO added in draft PR #151. Will still need "Add the Privacy Policy component to the main application user interface" and "Use Google Analytics in the GitHub Pages deployed version of Cribbage Trainer when consented to by the user" TODOs done before that PR can be merged and deployed, as all three parts are required together for the production app to make sense. |
Privacy Policy improved upon in #151. TODO: add Policy to UI from both analytics consent dialog and main app UI. |
TODO
|
Local storage explanation for non-technical readers added to Privacy Policy in #151. |
Cookies section of Privacy Policy simplified in #151. |
Data Sharing section of Privacy Policy simplified in #151. |
Privacy Policy content improvements complete in #151. |
Google Analytics says "Your Google tag wasn't detected on your website." after running its test. I concur: no Google Analytics getting loaded in production. Why not? |
2024-09-22T23:53:43-04: Google Analytics 4 tag now detected on the production Cribbage Trainer site. Fix was to use the |
However, my Firefox client is not loading the GA script. Investigation continues... |
uBlock was blocking Google Tag Manager in Firefox. Reconfiguration of Firefox uBlock to allow Google Tag Manager on https://markafitzgerald1.github.io/cribbage-trainer/ resolved that issue. Google Tag Manager also loading in my Chrome. No additional traffic sent that I can see on accept of analytics. No traffic showing from my Firefox or my Chrome in the Google Analytics Realtime view or Home Page (Dashboard). |
Adding the Google Analytics advised script tags:
directly to Now that we have a known working state, can compare against current |
The issue was that the Google Analytics gtag function used the The fix was to go back to using the |
Issue fixed in #161, deployed 20240924T001458-04 and confirmed working T001902-04. |
Event tracking looks correct in Google Analytics. Will leave this issue open at least a day or two to confirm analytics are gathered for users that are not me. :) |
I'm not certain that analytics events on discard selection and deselection is useful at present. Will ponder before explicitly deciding whether to do that in this Issue or not. (Base GA tracking may be enough for current needs and to close this Issue.) |
It may be more effective to not track any custom app events in this issue. Instead, the events to up track can be selected in order to help decide whether and when to build new features, and to measure the impacts of new features. |
Analytics still seems to be working. Ideas after this issue closes:
|
#164 opened to get some sort of measure of usage by Google Analytics blocking users. |
All done! |
At present there is no available measure of how much traffic the automatically deployed to GitHub Pages version of Cribbage Trainer is getting, if any.
Add some sort of tracker so that once the application is getting traffic, it's application development and roadmap can be adjusted and fine-tuned based on its global usage information and trends.
The text was updated successfully, but these errors were encountered: