
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
google-analytics-rails
Advanced tools
Fast Universal Google Analytics setup for Rails. This gem is mostly intended for small to medium websites with a simple analytics strategy.
if you require older analytics, use 0.0.6
Add the following to your Gemfile:
gem 'google-analytics-rails', '1.1.1'
Then run:
bundle install
Upgrading this gem from 0.0.6?
Use analytics_init to send submissions to Analytics if you are using multiple trackers. You can supply a name to tracker by passing :name option.
GoogleAnalytics::Events::SetAllowLinker is no longer supported as an external variable being set. You can submit as normal in the :add_events array, but using the new :setup config is preferable so no extra array searching has to happen.
GoogleAnalytics::Events::SetCustomVar is no longer supported by Universal Analytics. These have been changed to SetCustomDimension & SetCustomMetric. By default if you use SetCustomVar, it applies as a Dimension
GoogleAnalytics::Events::DeleteCustomVar has been removed
Added Event Helpers
TODO: Add Double Click Snippet Support While the code is there, and it looks like it is simply changing the end path to the JS, this feature has not been tested.
http://rubydoc.info/github/bgarret/google-analytics-rails
config/environments/production.rb:
# replace this with your tracker code
GA.tracker = "UA-112233-4"
app/views/layout/application.html.erb, in the <head> tag :
<%= analytics_init if GoogleAnalytics.valid_tracker? %>
config/environments/production.rb:
# replace this with your tracker code
GA.tracker = "UA-556677-8"
GA.script_source = :doubleclick
app/views/layout/application.html.erb, in the <head> tag :
<%= analytics_init if GoogleAnalytics.valid_tracker? %>
config/environments/production.rb:
# replace this with your production tracker code
GA.tracker = "UA-990011-2"
config/environments/staging.rb:
# replace this with your staging tracker code
GA.tracker = "UA-334455-66"
app/views/layout/application.html.erb, in the <head> tag :
<%= analytics_init if GoogleAnalytics.valid_tracker? %>
config/environments/production.rb:
# add this if you have a premium account and need to use the additional dimension/metric indices
# - premium accounts are allowed to have 200 custom dimensions/metrics
# - regular accounts are allowed 20
# see also: https://support.google.com/analytics/answer/2709828?hl=en#Limits
GA.premium_account = true
google-analytics-rails is released under the MIT license:
Many thanks to the people that took time to submit patches.
FAQs
Unknown package
We found that google-analytics-rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.