mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
72 lines
2.4 KiB
Plaintext
72 lines
2.4 KiB
Plaintext
---
|
|
title: Analytics & Telemetry
|
|
description: What we collect, how to disable it, and where to view aggregated insights
|
|
---
|
|
|
|
## What is collected
|
|
|
|
On successful project creation, the CLI sends a single event (`project_created`) with:
|
|
|
|
- Selected options (stack choices): `frontend`, `backend`, `runtime`, `database`, `orm`, `api`, `auth`, `addons`, `examples`, `dbSetup`, `webDeploy`, `packageManager`
|
|
- Environment data: `cli_version`, `node_version`, `platform`
|
|
- A random session id: `distinct_id` like `cli_<random>`
|
|
- IP removed: `$ip: null`
|
|
|
|
Not collected:
|
|
|
|
- Project name, path, or file contents (explicitly omitted)
|
|
- Secrets or environment variables from your machine
|
|
|
|
|
|
|
|
## Disable telemetry
|
|
|
|
Telemetry is enabled by default. To disable:
|
|
|
|
<Tabs items={['bun', 'pnpm', 'npm']}>
|
|
<Tab value="bun">
|
|
```bash
|
|
# Disable for a single run
|
|
BTS_TELEMETRY_DISABLED=1 bun create better-t-stack@latest
|
|
```
|
|
</Tab>
|
|
<Tab value="pnpm">
|
|
```bash
|
|
# Disable for a single run
|
|
BTS_TELEMETRY_DISABLED=1 pnpm create better-t-stack@latest
|
|
```
|
|
</Tab>
|
|
<Tab value="npm">
|
|
```bash
|
|
# Disable for a single run
|
|
BTS_TELEMETRY_DISABLED=1 npx create-better-t-stack@latest
|
|
```
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
Add `export BTS_TELEMETRY_DISABLED=1` to your shell profile to make it permanent.
|
|
|
|
## Where to view analytics
|
|
|
|
- Charts: [`/analytics`](/analytics)
|
|
- Raw JSON snapshot: `https://r2.better-t-stack.dev/analytics-data.json`
|
|
- CSV export: `https://r2.better-t-stack.dev/export.csv`
|
|
|
|
Notes:
|
|
|
|
- Aggregates are periodically regenerated from incoming events
|
|
- Raw data is not publicly exposed; the `/analytics` page presents only summary statistics
|
|
|
|
## Full transparency
|
|
|
|
Single event per scaffold; randomized id; no IP or project identifiers. See source code below.
|
|
|
|
If in doubt, set `BTS_TELEMETRY_DISABLED=1` and proceed. You can still use all CLI features.
|
|
|
|
## Source code
|
|
|
|
- CLI event sender: [`apps/cli/src/utils/analytics.ts`](https://github.com/AmanVarshney01/create-better-t-stack/blob/main/apps/cli/src/utils/analytics.ts)
|
|
- Telemetry toggle logic: [`apps/cli/src/utils/telemetry.ts`](https://github.com/AmanVarshney01/create-better-t-stack/blob/main/apps/cli/src/utils/telemetry.ts)
|
|
- Aggregation script (builds the charts data): [`apps/web/scripts/generate-analytics.ts`](https://github.com/AmanVarshney01/create-better-t-stack/blob/main/apps/web/scripts/generate-analytics.ts)
|
|
|