Track repository adoption paths in PostHog
Record creation, import, and fork outcomes after storage and domain writes. Classify import providers without sending private URLs or repository names. Keep agent identities separate from human engagement. Enable collection through the production deploy command, not local config. Plannotator review returned no changes requested. All 103 tests, typecheck, production build, deployment dry run, and diff checks pass.
3 decisions
Measure new projects, imports, forks, and provisioning failures as separate repository outcomes.
Why
- An import does not prove migration or repeated use
- Success requires completed storage provisioning and a domain event write
- Fixed provider and failure categories exclude private input data
Touches
analytics.tsindex.tsproduct-analytics.md
Keep repository agent events on session identities rather than human identities.
Why
- Agent activity must not inflate human engagement
- The owner relationship preserves attribution without account details
Touches
analytics.ts
Enable PostHog collection through the production deploy command while leaving local configuration disabled.
Why
- The owner requests live testing after each reviewed set
- Local and test activity must not pollute pilot measurements
Touches
package.jsonproduct-analytics.md
6 files changed · +351 −13
apps/backend/analytics.ts+53 −8
apps/backend/index.ts+14 −2
apps/backend/test/provision-analytics.test.ts+150 −0
apps/backend/test/repository-analytics.test.ts+93 −0
docs/product-analytics.md+40 −2
package.json+1 −1