For us, quality costs generally are an extension of plant needs and situations, so I have done tracking on general supply costs for what we need to run our lab. I have done supply costs for what we purchase for production (utensils and etc., metal detectable pens, testing needs). For testing that we do in-house for specific customers, I forward invoice fees associated with purchasing to customer. For lab testing done outside of our lab (micro and more advanced testing) as requirement by customer, I forward invoice fees to customer. Products placed on hold have associated costs as well. You can also calculate overtime hours, and labor costs for managing new products and additional tasks outside of your day-to-day duties.
I don't really have a template that I can share with you, as I don't know that there is a "one size fits all" template for managing costs. As far as continuous improvement is concerned, if we can reduce non-conformances, QA costs are theoretically reduced since there is a lot less handling of corrective actions and preventive measures.