-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Currently the Resolution plugin records the device resolution (screen css pixel size) on the first page impression of a new visit, and then after this any subsequent values are ignored.
There are however situations where the first tracking event doesn't know the resolution. For example where there is a server-side tracking event sent before the first page is rendered client-side, or when tracking is done solely server side via the API (not using the Matomo Javascript). In this case the device resolution will never get set since the initial "unknown" value persists.
My suggestions is either:
(1) Have a user option for the Resolution plugin to update the value on subsequent page impressions of an existing visit.
or
(2) If the resolution happens to be "unknown" and then a specific value is set for a page impression, then the specific value should replace the "unknown" value.
We have simulated this behaviour by adding this function to plugins/Resolution/Columns/Resolution.php
public function onExistingVisit(Request $request, Visitor $visitor, $action)
{
// Also update value for subsequent tracking events in visit
return $this->onNewVisit($request, $visitor, $action);
}
But for backwards compatibility it should be switchable by an option.