Skip to content

amaabca/webtrends

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webtrends

Gem Version Code Climate Build Status Coverage Status Dependency Status

Make use of the Webtrends api to post event data for analytics purposes.

Installation

Add this line to your application's Gemfile:

gem 'webtrends'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install webtrends

Usage

Create config/initializers/webtrends.rb

Add the following configuration block

Webtrends.configure do |c|
  c.protocol = 'https'
  c.domain = 'dc.webtrends.com'
  c.version = 'v1'
  c.customer_id = YOUR_CUSTOMER_ID
  c.verbose = true (setting verbose false is recommended in production)
  c.format = 'xml' (plain or xml)
end

Additional documentation can be found on: http://help.webtrends.com/en/dcapi/

Example:

 wt = Webtrends::Event.new(tags: { dcsuri: '/your_path_to_track', 'WT.ti' => 'a_tag'} )
 response = wt.track

Note: You will either get a RestClient::Response back or an exception will be raised.

Note: dcsuri is required for the constructor.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Create tests for your feature
  4. Make sure coverage meets minimum requirements
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages