Ahoy is a first-party analytics library built primarily for Ruby on Rails, designed to let applications track visits and events in a clean, integrated way rather than relying on third-party tooling. It stores data in your own database by default, which gives developers full control over what data is captured, how it's processed, and how it’s used, sidestepping privacy concerns of external analytics providers. The library supports Rails, JavaScript, and native apps, making it flexible across front-end/back-end and mobile contexts. Because it’s designed for developers who already own their data stack, Ahoy encourages self-hosted analytics workflows, custom reporting, and integration with existing database infrastructure. It includes features for tracking visits (sessions), events (actions), and user properties, so you can introspect user journeys and behaviour within your application domain.
Features
- Visit tracking across sessions and devices
- Event tracking with custom metadata
- Native support for Ruby on Rails plus JavaScript/Native hooks
- Data stored in your own database for full control
- Customizable visits/events schema for extensibility
- Integration with your existing database/ORM/reporting stack