Follow up of #2135
Here is a list of ideas to improve the segment editor:
Please post in comments your suggestion regarding the Segment Editor.
In 047412dee8725f6f69b2c8f6bfe04d905f180673: Refs #2135
* Not forwarding segment parameter to the top menu links
Note: ideally we should display the Segment Editor on the WIDGET and API pages refs <a href='/3934'>#3934</a>
Hi Julien, I'll link the commit here for faster recognition, since the commit didn't trigger the trac plugin. (https://github.com/piwik/piwik/commit/8a8ce3eccb13c11037b79112513bcbe6ef7e2ccf)
I tested the report feature and it's very nice to handle! I discovered one bug.
When a segment with ">" or "<" (and perhaps other operators) is selected, the API is triggered with an urlencoded operator. API-Result:
<result><error message="API returned an error: The segment 'daysSinceLastVisit>' is not valid. "/></result>
Segment definition in piwik_segment: "daysSinceLastVisit>3".
Thanks for the report.
I replicated the issue.
At line http://git.piwik.org/piwik.git/blob/master/plugins/PDFReports/API.php#L373, I pass the segment definition without escaping entities such as :
It is URL encoded at http://git.piwik.org/piwik.git/blob/master/core/Common.php#L193
I am unsure how best to handle this case.
Very nice patch Julien!
the segment= value should be URL encoded. it should work once you URL encode it.
The segment was created by the segment editor. No manual segment hacking was involved.
In 247691109695bb5af76a06330259193a2bf8f32e: Refs #3934 Thanks Peter for testing and finding this. the array_map('urlencode', fixes it
In a930ce4289a90a168d7f9d37ad0f813569617e10: Refs #3934 much better fix
Adding suggestion "Support Segmentation for Page Overlay" <- quite easy since the API already supports &segment parameter!
What about using Outlinks / Downloads as Segment? Would be nice to see customers leaving by a specific outlink, which come back via another link on that outlink page.
At the Moment, only the Super-User can set the Segment Visibility / Availability (This website only / All Websites) and if the Segment should be Pre-processed.
An admin for a Website should be able to set these parameters as well. Except the setting for "All websites / this Website only". A new Segment, setup by a "normal" Admin, should be automatically set to "this page only".
Changing the visibility or removing a segment can break scheduled reports.
When developing new improvements for the segment editor, do remember that segments can be referenced and accessed by scheduled reports, see :
Let's create new issues for each idea separately