Conversation
feat(get): count installs with analytics engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes #32 to production. The diff against
mainis exactly that change — nothing else has accumulated ondevelop.This one deploys. The Deploy get worker Action runs
wrangler deployon any push tomaintouchingworkers/get/**, so merging makes the Worker start recording immediately.What ships
Aggregate install counting on
get.univerlab.org, via Analytics Engine: tool, platform (sh/ps1), coarse client class, country, referrer host, and outcome (redirect/unknown-tool/no-windows). No IPs, no full user-agents, no cookies.The redirect behaviour is unchanged. The binding is optional in code and the write sits in a
try/catch, so a telemetry failure cannot break an install. Verified locally withwrangler dev: 302 toinstall.sh, 302 toinstall.ps1, 404 for no-Windows, 404 for unknown tool, 302 at root.After merging
https://get.univerlab.org/demostageand check it still 302s to GitHub.univerlab_installsis created automatically on the first write; nothing to provision.Reading the data
Analytics Engine has no dashboard and
wranglerhas no command for it, so the SQL API is the only way in and it needs a long-lived token. That is unresolved on purpose — query tooling is kept untracked inworkers/get/scripts/rather than shipping a pattern that puts plaintext credentials on a laptop. Options are written up in the README.Until then, the Workers dashboard shows total request counts, which is enough to spot a launch spike without any token.
Note that
curl | shsends noReferer, so launch attribution is by time correlation rather than referrer.