Alfresco AMP for Events

I m using Alfresco Community 5.2. I want to add a module. This module should detect site click events. Actually I want to catch click event on site. When a user clicks a site, then I m making some update processes (in java code). But I couldn't catch this event. How can I do this process ?

Yes I mean Alfresco site. And if a user clicks an alfresco site documentlibrary , my module must be catch this click event. That's exactly what I want. So my module must work synchronously with alfresco.