Hi all, I’m wondering if there are some (hidden ) features that I still don’t see about segment creation, i.e.:
create a segment based on a previous one, basically copying automatically the conditions of the “base” segment - and then manually adding other conditions;
create a condition that will be interpreted as
(cond1 OR cond2) AND cond3
and not as
cond1 OR (cond2 AND cond3)
because of the standard operator precedence;
create a condition like City IN (Rome, Milan, Naples, ...)
instead of creating multiple conditions like (City is Rome OR City is Milan OR City is Naples OR...)
Thanks !
Marco_Sciamanna:
create a segment based on a previous one, basically copying automatically the conditions of the “base” segment - and then manually adding other conditions;
No, but:
opened 08:06PM - 25 Sep 22 UTC
Enhancement
There are many segments that are used commonly. Some of them can be very hard to… build and hard to figure out. For example:
How to segment only new visitors
<img width="932" alt="image" src="https://user-images.githubusercontent.com/273120/192162941-217689ff-15f8-4f33-ab90-be4fa6f83ffe.png">
How to segment returning visits
<img width="917" alt="image" src="https://user-images.githubusercontent.com/273120/192162950-814f6c07-e329-4550-84bd-a77b6f13b45b.png">
How to segment people that not bounced
<img width="928" alt="image" src="https://user-images.githubusercontent.com/273120/192162968-857fa403-8eed-4ae6-85dd-907b6cf3383a.png">
Segment bouncers
<img width="934" alt="image" src="https://user-images.githubusercontent.com/273120/192162974-61cc3565-776d-43ae-8008-f213a4e75d46.png">
Segment visits that searched often
<img width="935" alt="image" src="https://user-images.githubusercontent.com/273120/192162982-97c0f355-0a22-49d8-96ac-ad0c05ce9112.png">
Segment smartphone users (same for desktop, tablet, mobile (smartphone+tablet))
<img width="923" alt="image" src="https://user-images.githubusercontent.com/273120/192162996-015c1f12-dd63-480e-8915-ac55c6ec67b5.png">
Segment by channel type (eg visits coming from websites or direct or search or ...)
<img width="932" alt="image" src="https://user-images.githubusercontent.com/273120/192163036-776fafbd-6b9e-4382-8558-7d9b6a303ad5.png">
And many more. They are all not trivial to create and figure out how to do this. It be great to have a list of segments to choose from.
opened 12:50AM - 04 Feb 15 UTC
Major
Enhancement
c: Usability
c: Onboarding
c: Consistent Reports & Analytics UX
c: Segments
And let plugins extend this set of segments.
List could contain segments eg for…
- Purchased something
- Converted a goal
- Direct Referrer
- Used search
- Mobile visitors
- New visitors
- Returning visitors
- ...
This would be available in the Segment Editor and for example prefill the forms in the Segment Editor or load it directly...
,
Marco_Sciamanna:
create a condition that will be interpreted as
(cond1 OR cond2) AND cond3
and not as
cond1 OR (cond2 AND cond3)
because of the standard operator precedence;
opened 07:35AM - 22 Feb 19 UTC
Enhancement
It would be valuable to be able to create segments made of other segments. The i… dea is that when creating a segment, there would be a new set of segments which would let you reuse any other existing segment.
For example you could have a segment `Contacted us` and create another segment `Contacted us (Newsletter)` which would say "Campaign Source is `newsletter` AND Visit match segment `Contacted us'`. So you can reuse another segment and not duplicate the logic. And it is now possible to select "Visit match segment XYZ" for any existing segment.
## Why is it valuable?
There are use cases where it's not possible to create one segment that matches all conditions we need.
* For example to define a segment where a visitor IP is within a set of IP ranges. See faq https://matomo.org/faq/how-to/faq_21018/ - one can write visitIp>=147.28.0.0 AND visitIp<=147.28.255.255 but you can't write multiple such statements separated by OR combination, because the OR takes precedence (see https://developer.matomo.org/api-reference/reporting-api-segmentation#combine-segments-with-and-and-or-expressions ). It's simply impossible currently to create a segment like this and combine multiple conditions. But it would be great to be able to create a segment "Visit match segment RangeX OR Visit match segment RangeY OR Visit match segment RangeZ".
* There are several various use cases around reusing segments and minimising duplication of segment definitions across multiple segments. For example: Let's say you have an existing segments isolating a sub folder of your site ("Page URL contains /sub-folder/) and another existing one to only see 404s and 500s (Custom dimension Page code is 400 or Custom dimension page code is 500), could you apply both at the same time instead of creating a new one that has both sets of conditions?
https://developer.matomo.org/api-reference/reporting-api-segmentation#combine-segments-with-and-and-or-expressions
,
Marco_Sciamanna:
create a condition like City IN (Rome, Milan, Naples, ...)
instead of creating multiple conditions like (City is Rome OR City is Milan OR City is Naples OR...)
See also the previous links
,
In all cases, you can create a feature request:
1 Like
Thanks Philippe, next time I’ll check more deeply the open issues on github before posting !
1 Like