rack-google-analytics
rack-google-analytics copied to clipboard
How do you exclude directories from google analytics?
what do you mean exactly? can you give an example what your use case is looking like?
I have a similar need. Not sure about @AlexCppns's situation, but I want to track only the public-facing pages of my app, and not necessarily the pages in my admin area. Anyway to disable tracking for certain actions?
@kangguru I don't want it to be initialized in /admin for instance. For now I am using another gem that lets me insert the js only in the layouts I want.
alright i see. thats pretty much the same as @iamjohnellis describes. Currently there isn't such option, but i can imagine thats a use case for even more people. so we might add something like that in the future.
what gem are you using atm?
@kangguru We re using google-analytics-rails right now. It's not in production yet though, we haven't tested it.
I agree that it would be really useful !
Pull request #38 works fine for that:
if: lambda { |env| env['PATH_INFO'] !~ %r{/admin} }
+1, looks like #38 has been sitting around for over a year with no feedback from the maintainer. Not sure if this gem is still kept up to date or I should use an alternative.
please consider Rack::Tracker as an alternative, which is the successor of this Gem