Webtrends
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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Create tests for your feature
- Make sure coverage meets minimum requirements
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request