A hook is just a shell script, so there's no reason you can't write one that does what you describe. Since you're limited to client-side configuration, there are some limitations; if you're wanting this just to collect information about your own usage of your repo, it shouldn't be a problem, but if you're trying to institute collection of this data for a team, then at best you're pretty much at the mercy of the team's willingness to cooperate.
By the same token, a hook is just a shell script; so you'll have to figure out things like where you want to store the data you collect, in what format, etc. There are no conventions or anything for this, since - as you say - this is not git functionality.
So beyond that, unless you've tried to write such a hook and have a specific question about some challenge with writing it, there's not much more to say about it.