undefined method 'track_ga_event'
ref: issue #16 I am still facing this problem please help me
it looks like its fixed in the upstream but version 0.11.0 on rubygems is somehow broken. maybe @leehambley can publish a new version.
for the time being the workaround would be to use the master directly from github
If someone wants to take over responsibility for this Gem, I'd be more than happy to hand over the Rubygems.org ownership, I don't have a lot of time to maintain this anymore.
if you don't have the time anymore... i could take over.
I'd be glad, I'll add you here, ping me at [email protected] and let me know how I should add you at Rubygems (email, if you are already registered there.)
i just released 0.12.0 @kavyavj would you give it a try?
Sure I will check the version 0.12.0 and revert back. Thanks for your time fixing it.
On Fri, Aug 9, 2013 at 10:25 PM, Lars [email protected] wrote:
i just released 0.12.0https://rubygems.org/gems/rack-google-analytics/versions/0.12.0 @kavyavj https://github.com/kavyavj would you give it a try?
— Reply to this email directly or view it on GitHubhttps://github.com/leehambley/rack-google-analytics/issues/21#issuecomment-22408292 .
I still have the problem with 0.12.0 and Rails 3.2.15.
I can give a hand if needed to help fix this issue.
but the actual ga snippit is correctly injected into the body? can you provide an example how you call the track_ga_eventmethod
Can you please update the read me
In your application controller, you may track an event. For example: ga_track_event("Users", "Login", "Standard")
it needs to be track_ga_event method.
the method is named ga_track_event see: https://github.com/kangguru/rack-google-analytics/blob/master/lib/google-analytics/instance_methods.rb#L27
sorry for being wrong in my comment above
Oh well, same bug is happening here, many years after the report.
I prefer using this gem instead of rack-tracker as I'm only looking for GA and this one is much simpler.
I tried setting the gem up both following the README instructions and using the Padrino plugin "googleanalytics". Both work fine, but they don't enable the additional methods on my controllers.
Fiddling around, I stumbled upon another set of helpers and got the idea of adding helpers GoogleAnalytics::InstanceMethods to my app/app.rb. Voilà, Padrino got to know GA and they're happy working together. I'm not sure how this would be implemented into the gem, tho; maybe an additional rule in the README?
To help my app not send calls during development I enclosed the use call into a conditional. That doesn't cause errors when calling the controller methods.
Here's the final code I'm using:
helpers GoogleAnalytics::InstanceMethods
configure :production do
use Rack::GoogleAnalytics, :tracker => 'UA-12345678-9'
end
I'm using Padrino 0.10.6 (yep, old, gonna update it later). Maybe this could be of help to anyone :)