Socket
Book a DemoInstallSign in
Socket

ranalytics

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ranalytics

0.1.071029125738
bundlerRubygems
Version published
Maintainers
1
Created
Source

= ranalytics -- Ruby Google Analytics interface, inspired by Burnalytics

Author:: Mirek Rusin

Copyright (c) 2007 Mirek Rusin, parts of code stolen from Burnalitics

You can redistribute it and/or modify it under the same terms as Ruby.

= ranalytics -- Ruby Google Analytics interface, inspired by Burnalytics

== Examples

To iterate all profiles (websites) inside your google analytics account

require 'ranalytics' analytics = Analytics.new 'YOURLOGIN@gmail.com', 'YOURPASSWORD' analytics.profiles.each do |profile| puts profile.name end

To retrieve hits from the first profile

require 'ranalytics' analytics = Analytics.new 'YOURLOGIN@gmail.com', 'YOURPASSWORD' profile = analytics.profiles.first puts profile.visits(Date.today) # prints visits for specific day (Date instance) puts profile.visits('20070101-20070131) # prints visits for the range (String)
Or you can use predefined Symbols: puts profile.visits(:yesterday) puts profile.visits(:last_7_days) puts profile.visits(:last_week)

To get stats for each day, you can:

require 'ranalytics' analytics = Analytics.new 'YOURLOGIN@gmail.com', 'YOURPASSWORD' profile = analytics.profiles.first for date in Date.parse('2007-01-01')..Date.today puts profile.visits(date) end

== Download

The latest version of ranalytics can be found at

Documentation can be found at

== Installation

The preferred method of installing ranalytics is through its GEM file. You'll need to have RubyGems[http://rubygems.rubyforge.org/wiki/wiki.pl] installed for that, though. If you have it, then use:

% [sudo] gem install ranalytics.gem

== License

ranalytics is released under the LGPL license.

== Support

The ranalytics homepage is http://mirekrusin.com/ruby/ranalytics

For other information, feel free to ask on the ruby-talk mailing list (which is mirrored to comp.lang.ruby) or contact mailto:ruby@mirekrusin.com

FAQs

Package last updated on 25 Jul 2009

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.