Currently the sessionTick instrument will send tick 0 after the first interval (tick) has passedIn a few analyses, we have begun to suspect that we are recording fewer sessions than we should expect given our pageviews, unique devices, and chosen sampling rate. We wondered if the sessionTick instrument was perhaps not sending tick 0 immediately on page load, but was waiting until after the first interval (tick) had passed.
However this was not the case. As written, tick 0 should be sent immediately on page load. There could be some latency from the event output buffer (which we should measure and quantify or work around if necessary), but not enough to explain the numbers we see.
While testing on Firefox 80.0, it was found that sessionTick events would not fire, and the reason was traced to `mw.requestIdleCallback`, which is simply `window.requestIdleCallback` during these tests, but we want it to send a tick as soon as possible after the page loads,pointing perhaps to an upstream bug in detecting idle states. in order to record the session having begun.Adding a manual timeout value (50ms was chosen, Doing otherwise would mean that we do not capture individuals who engage only within the first tick interval and then stop (i.e.,in line with the requestIdleCallback polyfill in mw.startup) solved the issue.
It's unknown how many browsers may be affected by this, or if this alone explains the missing sessions. bounces)I will update the description as we learn more.