From quick look at the code, there is number of hooks firing in wp_ajax_heartbeat()
. Out of which heartbeat_tick
action seems quite appropriate to hook some logging logic too.
For the sake of completeness, while you are interested in logged in activity, the hook would be heartbeat_nopriv_tick
for logged out users.