-
Notifications
You must be signed in to change notification settings - Fork 51
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
Feat env injection #28
base: main
Are you sure you want to change the base?
Conversation
Thanks, this is a really nice contribution. For future reference, we have a Contributing Guide and require a Contributor License Agreement (CLA) to be signed before contributions can be merged. I separately implemented a bunch of similar package upgrades and associated fixes today in the course of getting releases working again. I particularly like the idea of supporting multiple analytics accounts. It would be awesome if we could have a handful of sites gathering the same analytics and then combining data in the releases. I think we should flesh out the logistics around that a bit before merging those changes, but it's a good general direction. |
I have 2 thoughts in mind
|
Agreed, I think that contributing data should be as simple as dropping in a single script tag on a site, the script should be open source and auditable, and the script should be as minimal as possible while serving its purpose. Google Analytics was a convenient starting point because 1) it handles data storage and read/write API access in an easy way out of the box, 2) it has some built-in abuse prevention mechanisms that makes it harder to poison data, 3) is GDPR compliant, and 4) it automatically collects some fields and the inference of others (e.g. browser size, device category, screen resolution). A possible alternative would be to store the data in something like DynamoDB, create a Lambda function to process analytics requests and log them to the database, and then to serve a small script that collects the required fields and reports them to the API endpoint. There's a bit of complexity in getting the infrastructure and CD setup for that, but it would make it much easier to add new fields to the data that's collected and for people to opt-in to contributing data. Any thoughts on that general approach or alternatives? |
b94b256
to
c6f6507
Compare
Seems good to me for this one. |
.env.example
DEBUG="user-agents:*" npm run update-data