Welcome to the readme of ReMark Analytics. This library is used to emit events
from Ruby applications to the ReMark Analytics API in order for ReMark's Data Analytics team to do magic with the built up data set.
Installation
Add this line to your application's Gemfile:
gem 'remark_analytics'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install remark_analytics
Configuration
Make sure the following keys and their values become available in your application's ENV collection
- REMARK_ANALYTICS_URL (the url of the ReMark Analytics application)
- REMARK_ANALYTICS_USERNAME (the Basic Authentication user name)
- REMARK_ANALYTICS_PASSWORD (the Basic Authentication user password)
- REMARK_ANALYTICS_TENANT_NAME (the name of the tenant/client)
or prevent the raise of missing secrets errors by setting just one secret
- NO_REMARK_ANALYTICS (any value is good enough; true or yes, foo)
Usage
Examples:
RemarkAnalytics::Event.emit({
name: 'event_name_that_is_easy_to_understand',
resource_id: resource.id,
resource_type: 'Dossier',
data: {
outcome: resource.outcome,
by_system: resource.by_system,
other_attribute: 'some value'
}
})