In T191532#4575856 @Ryasmeen noticed that on iOS Safari, a ReadingDepth event can be sent without issues-a_sample or issues-b_sample set.
A sample event is:
```
{
"event": {
"pageTitle": "Misandry",
"namespaceId": 0,
"skin": "minerva",
"isAnon": false,
"pageToken": "b3533106e2ca571cfe0e",
"sessionToken": "9a570f564eb6d4932fc6",
"action": "pageLoaded",
"domInteractiveTime": 2711,
"default_sample": true
},
"revision": 18201205,
"schema": "ReadingDepth",
"webHost": "reading-web-staging.wmflabs.org",
"wiki": "wiki"
}
```
= Replication steps
Set the following
```
$wgWMEReadingDepthSamplingRate = 1; $wgMinervaABSamplingRate = 1;
```
Load a page with issues.
Inspect the ReadingDepth event and check that 2 sample fields are set (default and a or b)
= Replication steps
Make sure configured like so:
```
$wgWMEReadingDepthSamplingRate = 1;
$wgMinervaABSamplingRate = 1;
```
* Add "ext.wikimediaEvents" is added as a dependency to "skins.minerva.scripts"
* Run the site is run in debug mode
= Developer notes
This is a race condition. It appears possible if ReadingDepth is enabled in WikimediaEvents before the Minerva Page issues test.
It can be mitigated by delaying the pageLoaded event, however it's impossible to fix this without introducing a hard dependency on WikimediaEvents to Minerva's module or vice versa.
Maybe loading it during document.ready could help?
The user doesn't get opted into the ReadingDepth schema (e.g. the skin code needs to load before ext.wikimediaEvents). I think this is the problem.