Tracks cursor movements and clicks, and also calculates position relative to DOM elements