Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Tony Pitale
What is up Jesse?
Edward Weng
Tony Pitale
Hey Ed, welcome!
Ron Schwartz
Hey there! We are using Garb for querying Google Analytics. Our main use is a page on our site that shows the number of visits we are having on a specific day. This number updates every few minutes, until number of visits reach 499,999. Than it won't update for a few hours. Are you familiar with this issue, or maybe know what can cause it?
Tony Pitale
You might be hitting some limit from GA
It should start sampling after that
but depending on the version of Garb (this is more for Legato support) this might not be enabled
I've not seen it, personally
It may depend on the query used, I can't really say for sure @Ronsho
Ron Schwartz
ok, i'll try sniffing around , thanks @tpitale
Ron Schwartz
One more question, @tpitale :)
For some reason, i am getting undefined method `strip' for #<Hash:0x000001128eb8a0>
when i try to read GA data using Leagto
It happens also when i just try things from the readme file of the GitHub project
Tony Pitale
@Ronsho: Could you open a github issue with a more complete code sample in a gist?
Ron Schwartz
@tpitale thanks! Opened an issue.
Alessandro Tagliapietra
Wassup? I'm trying to use filters, I've added to my class
filter :widget_views, &lambda {contains(:pagePath, '^/canvas/\d+')}
however I'm getting ArgumentError: wrong number of arguments (1 for 0) on that line
any clue?
Alessandro Tagliapietra
My fault, I was passing the filter method the profile and the query parameters, which I should have put into the results method
MJ Rossetti
hey i'm just writing to say how much i appreciate the logic of this gem. thanks!
Peter Tellgren
hey anyone here to give a noob some assistance?
Tony Pitale
Hey petertellgren. Normally I try to be in here. But I'm currently on vacation and the only alerts I get are a daily digest. Sorry!
Best bet may be to create an issue until I get back next week.
i may have to switch to using IRC like everyone else. This may be a failed experiment.
MJ Rossetti
@petertellgren what are you looking to do? maybe I can help.
MJ Rossetti
also, i have my own question for the group, if anyone knows of the answer. the code is here, but the question is basically: how to name a model's dimension such that it returns a collection of results with each representing a unique month? Like the :date dimension, but weekly or monthly versions...
Tony Pitale
I think month might just work. I left a comment on the gist.

Hi folks, a rails learning kid here.
i started exploring legato gem and got some soubts(i know these are very simple)

is that mandatory to have an application running live to use legato gem.?
(can i check working of legato gem through some dummy data/site/app)
what does installed application and service acount differnce in generating Oauth2.?

mean i wanted to track an application's google analytics in my app.
Contentools Team
anybody there?
Joe Mocerino
hello @tpitale Is there a way to use the legato gem to allow my users to monitor their Google analytics account from my web app? Basically I want them to be able to put in say their "property id" in the settings and I query Google's reporting API to get data from their account (basically show a simplified version of the report for small business owners). I'd need access to their GA account without it technically being under "my" account...is there any examples or any idea how I could accomplish that?
Tony Pitale
Hello … so gitter doesn't do a great job with notifications. Sorry!
Tony Pitale
@spq24 GA mostly requires using OAuth 2 now, so that works exactly in the scenario you describe. Please check this wiki doc: https://github.com/tpitale/legato/wiki and specifically getting a token: https://github.com/tpitale/legato/wiki/OAuth2-and-Google
@tpitale awesome thanks I'm going to check back and I'll report back if I can get it working (....or bother you again if I can't haha thanks for the help!)
Adam Dunkley
@tpitale I am having trouble with realtime on 0.4.0. I am getting:
irb(main):074:0> ActiveVisitor.realtime.results(profile).each &:y
OAuth2::Error: {"errors"=>[{"domain"=>"global", "reason"=>"badRequest", "message"=>"Unknown metric(s): ga:activeUsers"}], "code"=>400, "message"=>"Unknown metric(s): ga:activeUsers"}:
{"error":{"errors":[{"domain":"global","reason":"badRequest","message":"Unknown metric(s): ga:activeUsers"}],"code":400,"message":"Unknown metric(s): ga:activeUsers"}}
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/oauth2-1.0.0/lib/oauth2/client.rb:113:in `request'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/oauth2-1.0.0/lib/oauth2/access_token.rb:107:in `request'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/oauth2-1.0.0/lib/oauth2/access_token.rb:114:in `get'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/legato-0.4.0/lib/legato/user.rb:27:in `request'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/legato-0.4.0/lib/legato/query.rb:237:in `request_for_query'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/legato-0.4.0/lib/legato/query.rb:132:in `load'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/legato-0.4.0/lib/legato/query.rb:140:in `collection'
    from /Users/adam/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/legato-0.4.0/lib/legato/query.rb:156:in `each'
    from (irb):74
    from /Users/adam/.rbenv/versions/2.1.2/bin/irb:11:in `<main>'
I checked the profile object itself and @tracking_scope is set to rt
so I don't know why it's passing ga
Jens Dahl Møllerhøj
yo - anyone online?
Osny Netto
Is there a way to keep my token alive? Because as I read in the docs, each request I need to provida a new token otherwise is says that was already used before.
Hi all
anyone awake?
How do I mock a legato user?
On the topic of service accounts, the documentation explains how to use the google-api-client gem. Tried that and it works. However, this is for 0.8.x versions of the gem. What is the easiest way to acquire the token using v 0.9.x?
Rodolfo Yabut
Can this gem be used for V4?
Fabián Delgado
Hi, do you have an implementation sample?
Charli Bregnballe

I dont know if this chat is active anymore? I was looking into Legato for a project where I need to display google analytics data from today (somewhat real time).

  • How many users visited the site today
  • How many pageviews does the /news/* content type have to today -> Maybe even a list of the top 5
  • Currently number of active users on the site

Is this possible through this gem?