How do I create custom segments of visitors and apply the segments to filter my report’s data?

Segmentation is a method to obtain a selected portion of your analytics data rather than the all of your aggregated data. It is used to create groups of visitors from different locations, specific device users, or visitors who interact with your website/application in a particular way. You can generate reports for selected visitors according to custom criteria.

Segments can be defined by selecting various parameters that are joined by logic operators such as AND and OR. For example, a segment could encompass:

  • visitors who do not use a certain web browser;
  • visitors coming from campaigns and a certain country;
  • visitors who spent more than one minute on the website and originated from Facebook;
  • visitors who performed at least one internal search;
  • visitors coming from AdWords campaign, located in Germany, using German language.
  • To define a segment, click on the segment drop-down menu at the top of the page, followed by the Add new segment button. The New segment form will be displayed.

    The segmentation form consists of the following elements:

  • currently selected segment drop-down, attribution tree and search option (1)
  • name of the segment (2)
  • top-bar letting you choose if you want your segments to deliver pre-processed data or processed data in real time (default setting) (3)
  • segment criteria definition block (4)
  • saving and deleting option (5)
  • In Piwik PRO you can also manage custom segments using the following API methods:

  • SegmentEditor.get – Returns a single stored segment by ID
  • SegmentEditor.getAll – Returns all stored segments
  • SegmentEditor.add – Adds a new stored segment Query Parameters:
  • SegmentEditor.update – Modifies an existing stored segment
  • SegmentEditor.delete – Deletes a custom segment
  • API.getSuggestedValuesForSegment – Returns a set of values for particular segment criteria (such as location and device, etc.)
  • Was this article helpful?

    Be the first to rate this article.

    Technical Support

    If you have any questions, drop us a line at support_SPC@piwik_SPC.pro.

    We’re happy to help!