Don't think "time tracking." Think "cycle time" instead.
Kanban Should Measure Cycle Time
Generally, Kanban is not about measuring "activities" at a granular level; it is about measuring cycle time for a pull through the entire system. There is legitimate debate about whether this time should include lead time (e.g. time spent in the ice box) or just time from "started" to "done."
Some examples of how lead and cycle times can be measured are:
but there may certainly be better explanations out there. The the general idea, though, is that you care about how long it takes and average batch to move from from initialization to a delivered state--regardless of how you choose to measure that.
The important thing in Kanban is that you are not measuring sub-tasks or work products belows the level of the user story. In other words, if a user story is "embiggen the quux" then it doesn't matter how long it takes to order the quux components, perform the embiggening, or update the quux documentation--unless those are explicit queues in your Kanban process, of course.
With Kanban, the question you're asking is "how long does it normally take for a standard-sized story to move through the entire queue and across all defined processes for that queue?" You then use kaizen to eliminate waste and reduce cycle time to the maximum extent practical, rather than optimizing individual tasks.
When you ask how to track time spent on specific activities, you're trying to optimize parts of a task. This is wrong. Consider the following quote:
To optimize the whole, you must sub-optimize the parts...First, model the process by breaking it down into between five and nine sub-processes. Visualize each sub-process as an input hopper that sits on top of a black box. Inputs to the queue are dumped on top of the input hopper where they wait their turn. When the black box is ready to process the next item it grabs an input from the bottom of the stack, does whatever it does, and shoves it onto the top of the input hopper of the next sub-process.
Lewis, Bob (2012-01-23). Keep the Joint Running: A Manifesto for 21st Century Information Technology (pp. 31-38). IS Survivor Publishing. Kindle Edition.
All you (should) care about is the overall efficiency of the entire process chain, not the individual sub-processes. That doesn't mean waste can't exist in a sub-process, but you should spend zero time on that level of analysis until and unless it is negatively impacting the cycle time of your macro-process.