docs/content/docs/reference/telemetry.mdx
Better Auth collects anonymous usage data to help us improve the project. This is optional, transparent, and disabled by default.
Since v1.3.5, Better Auth collects anonymous telemetry data about general usage if enabled.
Telemetry data helps us understand how Better Auth is being used across different environments so we can improve performance, prioritize features, and fix issues more effectively. It guides our decisions on performance optimizations, feature development, and bug fixes. All data is collected completely anonymously and with privacy in mind, and users can opt out at any time. We strive to keep what we collect as transparent as possible.
The following data points may be reported. Everything is anonymous and intended for aggregate insights only.
package.json name and optionally baseURL). This lets us de‑duplicate events per project without knowing who you are.{ name: "node" | "bun" | "deno", version }.development, production, test, or ci.{ name, version } for frameworks like Next.js, Nuxt, React Router, Astro, SvelteKit, etc.{ name, version } for integrations like PostgreSQL, MySQL, SQLite, Prisma, Drizzle, MongoDB, etc.isDocker, isWSL, isTTY.{ name, version } derived from the npm user agent.betterAuth options produced by getTelemetryAuthConfig.We also collect anonymous telemetry from the CLI:
cli_generate): outcome generated | overwritten | appended | no_changes | aborted plus redacted config.cli_migrate): outcome migrated | no_changes | aborted | unsupported_adapter plus adapter id (when relevant) and redacted config.export const auth = betterAuth({
// [!code highlight]
telemetry: { // [!code highlight]
debug: true // [!code highlight]
} // [!code highlight]
});
All collected data is fully anonymous and only useful in aggregate. It cannot be traced back to any individual source and is accessible only to a small group of core Better Auth maintainers to guide roadmap decisions.
betterAuth configuration. Instead we send a reduced, redacted snapshot of non‑sensitive toggles and counts.You can enable telemetry collection in your auth config or by setting an environment variable.
Via your auth config.
export const auth = betterAuth({
// [!code highlight]
telemetry: { // [!code highlight]
enabled: true// [!code highlight]
} // [!code highlight]
});
Via an environment variable.
# Enable telemetry
BETTER_AUTH_TELEMETRY=1
# Disable telemetry
BETTER_AUTH_TELEMETRY=0
betterAuth initialization (type: "init").generate and migrate as described above.Telemetry is disabled automatically in tests (NODE_ENV=test) unless explicitly overridden by internal tooling.