I don’t exactly understand what you mean… If I track website A on Matomo, and one user browses on sites A and B on 2 different tabs of his browser at the same time, if he switches from tab A → tab B → tab A (without doing anything else on these pages) the visit duration will appear as 2 pages?
In this case do you know if this behavior (and also the other one described in your post) still occurs when Heartbeat Timer is disabled?
As the first part of your post really seems to be a bug, I suggest you create a bug in the GitHub repo:
Don’t forget to indicate the version of your Matomo, and if the behavior is the same with and without Heartbeat Timer enabled…
Yes. And in the observed cases with 2 different websites. A one of mine. B not one of mine.
The observations refer only to active Matomo Heartbeattimer. Tests with deactivation not possible.
Presumably, the Matomo heartbeattimer works correctly, except that returning to the previously exited webpage is counted as a new page visit. After 30 minutes pause this would be correct. However, the time of the observed cases is less.
It would be to wait whether other users without Matomo-Heartbeattimer observe the same.