Skip to content

Option to record device resolution onExistingVisit #22079

@seb303

Description

@seb303

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.

Metadata

Metadata

Assignees

Labels

EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.c: TrackingFor issues related to getting tracking data into Matomo.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions