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

5 comments on “Burnalytics - Ruby Feedburner and Google Analytics Library”
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
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
03
Doesn’t seem to work anymore because of an SSL issue with G_Analytics. Too bad…
04
I’ve just checked, it seems to be working….
05
If you have SSL problems, you can try sprinkling this around the place:
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
Leave a Reply