Track the time of visit of last page visited

Hi, According my revision of Piwik, seems that the system does not track the time of visit of the last page visited, if that page is closed. I mean:

case #1 (when is NOT tracked the time of the visit): If you arrive from other page (for example page Y) and move to page X, and close your window in that page X (after seconds or minutes), the time on page X will not be tracked (seconds 0).

case #2 (when is tracked the time of the visit). According my research, Piwik tracks a visit time of a page (for example page X):
a) if you visit directly the page (page X) and close your window or move to another page (page Y)
b) if you visit the page (page X) form another page (page Z) and move to other page (page Y).

Please confirm my findings (or let me know if I am wrong) and if is it, how can track the time of visit in the case #1 on the database of Piwik?

thanks in advance.

Expected, see the feature request: Support Ping requests to report a better 'time on page' · Issue #2041 · matomo-org/matomo · GitHub