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

Hello,

We have just released a Ruby gem you can use to analyze your traffic. It is a Rails engine, directly mountable in your Ruby on Rails application (no cookies or javascript tracker).

Source: [https://github.com/BaseSecrete/active\_analytics](https://github.com/BaseSecrete/active_analytics)

Blog: [https://www.basesecrete.com/active\_analytics.html](https://www.basesecrete.com/active_analytics.html)

7 thoughts on “ActiveAnalytics: First-party, privacy-focused traffic analytics for Ruby on Rails applications.”

  1. This is awesome!

    I’m purposely not using Google Analytics in my Rails apps because I don’t want to hand out my users’ info to a third party. Been rolling my own analytics, but will happily switch over once I have it tuned.

    BTW, I after loading the gem in my dev environment, when navigating to /analytics, I received Sprockets precompile errors for the application.css and application.js files.

    In my case, I had to add both files to my manifest.js.

    `//= link active_analytics/application.css`

    `//= link active_analytics/application.js`

    Reply
  2. Nice. I read your Readme and I like it. Can you add more stuff to Authentication and permissions section. I am building an api and I am doing token auth. Can I still use it?

    Reply
  3. Sounds interesting. But I’m afraid that bots or crawler can mess up your statistics because as I can see in the source code, there is no prevention to ignore them.

    Reply
  4. I was testing this gem with a Rails project that uses Devise and Pundit.

    After playing with a few ways of restricting the engine to signed-in admins I ended up wrapping the mount command in my routes.rb file with a permission check rather than using an initializer (like shown in the README).

    Probably not the most Rails-ish way to handle it, but got the job done without a bunch of extra code to integrate Devise.

    `authenticate :user, -> (u) { u.your_admin_flag? } do`

    `mount ActiveAnalytics::Engine, at: “analytics” # http://localhost:3000/analytics`

    `end`

    Reply

Leave a Comment