We are monitoring our user actions in javascript to improve user experience in our website.
Javascript Code
$("html").bind("mousedown", function(e) {
var img = new Image();
img.src="http://monitor.example.com/track.gif?x="+e.pageX+"&"+e.pageY});
I am using image tag to avoid cross domain issues. It is working fine except the below scenarios.
Scenarios:
- Click on the anchor.
- Form Submit.
- Window reload.
How to solve this issue?