talira

Simple, powerful, first-party analytics for Rails

open sourceMITself-hostablefree

Ahoy tracks visits and events in Rails apps and stores them in your own database: each visit records the referrer, landing page, UTM parameters, browser, OS, device and (with Geocoder) location, and is linked to the signed-in user. Events can be tracked from Ruby, from JavaScript with the ahoy.js package, from native iOS and Android apps and from AMP pages, and models such as orders can be tied to the visit that brought them. It has options for GDPR (IP masking, anonymity sets instead of cookies), leaves out bots by default, and custom data stores can send events to Kafka, RabbitMQ, Kinesis Firehose and others. Andrew Kane (ankane) wrote it, the README says it's battle-tested at Instacart, and Ahoy Email (ahoy_email) is a separate gem for email analytics.

Problems it solves

  • track page views and custom events in my Rails app without sending data to Google
  • keep analytics in our own Postgres database so we can query it with SQL
  • find out which referrer or UTM campaign each signup and order came from
  • connect a visitor's anonymous visits to their account once they log in
  • log events like 'added to cart' from both the server and the browser
  • visitor tracking that works without cookies to keep GDPR simple
  • mask visitors' IP addresses before they're stored
  • build signup funnels from our own event data instead of paying for an analytics SaaS
  • see which cities and devices customers use, geocoded on our own servers
  • track events from our iOS and Android apps into the same Rails backend
  • send tracked events to Kafka or Kinesis instead of the main database as traffic grows
  • count unique visitors and visits in a Rails app
  • query tracked events by their JSON properties in Active Record

Features

  • visits with referrer, landing page, UTM parameters, browser, OS and device
  • events from Ruby, JavaScript (ahoy.js), native apps and AMP
  • visitable models tied to the visit that created them
  • current user attached automatically, including Devise and Doorkeeper
  • geocoding in a background job, locally or from load balancer headers
  • IP masking and cookieless anonymity sets for GDPR
  • bots excluded by default, with custom exclusion rules
  • where_event, where_props and group_prop queries on events
  • custom data stores (Kafka, RabbitMQ, Fluentd, NATS, NSQ, Kinesis Firehose examples)
  • API-only mode and server-side or JavaScript-only visit creation

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what Ahoy does.

  1. Umami Privacy-first web and product analytics; no cookies, self-hosted or in the cloud
  2. PostHog Product analytics, session replay, feature flags, experiments and more in one platform
  3. Plausible Analytics Open source, privacy-first web analytics; a lightweight, cookie-free Google Analytics alternative
  4. Matomo Open-source alternative to Google Analytics with full data ownership
  5. Heap Better insights. Faster.

Compare Ahoy with the top 3