Use Segment.io’s Ruby library to track usage patterns within a Rails application.

Read more at the source