Socket
Book a DemoInstallSign in
Socket

totangorb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

totangorb

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Totangorb

Lightweight Ruby wrapper for Totango.

Installation

Add this line to your application's Gemfile:

gem 'totangorb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install totangorb

Usage

Type:

$ rails g totangorb:install

It will generate an initializer for you

unless defined?($totango)
  $totango = if Rails.env.production?
    Totangorb::Tracker.new('1234xxxx')
  else
    Totangorb::Tracker.new('1234xxxx', debug: true, logger: Rails.logger)
  end
end

debug: true - do not make real HTTP requests - useful in development environment

You can also set your custom logger, such as Rails.logger to log every request made to Totango.

These parameters are totally optional.

Replace 1234xxxx with your Totango API service id. From now you can make requests to Totango within your application:

$totango.track do |t|
  t.username     "Username"
  t.account_id   "1234"
  t.account_name "Account name"
  t.activity     "Sample event"
  t.module       "Event module within application"
  t.attributes   {}
end

Account attributes is optional - its a hash of custom attributes, you can really put whatever you want there, but remember to also set them in your Totango account.

For more informations, please visit Totango Quick Start: HTTP API (Server side integration)

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Author

Michał Darda © 2013 michaldarda@gmail.com

FAQs

Package last updated on 02 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.