PHP Classes

File: js/trackuser.jquery.js

Recommend this page to a friend!
  Classes of Bharat Parmar   PHP Tracking User Activity   js/trackuser.jquery.js   Download  
File: js/trackuser.jquery.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Tracking User Activity
Track user activity on Web pages using screenshots
Author: By
Last change:
Date: 8 years ago
Size: 1,343 bytes
 

Contents

Class file image Download
$(document).ready(function(){ var TrackUserActivity = { CaptureScreen : function($event_name){ if($("#image-canvas").length>0) { $("#image-canvas").height($('body').height()); $("#image-canvas").width($('body').width()); $('body').html2canvas({ onrendered: function (canvas) { var formdata = { event_name : $event_name, image_code:canvas.toDataURL("image/png") }; //console.log(formdata); $.post("ajax/trackuser.php", formdata, function(msg) { console.log(msg); }); } }); } } } window.addEventListener("click", function(){TrackUserActivity.CaptureScreen('click')}); window.addEventListener("dblclick", function(){TrackUserActivity.CaptureScreen('click')}); window.addEventListener("submit", function(){TrackUserActivity.CaptureScreen('form-submit')}); window.addEventListener("reset", function(){TrackUserActivity.CaptureScreen('form-clear')}); window.addEventListener("copy", function(){TrackUserActivity.CaptureScreen('copy')}); window.addEventListener("beforeprint", function(){TrackUserActivity.CaptureScreen('print')}); window.addEventListener("contextmenu", function(){TrackUserActivity.CaptureScreen('right-click')}); });