Matt - sanemat
Matt - sanemat

Reputation: 5618

Ruby: Fetch data from google analytics?

I want to gather google analytics data for daily/monthly report. All visitors, visitors for specific path and conversion rate. Setting for google analytics is already done (I think).

I searched ruby libraries, but many informations are out-of-dated and google api is sometimes update. Now(2012-09-28) what library is popular? And How to get data? I searched ruby-toolbox, but both two libraries are still active?

Libralies

'garb'
https://github.com/vigetlabs/garb
'google-api-client'
http://code.google.com/p/google-api-ruby-client/

Purpose:

My first step: view data
My second step: edit data(Add note or notation)

thanks,

Upvotes: 0

Views: 637

Answers (1)

Eduardo
Eduardo

Reputation: 22824

Google-Api-Client works fine, is an official client and is constantly updated, just check the commit logs and you will see. Note that this API is not for Google Analytics only but for any Google API that uses the Google Discovery API. You should try that.

Regardless of the client that you use make sure it's compatible with the latest version of the API. If it's built using the Google API Discovery service it's a plus because that means the client library will have support for new methods as soon as they are available. It's like an API for building API clients.

GARB on the other hand seems to be abandoned for a while and is probably missing out on several features that came recently.

Note that the Google Analytics API are currently read only. So no client library will support that since there's no API for writing annotations. There's a feature request for that though.

Upvotes: 1

Related Questions