Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Integrate heatmaps in your web application to see on which part the user spends most time on your web application. Where does users click on the page. Helping in gathering analytics to find out what works on the web, what attracts most of the users. View user interactions and make your application more amazing! :sparkles:
Quick Demo of HeatMap Generation
Heatmap-Rails Works Perfectly in any Screen Size.
Add this line to your application's Gemfile:
gem 'heatmap-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install heatmap-rails
Install the gem
Run the command to generate a migration to save heatmaps data:
$ rails g heatmap_rails:install
$ rake db:migrate
<%= save_heatmap %>
<%= show_heatmap %>
//= require jquery
//= require heatmap.js
Use the helper
<%= show_heatmap %>
The argument is the path of current page. This way the helper will only display the respective heatmap. The viewing can be done in multiple ways, for example if you want only the admin users to view heatmap, you can do something like:
<% if admin_user_signed_in? %>
<%= show_heatmap %>
<% end %>
Another way can be using some param in the URL. For example if you want to use URL like:
www.website.com/?see_heatmap
You can use:
<% if request.query_parameters.include?("see_heatmap") %>
<%= show_heatmap %>
<% end %>
You can customize the max stack limits before the data is sent to server side via http request. We understand for different application the average user interactions time on a specific page varies. You can set these values w.r.t to your application's needs:
<%= save_heatmap({click: 3, move: 50}) %>
The default values for clicks is 3
. For mouse movements tracking its 50
.
<%= save_heatmap({click: 3, move: 50, html_element: 'body'}) %>
you can even restrict heatmap generation to a specific DOM element. Default value for DOM element is body
element. This can be change to any .class
or any '#id'.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
heatmap-rails uses HeatMap.Js to show generated data in form of heatmaps.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that heatmap-rails 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.