Add a new field `lifecycleactiveLength` field to the [[https://meta.wikimedia.org/wiki/Schema:ReadingDepth|ReadingDepth schema]] that measures how long a page was in the "active" state as per the Page Lifecyle API (https://developers.google.com/web/updates/2018/07/page-lifecycle-api#overview_of_page_lifecycle_states_and_events ).
This should probably be sent with `pageUnloaded` events (in addition to `visibleLength`, which is based on the older, more limited Page Visibility API, and `totalLength`), on browsers that support the Page Lifecyle API; on Chrome that's version 68 and newer. Or maybe a new, separate `pageTerminated` event (tied to the corresponding state transition per the Lifecycle API) would be preferable - developer input on this would be valuable.
Background/motivation: A limitation of the current ReadingDepth data is that the pageUnloaded event may not be fired if the page is terminated by the browser/system before unload. On mobile, this actually happens in a majority of cases and biases our data especially when comparing reading times on desktop and mobile ( https://meta.wikimedia.org/wiki/Research_talk:Reading_time/Work_log/2018-11-02 ).
@Krinkle pointed out that the Page Lifecycle API should help with this. See also the spec at https://wicg.github.io/page-lifecycle/spec.html