Segments

Segmentation can be used to simplify queries, compare segments, analyze specific segments, and generate actionable lists quickly and easily.

Creating and using segments is open to all users, when non-admin users can only update the segments they created (like reports).

Creating a segment using the Cohort Report

To create a segment from any cohort report:

  1. Open a cohort report, in the report editor or dashboard.
  2. Mark any section of the table by clicking on it: individual cells, whole rows or whole columns.
  3. From the top right of the preview area, click "Explore users" and select "Create segment".
  4. In the popup that was opened, enter the desired segment name and click "Create segment".
  5. A save confirmation message will appear. To edit the segment query or set an update schedule, click the link in the confirmation message to go to the segment editor page.

create segment from cohort

Creating a segment using the CQL Editor

You can use the CQL editor interface to create a segment. To create a new segment using the segment builder:

  1. Go to Project / Segments in the main menu.
  2. Click the "+" button, and select "CQL Editor".

This can be used to:

  • Edit segments created from a report.
  • Create a segment based on a query you already use.
  • Create complex segment queries (not available in the segment builder).

Note to adhere to the following rules:

  • A segment must contain only user_id: no matter what query you use, the final response must include a single column containing "user_id" values to work as a user segment. If your query contains additional properties, precede it by "SELECT user_id FROM (…) " to isolate the "user_id" column.
  • A segment should contain only unique values: to avoid getting duplicate results, end your query in "GROUP BY user_id".

The default segment query template, available when opening a new CQL Editor segment, already includes the required syntax specified above. Edit it or replace the FROM clause to keep the correct syntax. Note that invalid syntax will not be possible to save.

select user_id
from cooladata
where date_range(last 7 days)
group by user_id
Segment CQL editor

Creating a segment using the Segment Builder

The segment builder provides an easy to use interface for creating advanced behavioral segments. To create a new segment using the segment builder:

  1. Go to Project / Segments in the main menu.
  2. Click the "+" button, and select "Builder".

The builder consists of conditions and filters.

Conditions include the following 3 options:

  • Users who did anything: select a segment of users who were active in the specified time period.
  • Users who did specific events: select a segment of users who did any of a list of specific event in the specified time period.
  • Users who had a comparative KPI value: select a segment of users whose KPIs in the specified time period were above/below a value. Allows you to select from preset behavioral KPI templates or define any calculation on any property using custom KPIs.

You can add up to 5 conditions in a single segment query, for example: to filter by consecutive behaviors – by choosing different time periods for each condition, or to drill down into your segment further by intersecting several condition types.

Filters:

  • You can filter any specific condition based on any property. For example, users whose purchases are below $10 by calculating the SUM of "cost" in event "buy".
  • You can filter all users in the segment based on any user/session property. For example, only include users from the US by filtering "ip_country" to be in "United States".

segment builder

Segments List

To see and manage all saved segments in your project go to Project – Segments in the main menu.

Segments list

From here you can:

  • See a list of saved segments
  • Edit saved segments
  • Delete saved segments
  • See the run (update) history of each segment
  • Run (update) a segment manually
  • Create new segments

Using segments in reports and dashboards

Segmentation can be used to simplify queries, compare segments, analyze specific segments, and generate actionable lists quickly and easily.

Filtering by segment

Narrow down your reports and dashboard by showing only users from specific segments.To filter by segments:

  1. Open any filter: report, sheet or dashboard.
  2. From the properties list, choose "segment".
  3. Select the segments you want the user to be part of. Enter multiple segments if the users must be part of all of them, i.e. the intersection of the segments. For example: include both "new_users" and "new_shoppers" to only show users who made their first purchase and are also new to the site.
  4. You can include several segment conditions in one filter using the AND operator. However, note that the OR operator is not allowed in conjunction with segment filters.

filter by segment

Cohort report by segment

In any Cohort report, group users into cohorts based on their segments and compare between them.To cohort by segments:

  1. Open any Cohort report
  2. In the "Group cohorts by" section, choose "segment".
  3. Select any segments you wish to include in report.
  4. Optional: add "Other" to the segments list to also include users who do not belong to any of the segments you specified.

cohort by segment

KPI breakdown by segment

In any KPI report, add a breakdown by segments to show which segment the user belongs to.Note that users that belong to more than one segment will appear multiple times – once for each segment.To break down a KPI by segments:

  1. Open any KPI report
  2. In the breakdown (bottom) section, choose "segment" from the first row options.
  3. Select any segments you wish to include in report.
  4. Optional: add "Other" to the segments list to also include users who do not belong to any of the segments you specified.

kpi breakdown by segment

Funnel breakdown by segment

In any Funnel report, add a breakdown by segments to split the funnel steps to the segments and compare between them.Note that users that belong to more than one segment will appear in each segment.To break down a funnel by segments:

  1. Open any Funnel report
  2. In the breakdown (bottom) section, choose "segment".
  3. Select any segments you wish to include in report.
  4. Optional: add "Other" to the segments list to also include users who do not belong to any of the segments you specified.

funnel breakdown by segment