-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Context
Piwik lets you assign Custom Variables to visit and/or pageviews (and site searches, events, etc.). Users can then create Custom Segments to get reports for all visits and pages matching a particular Custom Variable.
Goal
The goal of this ticket is to make creating segments with custom variables more user friendly.
Why are segments hard to use with Custom variables?
To create a segment with a custom variable, user has to know which slot the custom variable was created in (slot is a number from 1 to N). A segment to select only page views tagged with a particular author would like this: customVariableNamePage1==author,customVariableValuePage1==xyz
This is hard to use by users who may not know which slot was a given custom variable set.
Proposed solution
- Create new segments providing shortcuts, ie.
customVariableNamePage==name_here
which would automatically select any page view with a custom variable name set withname_here
. The generated SQL would look something likecustom_var_k1 == name_here OR custom_var_k2 == name_here OR custom_var_k3 == name_here OR custom_var_k4 == name_here OR custom_var_k5 == name_here
- similarly create new segment for the value
customVariableValuePage
- and the same segments for the "Visit" scope:
customVariableName
andcustomVariableValue
- the auto-completer for the segment
customVariableName
would show all possible custom variable names for all slots.
Adding this new "magic segment" matching any slot should make the act of creating custom segments with custom variables much easier. Thoughts?