Configuring audiences
You characterize audience segments by the following characteristics:
Content type, such as articles or images
Target, such as device, day of week, and cookies
Site
When a visitor requests an asset, Brightspot checks the associated content type, target, and site, and then delivers the corresponding variation. If the visitor's request does not fall into one of the segments, Brightspot delivers the default variation.
Adding targets
Developers perform this task.
A target is a set of characteristics by which Brightspot can differentiate visitors. You can create custom targets using the following steps:
Change to the directory
brightspot/segmentation/core/src/main/java/com/psddev/segmentation/target/
.Create a subclass of
Target
.Build and deploy. Editors see the custom target in the New Audience widget (see illustration New Audience widget with custom target).
The following snippet is an example of a custom target that differentiates by the current month.
import com.psddev.segmentation.Target; public class MonthOfYearTarget extends Target { private Set<Month> month; public Set<Month> getMonth() { if (month == null) { month = new LinkedHashSet<>(); } return month; } public void setDays(Set<Month> month) { this.month = month; } @Override public boolean matches(HttpServletRequest request) { 1 return getMonth().contains(OffsetDateTime.now().getMonth()); } @Override public String getLabel() { 2 return getMonth().stream() .map(Object::toString) .collect(Collectors.joining(", ")); } }
This custom target appears in Targets field of the New Audience widget.

Creating audiences
Administrators perform this task.
From the Navigation menu, select Admin > Audiences. The New Audience widget appears.
In the Name field, enter a name that reflects the audience that you are defining. For example, Weekend Visitors reflects an audience that views content on weekends.
In the Content Type Group field, click |mi-search|. The content picker appears.
In the content picker, click New Content Type Group. A content edit page appears.
In the content edit page, do the following:
In the Name field, enter a name for the content type group, such as
Landing Pages
.From the Types list, select the content types that you want to apply to this audience.
Click Save.
Click Back. You return to the New Audience widget.
From the Content Type Group list, select the content type group that you just created.
Do one of the following:
Under Sites, click |mi-add_circle_outline| and select a site to which the audience applies. Repeat to add additional sites.
Toggle on Enable On All Sites to activate this audience on all sites.
For an explanation of these settings, see the table Effect of adding audiences to sites.
Under Targets, and using the following table Audience target types as a reference, set one or more targets.
Click Save.
You can now create variations for the audience; for details, see Creating content variations.
The following table describes the available target types.
Target Type | Description |
---|---|
Cloud Front Device Category Target | Variation depends on the visitor's device as detected by the Amazon CloudFront service. Use only for CloudFront deployments. |
Cookie Target | Variation depends on cookies set in a visitor's browser. Cookies typically define a visitor's characteristics. For example, a cookie may define a visitor's preferred language or time zone, and you can deliver content tailored to those characteristics. |
Day of Week Target | Variation depends on one or more specified days. |
Device Category Target | Variation depends on the visitor's device, such as phone or tablet. For CloudFront deployments, use the Cloud Front Device Category target. |
Header Target | Variation depends on values in HTTP headers. |
Parameter Target | Variation depends on the key-value pairs in an item's query string. |
Tagged Content View Count Target | Variation depends on meeting the following criteria:
This target applies only to sites with authenticated users. For more information, see Understanding view count targets. |
Theme Target | Variation depends on the site's theme. |
Type View Count Target | Variation depends on meeting the following criteria:
This target applies only to sites with authenticated users. For more information, see Understanding view count targets. |
Modifying audiences
From the Navigation Menu, select Admin > Audiences. The Audiences widget appears.
Click the audience you want to modify. The Edit Audience widget appears.
Modify the settings as required. For details, see Creating audiences.
Click Save.
Deleting audiences
From the Navigation Menu, select Admin > Audiences. The Audiences widget appears.
Click the audience you want to delete. The Edit Audience widget appears.
Click Archive.
Understanding view count targets
You generally use the targets Tagged Content View Count and Type View Count described in the table Audience target types when publishing variations of landing pages, such as a homepage or a section page. The following sections describe the conditions for delivering a variation using these targets.
Tagged content view counts
You use this target when you want to deliver a variation if a visitor has already viewed items of a particular content type that have a particular tag. For example, you define the following criteria:
Content type group is
Homepage
Previously viewed content type is
Article
Previously viewed articles were tagged with
Community
Minimum count is set to five
The interpretation of this target is that after a visitor views five articles tagged with Community
, Brightspot delivers the corresponding variant of all content types associated with Homepage
.
Type view count target
You use this target when you want to deliver a variation if a visitor has already viewed items of a particular content type. For example, you define the following criteria:
Content type group is
Homepage
Previously viewed content type is
Article
Minimum count is set to five
The interpretation of this target is that after a visitor views five articles, Brightspot delivers the corresponding variant of all content types associated with Homepage
.