Skip to content

feat(get): count installs with analytics engine - #33

Merged
JheisonMB merged 2 commits into
mainfrom
develop
Jul 28, 2026
Merged

feat(get): count installs with analytics engine#33
JheisonMB merged 2 commits into
mainfrom
develop

Conversation

@JheisonMB

@JheisonMB JheisonMB commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Promotes #32 to production. The diff against main is exactly that change — nothing else has accumulated on develop.

This one deploys. The Deploy get worker Action runs wrangler deploy on any push to main touching workers/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 with wrangler dev: 302 to install.sh, 302 to install.ps1, 404 for no-Windows, 404 for unknown tool, 302 at root.

After merging

  • Confirm the Action succeeded. If it fails on the Analytics Engine binding, the deploy token needs the permission — the failure is loud, not silent.
  • Hit https://get.univerlab.org/demostage and check it still 302s to GitHub.
  • The dataset univerlab_installs is created automatically on the first write; nothing to provision.

Reading the data

Analytics Engine has no dashboard and wrangler has 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 in workers/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 | sh sends no Referer, so launch attribution is by time correlation rather than referrer.

@JheisonMB JheisonMB added the target:main Targets the main branch label Jul 28, 2026
@JheisonMB
JheisonMB merged commit 68e3bc8 into main Jul 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target:main Targets the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant