Onclick hook for tracking links