If you mean capturing click metadata (coordinates, timestamps, target elements) rather than actual pixel recording - yes, that's what tools like Hotjar/FullStory do. They record DOM mutations + interaction events and replay them.
For your own implementation, document-level event listeners work, though cross-origin iframes are off-limits due to same-origin policy.