@mstenz opened this Issue on November 7th 2019

(Maybe other combination works as well not correctly but have not checked).
I have a segment like this
(Page-URL contains "xyz" OR Page-URL contains "zyx") AND language = "ja"

It should contain only page URLs that are opened with a browser that is with Japanese language (at least thats my understanding), but instead it also shows other Page URLs and visits that are not related to xyz an zyx.
If i remove the language part it works as expected and shows only Page URLs from xyz and zyx.

@tsteur commented on November 7th 2019 Member

@mstenz this is expected behaviour with latest release I would say. Which API method are you calling?

See https://github.com/matomo-org/matomo/issues/11900 or https://github.com/matomo-org/matomo/issues/9796

That it was only showing that specific URL was basically a bug. In case you are calling eg Actions.getPageUrls then the correct behaviour is to show all viewed Page URLs that were visited by people who have viewed one of the segment Page URLs...

@mstenz commented on November 7th 2019

Yes, it seems its about the change mentioned in #11900.
Especially because the behaviour was different before and nobobdy expected this change.
When I create a Segment that only contains certain Page URL's i would normally expect that also in the report only this URL's are showing.
Please also see this comment from @mattab about it some time ago: https://github.com/matomo-org/matomo/issues/8450#issuecomment-140279475

Which API method are you calling?

I use the PageURL's report from the UI.

We need a report that shows how many users visited page URLs started with X in the choosen timeframe. Because our SLA's are based on this. How can i create this report with the newer version?

@tsteur commented on November 7th 2019 Member

What you probably want to use is maybe the label filter in the API see https://developer.matomo.org/api-reference/reporting-api or you search within the data table in the UI.

If you have Custom Reports then you can use this plugin to create such a report as it allows to define "segment filters".

You could for now probably also disable this new behaviour using a config setting in config/config.ini.php:

[General]
enable_segments_cache = 0

But we don't recommend this and it will be removed in Matomo 4 where you would have the same problem again. There may be also other issues with disabling this setting but it should work.

@mstenz commented on November 7th 2019

thx for the answer. maybe i will disable it for now.
I do not use Custome Reports and i cannot use the API because i need the numbers in the Overview UI Section, now the rows about the page URL's itself, this is also the reason why i cannot use search in the data table because Overview page does not contain a data table.
I have created a new Feature request as already referenced here to allow both situation as the user wants, because there are different expectations of the outcome of segments based on the usecase.

@mstenz commented on November 7th 2019

Oh, one more important thing. there is an inconsistancy. As you see in my first message, it shows only page URL's in the segmented report if only pageURL's are used in the segment itself. (no language metric). So if the new behaviour is that the whole session data should be shown there is a bug now here.

@tsteur commented on November 7th 2019 Member

So if the new behaviour is that the whole session data should be shown there is a bug now here.

That's expected and how the segmentation feature should work. Also this way it works AFIAK on GA for example.

@mstenz commented on November 7th 2019

That's expected

Are you sure, just to make it clear, what i mean is that when i create a segment with pageURL=xyz it will only show this one pageURL in results, whiile when a i make a segment with pageURL=xyz AND language=ja it will show also other pageURL's in the report.
This is not consistent behaviour and the second segment should normally contain less data than the first, but its the opposite way now.

@tsteur commented on November 7th 2019 Member

Are you sure, just to make it clear, what i mean is that when i create a segment with pageURL=xyz it will only show this one pageURL in results, whiile when a i make a segment with pageURL=xyz AND language=ja it will show also other pageURL's in the report.

I just tested it, and using the new behaviour in 3.12 in both cases it will show all page urls that were viewed by these users. When you test this, maybev invalidate previously created reports maybe to make sure the new logic is used. Or try to create a completely new segment to test this.

@mstenz commented on November 8th 2019

Or try to create a completely new segment to test this.

This is on a segment that was created after update to 3.12. Let me create 2 screenshots tomorrow so you can see.

This Issue was closed on November 7th 2019
Powered by GitHub Issue Mirror