
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Simple way to add Google analytics, universal analytics, uservoice to your rails app
A Gem to help you add tracker components to your application. Instead of having to write javascript code to add this trackers you can use plain pure ruby.
Currently this components are supported:
Google Analytics
Google Universal Analytics
Google Tag Mangaer
Uservoice
Ad Form
Google Ad Services
Kenshoo Conversion Pixel
Relevant Traffic Conversion Pixel
YD RTB Pixel
Smart 4 Ads
Add this line to your application's Gemfile:
gem 'the_tracker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install the_tracker
Create a file in config/initializers/tracker.rb
Add all the trackers you need
TheTracker::Tracker.config do |tmf|
tmf.add TheTracker::Trackers::Uservoice.new('YOUR_KEY', {:forum_id => 123, :tab_label => 'Say Hi!'})
tmf.add TheTracker::Trackers::GAnalytics.new(:id => 'UA-1234123-99')
end
In your views add
<header>
<%= header_tracking_code.html_safe %>
</header>
If the tracker needs to add code into the body:
<body>
<%= body_top_tracking_code.html_safe %>
... your page html ...
<%= body_bottom_tracking_code.html_safe %>
</body>
And that's all, the tracking code will be added automatically
Sometimes you only want to track certain pages:
For instance, this example will show the Google Analytics code only if some_condition
evaluates to true
<header>
<% TheTracker::Tracker.instance.trackers[:ganalytics].active = some_condition %>
<%= header_tracking_code.html_safe %>
</header>
You can add a tracking code on a single page:
TheTracker::Tracker.config do |tmf|
tmf.add_once TheTracker::Trackers::Uservoice.new('YOUR_KEY', {:forum_id => 123, :tab_label => 'Say Hi and disappear!'})
end
For more examples please visit how to use it
Read the documentation to find details about how to implement each pixel available.
Created by Jorge Alvarez
@jorgealvarez
I would like to thanks to the Sage One team for their support in the development of this gem
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The Tracker is released under the MIT License.
Smart 4 Ads support
Universal analytics require libraries for demographic reports and enhanced link attribution
Fixed gem generation problem
YD RTB support
Fixed bug with namespace
Support for more than one Universal analytics account
Support for userId in Universal analytics
Added Universal analytics
Added Relevant Traffic conversion pixel support
Everything is stable so time to bump version to 1.0.0
Added Kenshoo conversion pixel support
Now you can add a tracker that will be displayed only once and removed from subsequent requests.
Fixed bug that keeped information about transactions on each page load. Now transaction information is displayed only once.
FAQs
Unknown package
We found that the_tracker 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.