ddeyoung/delayed_kiss

View on GitHub
README.textile

Summary

Maintainability
Test Coverage
!https://secure.travis-ci.org/ddeyoung/delayed_kiss.png?branch=master(Build Status)!:http://travis-ci.org/ddeyoung/delayed_kiss "!https://codeclimate.com/github/ddeyoung/delayed_kiss.png!":https://codeclimate.com/github/ddeyoung/delayed_kiss

h1. Delayed Kiss Metrics

A simple interface for the KISSmetrics API that plays nicely with Delayed Job and Heroku.

h2. Installation

Include the gem in your gemfile:

<pre>gem 'delayed_kiss'</pre>

Configure your API key:

h3. In Version 0.2.0

    # run @rails g delayed_kiss:install@
    # update the config in @config/delayed_kiss.yml@

h3. In Version 0.1.0

<pre>  #in config/delayed_kiss.yml
  development:
    key: yourkey
    whiny_config: true
  test:
    key: yourkey
  production:
    key: yourkey
</pre>

h3. In Version 0.0.1

<pre>  #in config/kiss_metrics.yml
  development:
    key: yourkey
  test:
    key: yourkey
  production:
    key: yourkey

  #in config/initializers
  KM_CONFIG = YAML::load(ERB.new(IO.read(File.join(Rails.root, "config/kissmetrics.yml"))).result)[Rails.env]
  if !KM_CONFIG.blank?
    DelayedKiss.configure do |config|
      config.key = KM_CONFIG['key']
    end
  end</pre>

Follow the instructions for setting up Delayed Job: https://github.com/collectiveidea/delayed_job

h2. Usage

Start recording events anywhere in your application: <pre>  DelayedKiss.alias(anonymous_user, user.km_id)
  DelayedKiss.record(user.km_id, 'signed up')</pre>

h2. Thanks

DelayedKiss is derived and gemified from https://github.com/vbrendel/delayed_km

h2. License

(The MIT License)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.