Segments on custom dimensions for all websites cannot be created
When creating a segment using a custom dimension, it is not possible to make it for "all websites". When attempting to save with "all websites" selected, the error "The specified segment is invalid: Segment 'dimension1' is not a supported segment." is returned.
This dimension does exist for all websites. However there are some deleted websites that would not have the dimension defined. I'm not sure if this is relevant.
Context
I have 20+ sites defined, and it was time consuming enough to have to create the dimensions for each site as previously we used variables and this was not required. However it's done now, but I would like to avoid having to recreate the segments individually for every site as well.
Expected Behavior
The segment would save and be available for all sites.
Current Behavior
Saving the segment causes the error "The specified segment is invalid: Segment 'dimension1' is not a supported segment."
Possible Solution
Either
- fix whatever is stopping the segment to save
- provide more information about what is causing the segment not to save (e.g. is it a specific website?)
- if not possible to fix, provide a way to copy segments between websites (even a manual script would be appreciated)
Steps to Reproduce (for Bugs)
- Create a custom dimension on all sites
- Create a segment using that custom dimension, and select "all websites"
Your Environment
- Matomo Version: 4.15.0
- PHP Version: 8.1.18
- Server Operating System: Ubuntu 20 (running in docker)
- Additionally installed plugins: MarketingCampaignsReporting (I read somewhere that this fixed the issue, but it doesn't)
- Browser: Chrome
- Operating System: Windows
Source: matomo-org/matomo