@mattab opened this Issue on May 12th 2013 Member

Follow up of #2135

Here is a list of ideas to improve the segment editor:

  • idea: include the segments selector in the "all websites" overview? A user could be able to apply a segment which was created for "all websites".
  • the Segment should be forwarded to the Overlay report, to get the Segmented Overlay of a page. The Custom Segment name would be displayed in the left menu. Covered in #9256
  • a user should be able to only create and "save" a segment and not apply it yet to the reports. If you want to create a bunch of segments, "save & apply" could be really slow and disturb the workflow.
  • new feature for "cloning" a segment could be nice. If you have a complex segment and you only want to change a few details, this feature would be quite handy.
  • (done) The segment editor should be visible within the PDFReports plugin to have segmented PDF / HTML Reports available (perhaps it would make sense to include the segments name within the Report, as well)
  • If a segment is selected in a PDFReport, does it make sense to automatically set it to "auto_archive"?
  • The website admin should be able to set segment parameters (visibility and pre-processing)

Please post in comments your suggestion regarding the Segment Editor.

@mattab commented on May 17th 2013 Member

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>
@peterbo commented on May 20th 2013 Contributor

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&gt' is not valid. "/></result>

Segment definition in piwik_segment: "daysSinceLastVisit>3".

@julienmoumne commented on May 20th 2013 Member

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.

@mattab commented on May 21st 2013 Member

Very nice patch Julien!

the segment= value should be URL encoded. it should work once you URL encode it.

@peterbo commented on May 21st 2013 Contributor

Hey Matt!

The segment was created by the segment editor. No manual segment hacking was involved.

@mattab commented on May 23rd 2013 Member

In 247691109695bb5af76a06330259193a2bf8f32e: Refs #3934 Thanks Peter for testing and finding this. the array_map('urlencode', fixes it

@mattab commented on May 23rd 2013 Member

In a930ce4289a90a168d7f9d37ad0f813569617e10: Refs #3934 much better fix

@mattab commented on May 27th 2013 Member

Adding suggestion "Support Segmentation for Page Overlay" <- quite easy since the API already supports &segment parameter!

@pebosi commented on May 29th 2013 Contributor

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.

@peterbo commented on October 24th 2013 Contributor

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".

@julienmoumne commented on October 27th 2013 Member

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 :

@mattab commented on February 14th 2019 Member

Let's create new issues for each idea separately

This Issue was closed on February 14th 2019
Powered by GitHub Issue Mirror