Giter Site home page Giter Site logo

chrisle / gattica Goto Github PK

View Code? Open in Web Editor NEW

This project forked from er1c/gattica

127.0 127.0 48.0 480 KB

Gattica gets data from Google Analytics API. Simple to use.

Home Page: https://github.com/chrisle/gattica/blob/master/README.md

License: MIT License

Ruby 100.00%

gattica's People

Contributors

cannikin avatar chrisle avatar kdonovan avatar martijnsch avatar mathieuravaux avatar ngpestelos avatar nreckart avatar rtlechow avatar thieso2 avatar tilthouse avatar vgololobov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gattica's Issues

You have a nil object when you didn’t expect it!

Hi Chris, thanks for helping!

I was trying to follow your instructions, but when I run:
ga = Gattica.new({ :email => ‘MY EMAIL’,
:password => ‘MY PASSWORD’,
:timeout => 500 })

I keep getting:

You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split
Any idea what could be wrong?

Other then the above message, I don't get any other feed.

Thanks!

Read: Google Analytics Data Export API with Ruby + Gattica | SEER Interactive

Passing the API key

How does one pass the API key to google analytics in order to get past the rate limits.

Cheers.

Not all goal data retrieved

Goal data is not retrieved for 'event' goals.

On one website, I have 1 goal (#1) that is a 'url destination' goal, and 4 other goals that are all events (#2, 6, 11, and 12). When calling account.goals in Gattaca, only one goal (#1) is returned.

I can still get the metrics for the other goals, they just aren't returned by account.goals.

Gattica::DataSet to_hash method returning an array?

Hi
I just installed the gem and I'm playing around to get used to it but I run into a weird case in which the to_hash method for a Gattica::DataSet object is returning an array

This is my code
1.9.3p0 :012 > visits.class
=> Gattica::DataSet

1.9.3p0 :013 > visits.to_hash.class
=> Array

The object itself contains an array of hashes, but the method's name is a little bit misleading since I was expecting to retrieve a hash

Thanks for the hard work!

Segmentation issue plus

I just updated to the latest version of the gem, now when I try to pull the list of segments I get the following error:

"The requested URL /analytics/v2.4/management/segments was not found on this server. That’s all we know."

I have no idea why, I looked through the code and the Google Docs for the API, which states that /analytics/v2.4/management/segments is the URL.

Also, another strage thing happens, when I pull data from the API (such as a report) I have to alter your code to make it work, but I don't know why. It should work just as you've written it. Below is the example:

for the do_http_get method:
I update:
response, data = @http.get(query_string, @headers)

to:
response = @http.get(query_string, @headers)
data = response.body

Splitting up the code make it work, otherwise data is nil. Again, it should work from my understanding of Ruby, but for some reason it's not. I have the latest version of ruby.

Thanks for your help, this is truly an awesome gem!!!

OAuth 2.0 support

I noticed that grabbing a token from /ClientLogin gives you a token that expires in ~14 days. According to the docs here: https://developers.google.com/analytics/devguides/reporting/core/v2/ and here https://developers.google.com/analytics/devguides/config/mgmt/v2/ V2.4 supports OAuth 2.0.

I don't see any pull requests or anything referencing adding support for OAuth 2.0 so I was going to add in support for it unless someone has already started on it somewhere?? One of the applications that I'm working on looks to need it at this point.

filters shouldn't be dependent on available dimensions

Right now, the gem only lets you filter on a dimension that's being used in the query. But based on the Query Explorer (http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html), it doesn't appear that the filters need to be dependent on the selected dimensions...

.rvm/gems/ruby-1.8.7-p352/gems/gattica-0.4.3/lib/gattica.rb:359:in `validate_and_clean': You are trying to filter by fields that are not in the available dimensions or metrics: source == google (GatticaError::InvalidSort)

It seems logical to de-link these in the gem, because it would free up extra dimensions for reporting; otherwise, the filtered dimension is pretty much a waste of space. For example, if I'm looking for only Google / CPC data, there's no reason why I should have filtered columns that all read "google", "cpc"...

Thanks for the work, btw! It's saved me a lot of time with a project I'm working on...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.