Code to track success message or any other onload element