You are reading the AEM 5.6.1 version of Segmentation.
This version has reached End of core support. For further details see our technical support periods.
This documentation is also available for the following versions:  AEM 6.2  AEM 6.1  AEM 6.0  AEM 5.6  CQ 5.5  CQ 5.4 

Segmentation is a key consideration when creating a campaign. In most cases, you will need to have segments already defined before starting your campaign. 

Site visitors have different interests and objectives when they come to a site. Understanding these goals and fulfilling the expectations is an important success factor for online marketing.

Segmentation helps to achieve this by analyzing and characterizing a visitor's:

  • activity on the website
  • profile
  • activity on other websites

Content can then be specifically targeted to the visitor's needs and interests, depending on the segment(s) they match.

When discussing segmentation, the following terminology is used:


A visitor is a person visiting a website. That person's visit typically starts from a referring page, then moves on to one or more page views on your own website. A behavioral profile can be created from the details of that person's visit.


A user is a visitor who registers with the website to receive an account profile. To generate their profile they provide additional identification, such as an email address and gender, amongst others. Additional information can also be collected, including community activity and purchase patterns, again amongst others. Based on the information provided in the profile, a demographic profile can be created.


A trait is a characteristic or property of a visitor that can be used to determine membership in a specific segment.


A segment is a collection of visitors that share certain traits. Segments should be distinctive, with a minimum of overlap with other segments.

Behavioral Traits

Behavioral traits are those that relate to a visitor's behavior on the website. These include:

  • Interest within your website; including pages visited and products bought.
  • Interest on the referring website; including search terms used, or adverts clicked on.
  • Interest on other sites; determined using tools such as Spyjax.
  • Visitor loyality; duration of the visit, frequency of visits.

Demographic Traits

These are selected population characteristics including:

  • Age
  • Income
  • Family size
  • Marital status
  • Gender
  • Location

Derived Traits

Some demographic traits are hard to determine without registration, but can be derived by combining behavioral and demographic traits.

For example, combining the referring URL (as a behavioral trait) with demographic data (acquired from tools such as Google Ad Planner) allows site owners to derive demographics traits of their visitors.


A segment can be subdivided into several subsegments. This is done by defining additional traits.

Teaser Page

A teaser page is directed at a specific audience. It contains re-usable content that can be used in the teaser paragraph.


A campaign is a collection of teaser pages and e-mail marketing pages, such as newsletters or invitations. Typically a campaign runs for a limited period and is superceded by another campaign.

Teaser Paragraph

This is a paragraph that pulls content from another page dependent on a selection strategy. This selection strategy can take segments and campaigns into consideration.


A list is extracted from a segment of registered users. For example, the location used to steer the contents of the teaser paragraph.


Please see Segmentation for further information on segments in CQ.

Segmentation in CQ

Depending on the information you have already collected about your site visitors and the goals you want to achieve, you will need to define the segments and strategies needed for your targeted content.

These segments are then used to provide a visitor with specifically targeted content. This content is maintained in the Campaigns section of the website. Teaser pages defined here can be included as teaser paragraphs on any page and define which visitor segment the specialized content is applicable for.

CQ allows you to easily create and update segments, teasers, and campaigns. It also allows you to verify the results of your definitions. 

The Segment Editor allows you to easily define a segment:


You can Edit each segment to specify a Title, Description and Boost factor. Using the sidekick you can add AND and OR containers to define the Segment Logic, then add the required Segment Traits to define the selection criteria.

Boost Factor

Each segment has a Boost parameter that is used as a weighting factor; a higher number indicates that the segment will be selected in preference to a segment with a lower number.

Segment Logic

The following logic containers are available out-of-the-box and allow you to construct the logic of your segment selection. They can be dragged from the sidekick to the editor:

 AND Container
 The boolean AND operator.
 OR Container
 The boolean OR operator.

Segment Traits

The following segment traits are available out-of-the-box; they can be dragged from the sidekick to the editor:

 IP Range
Defines a range of IP addresses that the visitor can have.
 Page Hits
How often the page has been requested.
 Page Property
Any property of the visited page.
 Referral Keywords
Keywords to match with information from the referring website.
 Script Javascript expression to be evaluated.
 Segment Reference
Reference to another segment definition.
 Tag Cloud
Tags to be matched with those from the pages visited.
 User Age
As taken from the user profile.
 User Property
Any other information that is available in the user profile.

You can combine these traits using the boolean operators OR and AND (see Defining a New Segment) to define the exact scenario for selecting this segment. 

When the entire statement evaluates to true then this segment has resolved. In the event of multiple segments being applicable, then the Boost factor is also used.

Defining a New Segment

 To define your new segment:

  1. Open the Tools console.

  2. Click on the Segmentation page in the left pane, and navigate to the required location.

  3. Create a new page using the Segment template.

  4. Open the new page to see the segment editor:

  5. Use either the sidekick or the context menu (usually right mouse button click, then select New... to open the Insert New Component window) to find the segment trait you need. Then drag it to the Segment Editor it will appear in the default AND container.

  6. Double-click on the new trait to edit the specific parameters; for example the mouse position:

  7. Click OK to save your definition:

  8. You can Edit the segment definition to give it a Title, Description and Boost factor:

  9. Add more traits if required. You can formulate boolean expressions using the AND Container and OR Container components found under Segment Logic. With the segment editor you can delete traits or containers not needed anymore, or drag them to new positions within the statement.

Using AND and OR Containers

You can construct complex segments in CQ. It helps to be aware of a few basic points:

  • The top level of the definition is always the AND container that is initially created; this cannot be changed, but does not have an effect on the rest of your segment definition.
  • Ensure that the nesting of your container makes sense. The containers can be viewed as the brackets of your boolean expression.

The following example is used to select visitors who are either:

Male and between the ages of 16 and 65


Female and between the ages of 16 and 62

As the main operator is OR you need to start with an OR Container. Within this you have 2 AND statements, for each of these you need an AND Container, into which you can add the individual traits.


Testing the Application of a Segment

Once the segment has been defined, potential results can be tested with the help of the Client Context:

  1. Select the segment to be tested.
  2. Press Ctrl-Alt-C to open the Client Context, which shows the data that has been collected. For testing purposes you can Edit certain values, or Load another profile to see the impact there.
  3. Depending on the traits defined, the data available for the current page may or may not match the segment definition. The status of the match is shown underneath the definition.

For example, a simple segment definition can be based on the age and gender of the user. Loading a specific profile shows that the segment is successfully resolved: 


Or not:



All traits are resolved immediately, though most only change on page reload. Changes to mouse position are visible immediately, so useful for testing purposes.

Such tests can also be performed on content pages and in combination with Teaser components. 

Mouseover on a teaser paragraph will show the segments applied, whether they currently resolve and therefore, why the current teaser instance has been selected:


Using Your Segment

Segments are currently used within Campaigns. They are used to steer the actual content seen by specific target audiences.