@adrper79-dot/analytics
Dual-track analytics: PostHog for product analytics and a first-partyfactory_events table for business intelligence. Depends on @adrper79-dot/errors and @adrper79-dot/neon.
Installation
Secrets required
Database
Run the DDL constant to create the table:API
track(opts)
Sends an event to PostHog and inserts into factory_events.
identify(opts)
Creates or updates a PostHog person profile.
getEvents(db, opts)
Queries factory_events with optional filtering.