Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

active_analytics

> 后端框架
Open source

First-party, privacy-focused traffic analytics for Ruby on Rails applications.

514 stars0 likes0 views
WebsiteGitHub

About

First-party, privacy-focused traffic analytics for Ruby on Rails applications.

ActiveAnalytics

Simple traffic analytics for the win of privacy.

  • NO cookies
  • NO JavaScript
  • NO third parties
  • NO bullshit

ActiveAnalytics is a Rails engine directly mountable in your Ruby on Rails application. It doesn't reveal anything about specific visitors. It cannot be blocked by adblockers or other privacy-protecting extensions (and doesn't need to).

ActiveAnalytics lets you know about:

  • Sources: What are the pages and domains that bring some traffic.
  • Page views: What are the pages that are the most viewed in your application.
  • Next/previous page: What are the entry and exit pages for a given page of your application.
  • Browser statistics: What browsers and which versions are visiting your site.

Installation

Add this line to your application's Gemfile:

ruby
gem 'active_analytics'

Then execute bundle and run the migration:

bash
bundle
rails active_analytics:install:migrations
rails db:migrate

Add the route to ActiveAnalytics dashboard at the desired endpoint:

ruby
# config/routes.rb
mount ActiveAnalytics::Engine, at: "analytics"  # http://localhost:3000/analytics

By default ActiveAnalytics will extend ActionController::Base, but you can specify a custom base controller for the ActiveAnalytics dashboard:

ruby
# config/initializers/active_analytics.rb
Rails.application.configure do
  ActiveAnalytics.base_controller_class = "AdminController"
end

The next step is to collect trafic and there is 2 options.

Record requests synchronously

This is the easiest way to start with. However it's less performant since it triggers a write into your database for each request. Your controllers have to call ActiveAnalytics.record_request(request) to record page views. The Rails way to achieve is to use after_action :

ruby
class ApplicationController  (u) { u.admin? } do # Supposing there is a User#admin? method
  mount ActiveAnalytics::Engine, at: "analytics" # http://localhost:3000/analytics
end

License

The gem is available as open-source under the terms of the MIT License.

Made by Base Secrète.

Rails developer? Check out RoRvsWild, our Ruby on Rails application monitoring tool.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyanalyticsprivacyrailsruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架