Project

saw

0.0
No commit activity in last 3 years
No release in over 3 years
I saw user clicking on that button there.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.0.0
 Project Readme

Saw¶ ↑

<img src=“https://secure.travis-ci.org/amolpujari/saw.png?branch=master” /> <img src=“https://codeclimate.com/badge.png” /> <img src=“https://gemnasium.com/amolpujari/saw.png” />

As a developer/admin, I saw user coming to registration page, with parameters. I saw user clking on “Connect”.

‘What the user might have done?` this is a common question developers do have while debugging any issue, going through the logs checking for particular log statement or request param, and then after spending an hour coming with a decision that user must have done this. Saw saves this hour, time spent on debugging and answering this question `What user might have done?`.

This is one more simply way to track what user is doing.

Installation¶ ↑

Add this line to your application’s Gemfile:

gem 'saw'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install saw

And then install

$ rails generate saw install

Next

$ rake db:migrate

Usage¶ ↑

before_filter :saw

Or

saw 'visiting details page', { :extra => 'something' }

Or

= in views

<button id="button-retry" onclick="open_pop_up_form();" class="mybutton medium green">
  Connect to your Device
</button>

<script type="text/javascript">
  function open_pop_up_form(){
    $.post("/visits", { doing: "clicked on 'Connect to your Device' " } );
    ....

Access users’ visits as

visit = @user.visits.sample
visit.user_agent
visit.remote_host
visit.hits.map(&:note)
visit.lasts = => 00:12:45
visit.title = => 00:12:45 on Apr 14, 2013
visit.summary

hit = visit.hits.sample
hit.note
hit.url
hit.http_method
hit.action
hit.json_data
hit.created_at

A visit is not a single request made to the server but a session. Similalry a hit is not necessary to be a request hit.

Testing (in progress)¶ ↑