@contractspec/lib.analytics
v3.7.27
Published
Product analytics and growth metrics
Maintainers
Readme
@contractspec/lib.analytics
Website: https://contractspec.io
Product analytics and growth metrics.
What It Provides
- Layer: lib.
- Consumers: bundles, apps.
- Related ContractSpec packages include
@contractspec/lib.contracts-integrations,@contractspec/lib.contracts-spec,@contractspec/lib.lifecycle,@contractspec/tool.bun,@contractspec/tool.typescript. - Related ContractSpec packages include
@contractspec/lib.contracts-integrations,@contractspec/lib.contracts-spec,@contractspec/lib.lifecycle,@contractspec/tool.bun,@contractspec/tool.typescript.
Installation
npm install @contractspec/lib.analytics
or
bun add @contractspec/lib.analytics
Usage
Import the root entrypoint from @contractspec/lib.analytics, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/churnis part of the package's public or composition surface.src/cohortis part of the package's public or composition surface.src/funnelis part of the package's public or composition surface.src/growthis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/lifecycleis part of the package's public or composition surface.src/posthogis part of the package's public or composition surface.src/types.tsis shared public type definitions.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./churnresolves through./src/churn/index.ts. - Export
./churn/predictorresolves through./src/churn/predictor.ts. - Export
./cohortresolves through./src/cohort/index.ts. - Export
./cohort/trackerresolves through./src/cohort/tracker.ts. - Export
./funnelresolves through./src/funnel/index.ts. - Export
./funnel/analyzerresolves through./src/funnel/analyzer.ts. - Export
./growthresolves through./src/growth/index.ts. - Export
./growth/hypothesis-generatorresolves through./src/growth/hypothesis-generator.ts. - Export
./lifecycleresolves through./src/lifecycle/index.ts. - The package publishes 16 total export subpaths; keep docs aligned with
package.json.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run test— bun test --pass-with-no-testsbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsc --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
Notes
- Event naming conventions must stay consistent with PostHog taxonomy.
- Metric calculations affect live dashboards; verify formulas before changing.
