百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

active_analytics

> 后端框架
开源

针对 Ruby on Rails 应用程序的第一方、以隐私为核心的流量分析。

514 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

针对 Ruby on Rails 应用程序的第一方、以隐私为核心的流量分析。

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyanalyticsprivacyrailsruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

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