How to add google analytics code for onclick functions in drupal 6 My requirement is that, i need to my site to be tracked when i click on categories, menus, submenus, send mail button and shopping carts. Need to add onclick function for each  tags and that onclick functions need to be tracked.
What you're looking for is the GA Event Tracking module. It allows your custom module to select web page elements (via CSS selectors), bind them to jQuery events (e.g. clicks, mouseover, etc.), and send them out to the GA Event Tracking API.