Segments
A segment is a subset of your data based on rules that define a meaningful grouping, such as by region, device, returning customer, and so on.
You can add segments to a report, remove segments, and add segments to a collection. If you have the needed rights, you can also create, modify, and delete segments.
Segment rules
When you create a segment, you define rules based on one or more parameter values, operators, and scope.
Parameters
By default, standard parameters are available in the New Segment or Edit Segment dialog.
If you have the necessary rights, you can make other parameters collected for your account available for use in segments. For details, see editing parameters.
Operators
If you do not select any segments for a report or its collection, all data collected for your account will be queried when you render it (by default, the ALL operator is used).
Once you drag-and-drop a parameter into the expression builder, you can specify a value and various operators.
When the parameter's data type is string, the following operators are available:
- exists
- does not exist
- equals (the default)
- does not equal
- starts with
- does not start with
- ends with
- does not end with
- contains
- does not contain
When the parameter's data type is numerical, the following operators are available in the expression builder:
- exists
- does not exist
- equals (the default)
- does not equal
- less than (<)
- less than or equal to
- greater than (>)
- greater than or equal to
If you specify multiple values for a parameter value, OR logic is used.
Within a specified scope, you can select AND or OR logic between parameters.
- AND: All of the conditions exist within the scope.
- OR: Any of the conditions exist within the scope—except when using the not operators, such as does not equal.
Be careful when using not operators. For example, if you specify the following event scope logic, the indicated events are included:
(Page URL does not equal 2 OR 3) OR (SKU does not equal B)
Event | Before split | Included? |
---|---|---|
E1 | Page=1 & SKU=A;B | |
E2 | Page=2 & SKU=C | |
E3 | Page=3 & SKU=B | |
E4 | Page=4 & SKU=D;E |
AND operator between expression groups
When using multiple expression groups, each group is separated by an AND operator. The order of the scopes can determine the query outcome. Click Move up or Move down to adjust the order.
Segment scope
You can select one of the following values from the segment scope list when you create or edit a segment.
Scope type | Description | Supported parameters |
---|---|---|
Events | (The default scope) Returns all events that match the criteria. You can add a maximum of one Events scope. | Any |
Sessions | Identify the sessions that match the criteria, and return all the events in those sessions. You can add a maximum of one Sessions scope. | Any |
Users | Identify all the users that match the criteria, and return all the events in all the sessions for those users. You can add a maximum of one Users scope. | Any |
Parameters | Returns events when parameters that have been split and correlated match the criteria. You can add as many Parameters scopes as needed. This scope type only supports parameters that have been split in parameter advanced options and correlated. | Multi-value split-and-correlated |
The Parameters scope type can only be used with split parameters, so this value will not be displayed in the scope list unless the selected parameter was previously defined as a split-and-correlate parameter within parameter advanced options.
The following standard parameters are split by semicolon:
Parameter name | Parameter |
---|---|
Content Group | data.wt.cg_n
|
Content Sub Group | data.wt.cg_s
|
Product SKU | data.wt.pn_sku
|
Scenario Name | data.wt.si_n
|
Scenario Step Name | data.wt.si_p
|
Scenario Step Number | data.wt.si_x
|
Transaction Subtotal | data.wt.tx_s
|
Units | data.wt.tx_u
|
You can also set up custom parameters as split-and-correlate parameters.
Be careful when using negative operators. Consider the following examples:
Operator | Events scope type | Sessions scope type | Users scope type |
---|---|---|---|
equals | Exact event match | Any one event in the session matches | Any one event in any one session for the user |
does not equal | Events that do not match | All events in the session do not match | All events in all sessions for the user does not match |
Stage equals a (add to cart) |
Events that have add to cart | Session has at least one event with add to cart | User has at least one session with at least one event with add to cart |
Stage does not equal a (add to cart) |
Events that do not have add to cart | Session has no events with add to cart | User has no sessions with add to cart |
Important: The use of the User scope in segments will increase the time to load report data.
Example of event scope vs. parameter scope
Some of the following events are split by semicolons.
Event | Before split | After split and correlate |
---|---|---|
E1 | Transaction=view & SKU=C & Units=1 & Subtotal=2.00 | Transaction=view & SKU=C & Units=1 & Subtotal=2.00 |
E2 | Transaction=view & SKU=B & Units=1 & Subtotal=10.00 | Transaction=view & SKU=B & Units=1 & Subtotal=10.00 |
E3 | Transaction=cart addition & SKU=A;B & Units=1;3 & Subtotal=5.00;10.00 |
|
E4 | Transaction=purchase & SKU=A;B;C & Units=1;3;2 & Subtotal=5.00;10.00;2.00 |
|
Example events included in scope logic
Based on the events above, the following table shows events or parameters included based on the scope:
Scope logic | Events |
---|---|
Include events where SKU=A | None |
Include events where SKU=A OR B | E2 (before and after splitting) |
Include events where SKU=A AND B | E3 (after splitting) |
Include parameters where SKU=A | E3.1, E4.1 |
Include parameters where SKU=A OR B | E3.1, E3.2, E4.1, E4.2 |
Include parameters where SKU=A AND B | None |
Next steps
Removing segments from a report
Adding segments to a collection
Removing segments from a collection
Deleting a segment from Oracle Infinity
When to use search versus a segment