matomo-org / matomo-org/developer-documentation
Documentation around Segmentation
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 58
- Forks
- 88
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 13
Description
Our documentation currently leaks some details around Segmentation. There is only https://developer.matomo.org/guides/dimensions#segmentation, which mentions how new segments can be defined for a dimension.
We should add at least some documentation around `Dimension::configureSegments` and the special methods of `Piwik\Plugin\Segment` that can be used to define more complex segments. Like `setSqlFilter`, `setSqlFilterValue` or `setUnionOfSegments`.
In addition we should also mention that segments can be manipulated outside of dimensions by using the hooks of `Piwik\Segment\SegmentsList`: `Segment.addSegments` and `Segment.filterSegment`
Not sure where to add that, maybe https://developer.matomo.org/guides/segments would be the correct place. We could add a new section like `How to provide new Segments` or similar.
follow-up to https://github.com/matomo-org/matomo/pull/18953
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing dimensions#segmentation guide and the guides/segments page to determine where this material belongs. Document Dimension::configureSegments, the listed Piwik\Plugin\Segment methods, and the Segment.addSegments and Segment.filterSegment hooks. Done means the documentation explains these extension points and how they support complex or externally defined segments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100