Configuring Segmentation with ContextHub
- Topics:
- Administering
CREATED FOR:
- Admin
Segmentation is a key consideration when creating a campaign. See Managing Audiences for information on how segmentation works and key terms.
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 Personalization section of the website. Activities defined here can be included on any page and define which visitor segment the specialized content is applicable for.
AEM allows you to easily personalize your users’ experience. It also allows you to verify the results of your segment definitions.
Accessing Segments
The Audiences console is used to manage segments for ContextHub or Client Context as well as audiences for your Adobe Target account. This documentation covers managing segments for ContextHub. For Client Context segments and Adobe Target segments, please see the relevant documentation.
To access your segments, in global navigation select Navigation > Personalization > Audiences.
Segment Editor
The Segment Editor allows you to easily modify a segment. To edit a segment, select a segment in the list of segments and click the Edit button.
Using the components browser you can add AND and OR containers to define the segment logic, then add additional components to compare properties and values or reference scripts and other segments to define the selection criteria (see Creating a New Segment) to define the exact scenario for selecting the segment.
When the entire statement evaluates to true then the segment has resolved. In the event of multiple segments being applicable, then the Boost factor is also used. See Creating a New Segment for details on the boost factor.
Containers
The following containers are available out-of-the-box and allow you to group comparisons and references together for boolean evaluation. They can be dragged from the components browser to the editor. See the following section Using AND and OR Containers for more information.
Container AND | The boolean AND operator |
Container OR | The boolean OR operator |
Comparisons
The following segment comparisons are available out-of-the-box to evaluate segment properties. They can be dragged from the components browser to the editor.
Property-Value | Compares a property of a store to a defined value |
Property-Property | Compares one property of a store to another property |
Property-Segment Reference | Compares a property of a store to another referenced segment |
Property-Script Reference | Compares a property of a store to the results of a script |
Segment Reference-Script Reference | Compares a referenced segment to the results of a script |
null < 30 // will return true
profile/age
, you already know that the compared type will be number, so even if profile/age
is not set, a comparison profile/age
less-than 30 will return false, as you would expect.References
The following references are available out-of-the-box to link directly to a script or another segment. They can be dragged from the components browser to the editor.
Segment Reference | Evaluate the referenced segment |
Script Reference | Evaluate the referenced script. See the following section Using Script References for more information. |
Creating a New Segment
To define your new segment:
-
After accessing the segments, click or tap the Create button and select Create ContextHub Segment.
-
In the New ContextHub Segment, enter a title for the segment as well as a boost value if required and then tap or click Create.
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 in instances where multiple segments are valid.
- Minimum value:
0
- Maximum value:
1000000
- Minimum value:
-
Drag a comparison or reference to the segment editor it will appear in the default AND container.
-
Double-click on or tap the configure option of the new reference or segment to edit the specific parameters. In this example, we are testing for people in San Jose.
Always set a Data Type if possible to ensure that your comparisons are evaluated properly. See Comparisons for more information.
-
Click OK to save your definition:
-
Add more components as required. You can formulate boolean expressions using the container components for AND and OR comparisons (see Using AND and Or Containers below). With the segment editor you can delete components not needed anymore, or drag them to new positions within the statement.
Using AND and OR Containers
Using the AND and OR container components, you can construct complex segments in AEM. When doing this, 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 considered in our prime age group:
Male and between the ages of 30 and 59
OR
Female and between the ages of 30 and 59
You start by placing an OR container component within the default AND container. Within the OR container, you add two AND containers and within both of these you can add the property or reference components.
Using Script References
By using the Script Reference component, the evaluation of a segment property can be delegated to an external script. Once the script is configured properly, it can be used as any other component of a segment condition.
Defining a Script to Reference
-
Add file to
contexthub.segment-engine.scripts
clientlib. -
Implement a function that returns a value. For example:
ContextHub.console.log(ContextHub.Shared.timestamp(), '[loading] contexthub.segment-engine.scripts - script.profile-info.js'); (function() { 'use strict'; /** * Sample script returning profile information. Returns user info if data is available, false otherwise. * * @returns {Boolean} */ var getProfileInfo = function() { /* let the SegmentEngine know when script should be re-run */ this.dependOn(ContextHub.SegmentEngine.Property('profile/age')); this.dependOn(ContextHub.SegmentEngine.Property('profile/givenName')); /* variables */ var name = ContextHub.get('profile/givenName'); var age = ContextHub.get('profile/age'); return name === 'Joe' && age === 123; }; /* register function */ ContextHub.SegmentEngine.ScriptManager.register('getProfileInfo', getProfileInfo); })();
-
Register the script with
ContextHub.SegmentEngine.ScriptManager.register
.
If the script depends on additional properties, the script should call this.dependOn()
. For example if the script depends on profile/age
:
this.dependOn(ContextHub.SegmentEngine.Property('profile/age'));
Referencing a Script
- Create ContextHub segment.
- Add Script Reference component in the desired place of the segment.
- Open the edit dialog of the Script Reference component. If properly configured, the script should be available in the Script name drop-down.
Testing the Application of a Segment
Once the segment has been defined, potential results can be tested with the help of the ContextHub.
- Preview a page
- Click the ContextHub icon to reveal the ContextHub toolbar
- Select a persona that matches the segment you created
- The ContextHub will resolve the applicable segments for the selected persona
For example, our simple segment defintion to identify users in our prime age group is a simple segment definition is based on the age and gender of the user. Loading a specific persona that matches those criteria shows if that the segment is successfully resolved:
Or if it is not resolved:
Such tests can also be performed on content pages and in combination with targeted content and related Activities and Experiences.
If you have set up an activity and experience using the prime age group segment example above, you can easily test your segment with the activity. For details about setting up an activity, please see the related documentation on authoring targeted content.
-
In editing mode of a page where you have set up targeted content, you can see that the content is targeted via arrow icon on the content.
-
Switch to preview mode and using the context hub, switch to a persona that does not match the segmentation configured for the experience.
-
Switch to a persona that does match the segmentation configured for the experience and see that the experience changes accordingly.
Using Your Segment
Segments are used are used to steer the actual content seen by specific target audiences. See Managing Audiences for more information about audiences and segments and Authoring Targeted Content about using audiences and segments to target content.
Experience Manager
- Administering User Guide overview
- Sites Features
- Website Administration
- Reusing Content: Multi Site Manager and Live Copy
- Live Copy Overview Console
- Configuring Live Copy Synchronization
- Creating and Synchronizing Live Copies
- MSM Rollout Conflicts
- MSM Best Practices
- Translating Content for Multilingual Sites
- Managing Translation Projects
- Identifying Content to Translate
- Preparing Content for Translation
- Creating a Language Root Using the Classic UI
- Connecting to Microsoft Translator
- Configuring the Translation Integration Framework
- Language Copy Wizard
- Translation Enhancements
- Translation Best Practices
- Configurations and the Configuration Browser
- AEM FAQs
- Operations
- Dashboards
- Operations Dashboard
- Backup and Restore
- Data Store Garbage Collection
- Monitoring Server Resources Using the JMX Console
- Working with Logs
- Configure the Rich Text Editor
- Configure the Video component
- The Bulk Editor
- Configuring Email Notification
- Configuring RTE for Producing Accessible Sites
- The Link Checker
- Troubleshooting AEM
- Audit Log Maintenance in AEM 6
- Editor
- Managing Access to Workflows
- Using cURL with AEM
- Configuring Undo for Page Editing
- Proxy Server Tool (proxy.jar)
- Configuring for AEM Apps
- Administering Workflows
- Configuring Search Forms
- Tools Consoles
- Reporting
- Administering Workflow Instances
- Configuring Layout Container and Layout Mode
- Enabling Access to Classic UI
- Starting Workflows
- Configure the Rich Text Editor plug-ins
- Admin Consoles
- Security
- User Administration and Security
- User, Group and Access Rights Administration
- Security Checklist
- OWASP Top 10
- Running AEM in Production Ready Mode
- Identity Management
- Adobe IMS Authentication and Admin Console Support for AEM Managed Services
- Creating a Closed User Group
- Mitigating serialization issues in AEM
- User Synchronization
- Encapsulated Token Support
- Single Sign On
- How to Audit User Management Operations in AEM
- SSL By Default
- SAML 2.0 Authentication Handler
- Closed User Groups in AEM
- Granite Operations - User and Group Administration
- Enabling CRXDE Lite in AEM
- Configuring LDAP with AEM 6
- Configure the Admin Password on Installation
- Service Users in AEM
- Encryption Support for Configuration Properties
- Handling GDPR Requests for the AEM Foundation
- Content Disposition Filter
- Personalization
- eCommerce
- Integration
- Integrating with Third-Party Services
- Integrating with Salesforce
- Integrating with Adobe Target
- Integrating with Adobe Analytics
- Connecting to Adobe Analytics and Creating Frameworks
- Configuring Link Tracking for Adobe Analytics
- Mapping Component Data with Adobe Analytics Properties
- Configuring Video Tracking for Adobe Analytics
- HTTP2 Delivery of Content FAQ
- Troubleshooting your Adobe Campaign Integration
- SharePoint Connector Licenses, Copyright Notices, and Disclaimers
- SharePoint Connector
- DHTML Viewer End-of-Life FAQs
- Integrating with Adobe Campaign Classic
- Related Community Articles
- Integrating with Adobe Campaign Standard
- Flash Viewers End-of-Life Notice
- Integrating with Adobe Creative Cloud
- Integrating with Adobe Dynamic Tag Management
- Opting Into Adobe Analytics and Adobe Target
- AEM Portals and Portlets
- Integrating with Dynamic Media Classic
- Troubleshooting Integration Issues
- Integrating with BrightEdge Content Optimizer
- Best Practices for Email Templates
- Catalog Producer
- Integrating with Silverpop Engage
- Integrating with Adobe Campaign
- Integrating with ExactTarget
- Analytics with External Providers
- Integrating with the Adobe Marketing Cloud
- Manually Configuring the Integration with Adobe Target
- Prerequisites for Integrating with Adobe Target
- Adobe Classifications
- Solutions Integration
- Target Integration with Experience Fragments
- Best Practices
- Content Management