Screen Resolutions Not Being Logged

All the screen resolutions for all the devices show as “unknown”. Has been going on for months, after I upgraded to a new version. I forgot my golden rule… if it ain’t broke, don’t upgrade. Anyone else experiencing this?


Are you sure, you are using the Javascript tracking code and not the image tracking pixel (which is just an image and can’t read things like screen resolutions)?

If you want to, you can send me a direct message with the URL to the tracked website.

Honestly, I would try to let go of that rule. Every software is always broken: Security issues get discovered and fixed. External circumstances (like Browser rules) change which cause a Matomo release that was perfectly fine a year ago to now be broken and needing a change.
Of course this does not mean always using the latest unstable branch and backups are always important to easily roll back in case something does break.

Oh, so maybe it wasn’t an upgrade. At some point, I enabled both the javascript and the image tracking pixel. My thought was that I might catch some that weren’t using javascript. I think it has been working, because on rare occasion I get “Page URL not defined”.

Or did I just shoot myself in the foot, and should only have the javascript method by itself?


As long as you have the image in a <noscript> to make sure it is only loaded when JS is disabled, you should not get duplicate data.

I haven’t been getting duplicate data.

However, my image tracking code was:

<!-- Matomo Image Tracker-->
<img src="https://domain.tld/piwik/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->

And now I changed it to:

<!-- Matomo Image Tracker-->
<img src="https://domain.tld/piwik/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->

My javascript code is:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  (function() {
    var u="//domain.tld/piwik/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
<!-- End Matomo Code -->

It seems I’m using outdated tracking code. I think you guys changed the code, but I never updated my website to use the new code.

old: var _paq = _paq || [];
new: var _paq = window._paq || [];

Where my old code references piwik.php, should it now read matomo.php?

My Matomo installation is located at domain.tld/piwik

1 Like


Both changes should not matter (Matomo is backwards compatible).

I can see the image tracker on your site, but not the JS one.

Well, I am getting tracker info on specific page visits, which the image tracking wouldn’t offer, right? I don’t see your visits.

The image tracker can track the URL of the page viewed (I think).

You can’t see my visit as the image tracker doesn’t load (as I have JS enabled the <noscript> does not load) and there is no JS tracker.

Ok, apparently, my dokuwiki installation doesn’t do both. In the dokuwiki configuration, there is an option for “use image tracking” that I had checked. I assumed this added image tracking in addition to the JS tracking, but it seems to be an either / or option.

Thanks for the help

1 Like