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

Adds segmented log feature to more reports #13939

Merged
merged 6 commits into from Jan 22, 2019
Merged

Adds segmented log feature to more reports #13939

merged 6 commits into from Jan 22, 2019

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jan 7, 2019

fixes #7212

@sgiehl sgiehl added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Jan 7, 2019
@sgiehl sgiehl added this to the 3.9.0 milestone Jan 7, 2019
@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Jan 8, 2019
$msg = 'AddSegmentByRangeLabel is called without having any segment defined';
Development::error($msg);
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to do this in the constructor? Or is there a benefit to doing it here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also is this something that could happen in production? If so maybe the log should appear all the time instead of just in development mode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't have too much thoughts on that. Actually it's the same as in https://github.com/matomo-org/matomo/blob/3.x-dev/core/DataTable/Filter/AddSegmentByLabel.php
The error should not happen in production, as it should be fixed while development if it ever occurs.

if ($url) {
$row->setMetadata('segmentValue', urldecode($url));
} else if ($this->isPageTitleType && $label != -1) {
$row->setMetadata('segmentValue', trim(urldecode($label)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the -1 for ID_SUMMARY_ROW, maybe it should also check for the new totals row? Also not sure if it's really necessary, but should we check if $label is not false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check is required. Otherwise the summary row will have a segmented log feature, which can't work. Will add that for totals row as well....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. No need to check for totals row, as that row will be added afterwards. Summary row might exist before.

@diosmosis
Copy link
Member

This doesn't seem to work in the "Visits by Days Since Last Visit" report. Clicking on the segment for "0 days" since last visit selects all visits. There's also no segment icon for the "New Visits" row.

@diosmosis
Copy link
Member

"Page Titles Following a Site Search"/"Pages Following a Site Search"/"Search Categories" don't have segment icons. Not sure if they're supposed to be added in this PR.

@sgiehl
Copy link
Member Author

sgiehl commented Jan 16, 2019

There's also no segment icon for the "New Visits" row.

This should be fixed now.

This doesn't seem to work in the "Visits by Days Since Last Visit" report. Clicking on the segment for "0 days" since last visit selects all visits.

The segment should be set correctly. Maybe the segment isn't working correctly?

"Page Titles Following a Site Search"/"Pages Following a Site Search"/"Search Categories" don't have segment icons.

Are there any segments we could use for this?

@diosmosis
Copy link
Member

Are there any segments we could use for this?

Doesn't look like it, guess they'd have to be new if adding them.

@sgiehl
Copy link
Member Author

sgiehl commented Jan 21, 2019

wasn't mentioned in #7212, so wouldn't include it here

@diosmosis
Copy link
Member

Tested locally, works for me.

@diosmosis diosmosis merged commit 70090f4 into 3.x-dev Jan 22, 2019
@diosmosis diosmosis deleted the segmentedlogs branch January 22, 2019 01:38
@mattab mattab modified the milestones: 3.9.0, 3.8.1 Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display the "Segmented Visitor Log" icon in more reports
3 participants