Add analytics to your Ruby and Ruby on Rails apps and gems with the Snowplow event tracker for Ruby.
Snowplow is a scalable open-source platform for rich, high quality, low-latency data collection. It is designed to collect high quality, complete behavioral data for enterprise business.
To find out more, please check out the Snowplow website and our documentation.
Add this gem to your Gemfile. It is compatible with Ruby versions 2.1 to 3.0+.
gem "snowplow-tracker", "~> 0.8.0"
See our demo app for an example of implementing the Ruby tracker in a Rails app.
Snowplow Docs | API Docs | Contributing |
---|---|---|
Snowplow Docs | API Docs | Contributing |
Clone this repo and navigate into the cloned folder. To run the tests locally, you will need Docker installed.
docker build . -t ruby-tracker
docker run -v "$(pwd)":"/code" ruby-tracker
The -v
flag for docker run
creates a bind mount for the project directory. This means that changes to the files will be automatically applied within the Docker image. However, if you modify the Gemfile
or snowplow-tracker.gemspec
files, the image must be rebuilt.
Alternatively, test directly by installing Ruby 2.1+ and Bundler. Then run:
bundle install
rspec
To generate documentation using YARD, make sure the YARD and redcarpet gems are installed locally. Then run:
yard doc
Feedback and contributions are welcome - if you have identified a bug, please log an issue on this repo. For all other feedback, discussion or questions please open a thread on our Discourse forum.
The Snowplow Ruby Tracker is copyright 2013-2021 Snowplow Analytics Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.