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

Segment with pageURLs + language is not working #15130

Closed
mstenz opened this issue Nov 7, 2019 · 17 comments
Closed

Segment with pageURLs + language is not working #15130

mstenz opened this issue Nov 7, 2019 · 17 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@mstenz
Copy link

mstenz commented Nov 7, 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
Copy link
Member

tsteur commented Nov 7, 2019

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

See #11900 or #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
Copy link
Author

mstenz commented Nov 7, 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: #8450 (comment)

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
Copy link
Member

tsteur commented Nov 7, 2019

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
Copy link
Author

mstenz commented Nov 7, 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
Copy link
Author

mstenz commented Nov 7, 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
Copy link
Member

tsteur commented Nov 7, 2019

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
Copy link
Author

mstenz commented Nov 7, 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
Copy link
Member

tsteur commented Nov 7, 2019

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
Copy link
Author

mstenz commented Nov 8, 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.

@mstenz
Copy link
Author

mstenz commented Nov 15, 2019

Sorry, it will take longer to took the screenshots. But its on my todo list.

@Tim197
Copy link

Tim197 commented Jan 3, 2020

my understanding from what I read in this thread:

Case:
We have a segment x which filters on one specific page url xyz.
The result doesn't show only this page url. Same with the report as a consequence of this.

My understanding why this is happening:
So we have the situation that there are e.x. 2 page url in the segment x (--> page url xyz and page url mnb). If a user visit one of them, only this one will be shown in the report. But if the user visit both of them, both will be shown in the report. Correct?

Is that intended and could only page urls which are inluded in the segment show up in the report for this segment x?

@tsteur
Copy link
Member

tsteur commented Jan 5, 2020

My understanding why this is happening:
So we have the situation that there are e.x. 2 page url in the segment x (--> page url xyz and page url mnb). If a user visit one of them, only this one will be shown in the report. But if the user visit both of them, both will be shown in the report. Correct?

It will always show all pages the user visited. Basically, Matomo will check which visits have viewed the given page URL at least once, then return all page URLs viewed by all these visitors.

This is intended behaviour and how segmentation should work. Before it was a bug that it was only returning the page urls from the segment.

@ldibanyez
Copy link

I have noticed this behaviour on a filter using "downloadURL".

Can you confirm that what you describe is the expected behaviour for that type as well?

Can you confirm that the expected behaviour for any URL filter type is to show pages visited during the same visit of that URL?

@tsteur
Copy link
Member

tsteur commented Jan 21, 2020

Yes, this the expected behaviour. It is the expect behaviour for any url filter.

@viezel
Copy link

viezel commented Jan 22, 2020

I have added a FR to address this issue here #15438. Lets upvote it, so we can get this fixed.

@Petsios
Copy link

Petsios commented May 25, 2021

@tsteur Hi, i have the same issue with segment that displays results of other segments in reports.
I have the version 4.2.1 of matomo.
I would like to know if with custom reports we can only filter results of the current segment without displaying all the pages viewed during the visit (including results of other segments)

Thank you.

@tsteur
Copy link
Member

tsteur commented May 25, 2021

@Petsios yes that should work

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

6 participants