js script for colllection of user interation data in a webpage