Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Segments: Filtering by country results in inconsistent data #22142

Closed
4 tasks done
itslewin opened this issue Apr 22, 2024 · 4 comments
Closed
4 tasks done

[Bug] Segments: Filtering by country results in inconsistent data #22142

itslewin opened this issue Apr 22, 2024 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@itslewin
Copy link

What happened?

We have a self-hosted instance of Matomo 5.0.3 running on our servers and are running into an issue when filtering Matomo statistics by user country.

We created a segment that should exclude data for visitors in Luxembourg:
Bildschirmfoto 2024-04-22 um 12 09 08

Data from Luxembourg is also successfully excluded, however we also lose a bunch of data points from other countries.
This is the visitor location overview without any custom segments (all visits):

Bildschirmfoto 2024-04-22 um 12 05 36 1

This is the visitor location overview with the above segment enabled (Country is not Luxembourg):

Bildschirmfoto 2024-04-22 um 12 08 13

You can see that visits drop dramatically for all countries, even though the segment should only touch data from Luxembourg.
Are we using it wrong? Is there any indication why this behaviour could happen?

What should happen?

Excluding data from one country (e.g. Luxembourg) should not change data points from other countries, just remove the data points from the specified country.

How can this be reproduced?

Click on Visitors > Click on Locations > Enable Country excluding Segment > Compare statistics

Bildschirmfoto 2024-04-22 um 12 41 32

Matomo version

5.0.3

PHP version

No response

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

@itslewin itslewin added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Apr 22, 2024
@sgiehl
Copy link
Member

sgiehl commented Apr 22, 2024

Hi @itslewin
Thanks for creating this issue. The number should indeed not differ in that case.
Did you maybe check if the numbers are also incorrect when looking through all months of that year?
Just wondering if that is a problem in general or if some data was maybe not correctly archived for this segment.

@sgiehl sgiehl added Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. and removed To Triage An issue awaiting triage by a Matomo core team member labels Apr 22, 2024
@itslewin
Copy link
Author

Hi @itslewin Thanks for creating this issue. The number should indeed not differ in that case. Did you maybe check if the numbers are also incorrect when looking through all months of that year? Just wondering if that is a problem in general or if some data was maybe not correctly archived for this segment.

We indeed seem to have a problem in the months from May to September, where the segment filters all visitor data for some reason. April and October are only slightly incorrect. For the first and last few month the data is correct.

Bildschirmfoto 2024-04-23 um 17 01 00

@sgiehl
Copy link
Member

sgiehl commented Apr 24, 2024

I can imagine various reasons why that can be that case.

  • Are you maybe using the feature to automatically remove old raw data?
  • Was the segment maybe created recently and Matomo is configured to only process segments for certain time in the past (process_new_segments_from config flag)?

@itslewin
Copy link
Author

I can imagine various reasons why that can be that case.

  • Are you maybe using the feature to automatically remove old raw data?
  • Was the segment maybe created recently and Matomo is configured to only process segments for certain time in the past (process_new_segments_from config flag)?

Thank you, indeed our setup was the issue. Sorry to bother you!

@sgiehl sgiehl added answered For when a question was asked and we referred to forum or answered it. and removed Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants