Are there any best practices for this?
Personally, I know of only three:
- Figuring out what exactly you want to measure.
- Accepting a certain degree of measurement error.
- Trust
You say that your company has recently demanded that all employees track their time spent working daily. Why? For what purpose?
I've been asked to keep track of time on specific categories of work because the company was going for some certifications and that required to have well defined processes, with all sorts of things tracked for auditing purposes, and saying I worked 8 hours today was not enough. I've been asked to track time to map value streams and see where things can be improved. I've been asked to track time simply because it has always been like that. And I've also tracked time for myself to see how much time I spend in unproductive meetings instead of doing meaningful work. Etc.
Then, it's a matter of the measurements themselves. On most parts of the world the work week is 40 hours long, 8 hours per day. So if you need to keep a timesheet for employees, you need to keep if for 8 hours. As already mentioned in another answer, humans can't work for the whole 8 hours. They can be in the office for 8 hours, but can't actually work 8 hours. Humans are not machines. You need to take breaks, you need to stretch, you need to grab a cup of coffee, you need to go to the restroom, you might socialize with people, etc. So where does this time go? Well, on other time tracked activities like development, meetings, research, testing, code reviews, etc., because you can't log your time for half an hour sitting on the toilet trying to rectify your previous decision regarding what you had for lunch.
So whatever measurements you get, you should subtract some percent from that for your employees being humans, not robots.
And the last point is trust. Trust that people are keeping good record of their time, instead of spending the last half an hour of the work day on Friday to try to remember what they did the whole week, and putting all week as development when in fact for half of the time they were in stupid meetings. And trust that whatever reasons the company has to ask people to keep track of time is not simply to punish them or control them in some way (a good indicator of what's going on is if they insists people track their time up to the minute, but every minute people working above 8 hours per day needs to be tracked as exactly 8 hours per day, not more, 'cause that means overtime that by law needs to be paid).
With these three things clear, as David Espina already mentioned, you need to create some common sense rules for how to track things, and make sure the measurements are valid for whatever you are doing.
And finally, remember that people change their behavior when they know they are watched. So if you put a dumb system in place, people will find ways to game the system. And you not only get low morale people and a reduction in productivity, but whatever measurements you do will be completely useless, or worse, present a false image of what's actually going on, and decisions will be made based on that, who will then only make things worse not better.