Based on the assumption that the project has an adequate budget established by careful estimation and communication with the client, the following tracking can be used to determine the cost.
First, all the indirect fixed costs - rent, power, phone, water, taxes. For any given day, a certain amount of money is spent regardless of activity. Know this number.
Next, the direct fixed costs - server, Internet access.
Management should be tracked at the project level. Any meeting held to discuss a project should be billed, by all parties, to that project. That does not mean the client will be billed. It ensures that the cost of the project is accurate.
Direct labor costs must be carefully tracked. If it is related to the project, it must be tracked. Reporting must be specific enough to allow management to determine where the money was spent and why. Unauthorized charges must not be allowed.
Indirect labor cost must also be identified. For example, an email problem for the client. This must be billed as support. The same is true for training. These are hours spent assisting the customer that do not help complete the project.
Marketing should be identified as such, and reported - either with the project or the client.