Ahoy
Simple, powerful, first-party analytics for Rails
...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.