Project

keepify

0.0
No commit activity in last 3 years
No release in over 3 years
Keepify track events with properties directly from your backend
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 1.8.7
~> 3.12
 Project Readme

Install

  gem install keepify

Usage

Initialize Keepify

  @keepify = Keepify::Tracker.new(YOUR_KEEPIFY_API_TOKEN, asynch)
  • async : Boolean

    Default: false

    Built in async feature. When set to true, the http tracking requests are sent from a separate thread. This solution may become inefficient if your application generates events at a high rate. in that case, consider using a more robust solution such as using eventmachine or delegating the tracking to a background job using resque.

Tracking events

  @keepify.trackEvent(event_type, user_id, options)

Where event_type is a string representing the type of the tracked event, for example : "page_view" or "item_purchase", user_id is a unique identifier of the tracked user such as the user's email. and options is a hash that accepts the following keys:

  • kphn : hostname e.g. "http://mysite.com"
  • kppt : page title e.g. "homepage"
  • kpr : the referral url
  • kppr : the path of the current URL e.g. "/myitems/1"