Burnalytics - Ruby Feedburner and Google Analytics Library

October 30th, 2006

Update: A typo in FeedBurner.rb has been fixed

I’d thought I’d release the library behind eribium’s Feedburner and Google Analytics integration.
Prerequisites are:

  • A Google Analytics account
  • A FeedBurner account (and awareness turned on)
  • Hpricot
  • Gruff (Rmagick) - for the graph support

The api goes like this:

# Feedburner:
# Gets feed data and creates graph
feed = Burnalytics::FeedBurner.new("Eribium")
data = feed.get_data
graph = Burnalytics::Graphs::FeedBurner.new(data)
graph.generate
# creates:
 # public/images/graphs/feedcirculation.png
 # public/images/graphs/feedhits.png

And for Google analytics

# List analytics profiles
ana = Burnalytics::Analytics.new
if ana.login("email","pass")
 puts ana.list_profiles
end

# Gets data for a particular profile id
ana = Burnalytics::Analytics.new
if ana.login("email","pass")
 data ana.get_date(profId)
 Burnalytics::Graphs::Analytics.new(data).generate
end
# creates
 # public/images/graphs/pageviews.png
 # public/images/graphs/uniqueviews.png
 # public/images/graphs/visitsbysource.png

You can get it here:
Burnalytics

Uncategorized | Comments | Trackback Jump to the top of this page

5 comments on “Burnalytics - Ruby Feedburner and Google Analytics Library”

  1. 01

    This is just great! I’ll give it a try ASAP. Don’t you need a login/password to access your feedburner data?

    Anyway thanks a lot!

    Matt

    Matt at November 2nd, 2006 around 12:06 pm
    Jump to the top of this page
  2. 02

    You don’t need a username or password to access the FeedBurner data providing “awareness” is turned on (you can do this in your FeedBurner account). Thanks

    maccman at November 2nd, 2006 around 12:11 pm
    Jump to the top of this page
  3. 03

    Doesn’t seem to work anymore because of an SSL issue with G_Analytics. Too bad…

    Matt at February 9th, 2007 around 11:12 pm
    Jump to the top of this page
  4. 04

    I’ve just checked, it seems to be working….

    maccman at February 10th, 2007 around 6:08 am
    Jump to the top of this page
  5. 05

    If you have SSL problems, you can try sprinkling this around the place:

    http.verify_mode = OpenSSL::SSL::VERIFY_NONE

    Duncan Gough at July 14th, 2008 around 3:12 pm
    Jump to the top of this page

Leave a Reply

  •  
  •  
  •  

You can keep track of new comments to this post with the comments feed.

19yr old hacking away at Ruby on Rails and Flex

Pages

Meta