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

Segments: Segments created in real time using API #16462

Closed
KarthikRaja1388 opened this issue Sep 23, 2020 · 5 comments · Fixed by #16465
Closed

Segments: Segments created in real time using API #16462

KarthikRaja1388 opened this issue Sep 23, 2020 · 5 comments · Fixed by #16465
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@KarthikRaja1388
Copy link

KarthikRaja1388 commented Sep 23, 2020

A user managed to create a Segment using API in real time which not an expected behaviour. Can we investigate and check if there is any issue.

https://XXXX.matomo.cloud/?module=API&method=Actions.getPageUrls&idSite=5&period=range&date=last30,2020-09-15&format=json&token_auth=XXXX&expanded=1&flat=1&segment=pageUrl=&depth=1

@mattab
Copy link
Member

mattab commented Sep 23, 2020

This is on Cloud where we have enable_create_realtime_segments = 0

@tsteur
Copy link
Member

tsteur commented Sep 23, 2020

Can you reproduce this @KarthikRaja1388 @mattab ? It should generally through an exception here: https://github.com/matomo-org/matomo/blob/4.0.0-a2/plugins/SegmentEditor/API.php#L108-L114

The API call above doesn't seem to be quite correct?

@xelven
Copy link

xelven commented Sep 23, 2020

I was using the matomo official service create a segment via api (method: SegmentEditor.add), in the pass is all ok, but from yseterday I keep getting related error as well below:

"The Segment 'https://ics2020.eventxtra.com' is set to 'segmented reports are processed in real time' but Matomo is not currently configured to process segmented reports in API requests. To see data for this report in the future, you will need to edit your segment and choose the option labeled 'segmented reports are pre-processed (faster, requires cron)'. Then after a few hours your segment data should become available through the API. (If it does not, there may be a problem.)"

it is something updated in there recently ?
what can I do to avoid it in API create SegmentEditor.add with segmented reports are processed in real time ?

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 23, 2020
@tsteur tsteur added this to the 4.0.0 RC milestone Sep 23, 2020
@tsteur
Copy link
Member

tsteur commented Sep 23, 2020

I can reproduce this locally and created a patch in #16465

@xelven there was nothing updated recently.

what can I do to avoid it in API create SegmentEditor.add with segmented reports are processed in real time ?

Make sure to set &autoArchive=1 in the API and then it would work. It's possible above message was only shown because the report had not been generated yet and it will go away soon (or maybe is already).

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/segmentation-weird-results/56187/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants