It is very much possible but it is beyond the scope. We also got that requirement few months earlier.
Small answer is use DB and a server side language (PHP/ JSF / ASP or whatever you are comfortable with).
Detail answer is:
1. Introduce a token mechanism before redirecting users to viewer page, save their details in DB. Ensure that users land on default page of the site, save their detail and then redirect them to main application page that should check token first else should redirect them back.
2. Convert index.html page of the viewer into dynamic server side language page like index.asp or index.php that should log entries in DB when fired.
Hope that it will help you.