public
Description: A Ruby wrapper for the Google Analytics API
Home | Edit | New

Profiles

Once you have logged in (see Logging In) you can now fetch all the profiles, and select one.

Garb::Profile.all

Get the first:

profile = Garb::Profile.all.first

Or detect one by table id (found in the URL when viewing a profile on Google Analytics)

profile = Garb::Profile.all.detect{|p| p.table_id == '7654321'.to_ga}
Last edited by vigetlabs, Wed Apr 29 20:17:04 -0700 2009
Home | Edit | New
Versions: