@labolanimichele opened this Issue on December 13th 2018


I am facing an issue with the data Matomo stores as unique visitors.

I built a custom report which should give me the unique visitors across my website with no segmentation on users:

Now, I would have expected this to contain the same information of the pre-built report contained in Matomo "Visitors" section - however, the 2 do not match.

Here is what I get from the custom report:

And here is what I get from the Visitors tab:

The profile is somehow similar, but the numbers are very different.

Is my assumption that the 2 views should be the same correct?

@tsteur commented on December 14th 2018 Member

Unique visitors is the only metric where there could be a difference because of https://matomo.org/faq/how-to/faq_113/

Custom Reports will calculate the value for every day, and then sum all the values for every day of the week.

Vs the built-in Matomo report has some special logic when the config enable_processing_unique_visitors_week = 1 is set (which it is by default). In this case Matomo makes a special treatment for unique visitors and doesn't sum all the values, but fetches the raw data over the entire week to calculate more accurate numbers. That's why the numbers in the Matomo report are lower compared to the custom report numbers. In the Matomo built-in report, when the same visitor visits on several days, it will be only counted as one unique visitors. Vs in custom reports it would be counted as two.

I'll create internally an issue to see if we can match this behaviour in custom reports for evolution reports.

I hope this explains it?

@labolanimichele commented on December 14th 2018

Ok, so just to make sure I get it correctly - when a custom report tells me that over the week Dec 10 - 16 there were 2684 Unique visitors (example from image below) this is currently not exact - if I want to see weekly unique visitors, I can only rely on the built in feature.

I hope this can be fixed soon! The built-in feature simply goes into timeout when trying to run it on too complex segments, so we cannot really use it.


@labolanimichele commented on December 14th 2018

Hey @tsteur, maybe you could help us finding an alternative here.

I've been looking online for a clear definition of the distinction between:

  • unique visitors
  • users (this metric can be charted in the built-in visitors report, but not in the custom report)
  • unique user ID (vice-versa, this is found in the custom report, but not in the built-in visitors report. Is it the same?)

The values Unfortunately, I could not find any such clear distinction.

The values are also not helping me:
on a past week (so where all pre-processing has been done) I see:

  • Unique visitors (built-in): 1715
  • users (built-in): 777
  • Unique visitors (custom report): 3298 (this has been clarified already then)
  • Unique user id (custom report): 1760

Could you maybe point me to any documentation if available? (or do you have an answer? :) )

@tsteur commented on December 17th 2018 Member

@labolanimichele we've just released an update that should calculate the unique visitors and unique users the same way in custom reports for this particular case. We've also created a new FAQ about this: https://matomo.org/faq/custom-reports/faq_31389/

It'll correctly calculate the numbers as long as you only use unique visitors and/or unique users in an evolution report but not add other metrics.

In general, our metrics are explained in https://glossary.matomo.org

unique visitors
The number of different visitors uniquely visited your website. One visitor may have multiple visits on the same day, and over several days.

users (this metric can be charted in the built-in visitors report, but not in the custom report)

You may define a User-ID for all or a subset of users. The difference to unique visitors is basically that you can identify the same visitor across different devices as one user. In unique visitors, when I visit your website through the phone and my laptop, it be counted as two unique visitors. But if I for example am logged into your service on both my laptop and my phone, and you use the userId feature, then it will be counted as one user, and 2 unique visitors.

unique user ID

The same as users, will check if this can be easily renamed to match the naming.

hope it helps.

@labolanimichele commented on December 17th 2018

Thank you very much @tsteur , this is exactly the answer I was looking for! Very clear now.
I will validate the newly released feature right now then.

Thank you!

@labolanimichele commented on December 17th 2018

Hey @tsteur - sorry to use the same issue, but it's somehow related: any reason why "Unique Pageviews" is not available in the custom reports?

@tsteur commented on December 17th 2018 Member

The database schema in Matomo is a bit tricky to make this happen. There are some ways to get this info depending on the dimensions you select. If you select for example Page URL, simply select "Visits" or "Unique visitors" as a metric.


You will see that "Visits" in Custom Reports will match the value of "Unique pageviews" in Matomo because when the same visitor visits several times the same page over a day (as part of different visits) it isn't counted as one unique pageview in Matomo but multiple. Here comes a benefit from Custom Reports that you can also get a true unique pageview number by selecting "Unique visitors". So even if the same visitor opens the same page in different visits, it is only counted as one.

For evolution graphs you could get similar data like this:

screenshot at dec 18 08-21-53

BTW: you can also always email us : shop@innocraft.com

@tsteur commented on December 17th 2018 Member

Sorry I just realised that I was looking at monthly data in my tests.

"Unique Visitors" is what matches the built-in behaviour in Matomo for day reports.

For week, month, year and range reports, the unique pageviews value reported in Matomo will be the same as the "Visits" metric in Custom Reports. "Unique visitors" will be more accurate in Custom Reports because it will access the raw data for weeks and months and generate more accurate data compared to Matomo.

@labolanimichele commented on December 18th 2018

Thank you @tsteur - and thanks for the email. I thought writing here would allow everyone to access the information though ;)

@tsteur commented on December 18th 2018 Member


This Issue was closed on December 14th 2018
Powered by GitHub Issue Mirror