
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
AnalyticsGoo is a gem (or plugin) that provides server side non-javascript tracking using google analytics. The original version tried to mock-up the tracking for use with the UA-* web property ids. The problem with going that route was that all tracking occurs under a single IP address. I have made changes so that it now support google's new MO-* mobile site tracking that allows you to pass the remote IP address via a parameter. The initial intent was to make this look like a logger object. With a single instance that can be used throughout the system; however that is no longer what is needed for our system. We actually need a new version for each request, so the code is still changing.
gem install eyestreet-analytics_goo
Initially I made an adapter pattern thinking that we would support multiple analytics packages. So far I only need Google Analytics:
tracker = AnalyticsGoo::GoogleAnalyticsAdapter.new(:analytics_id => "MO-11685745-5",
:domain => "shor.tswit.ch",
:remote_address => "76.25.141.74",
:user_agent => "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6",
:http_accept_language => "en-us,en;q=0.5")
tracker.track_page_view("/testFoo/myPage.html")
The simple usage is the following:
tracker = AnalyticsGoo.config(:google_analytics,
:analytics_id => "MO-11685745-5",
:domain => "demo.eyestreet.com")
tracker.track_page_view("/foo")
The first parameter passed to the config initializes the desired analytics adapter. Currently we only support Google Analytics. The subsequent hash provide a name for the account, the analytics id, and a domain.
In your environment.rb add the following:
config.gem "analytics_goo", :lib => "analytics_goo"
You can call things in the same way as above, or you can mix in some additional rails specific functionality that is shown below. In an intializer like config/initializers/analytics_goo.rb or in your appropriate environment.rb file
AnalyticsGoo.config(:google_analytics, :analytics_id => "MO-11685745-3",
:domain => "demo.eyestreet.com",
:rails_core_mixins => true,
:environment => "production")
The analytics option hash takes the following:
Then in your models, controllers, and mailers you can do the following:
user = User.find(:first)
user.analytics_goo.track_page_view("/found_my_first_user")
Check test/test_helper.rb to make sure you have the required gems installed.
rake test or autotest
AnalyticsGoo is maintained by Rob Christie and is funded by EyeStreet Software.
Copyright (c) 2009 rwc9u, Eyestreet Software released under the MIT license
FAQs
Unknown package
We found that analytics_goo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.