Support and Documentation

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:

  1. Change to the directory brightspot/segmentation/core/src/main/java/com/psddev/segmentation/target/.

  2. Create a subclass of Target.

  3. 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(", "));
    }
}

1

Extracts the month included in the HTTP request.

2

Concatenates the standard Java month names into a form that Brightspot can display.

This custom target appears in Targets field of the New Audience widget.

New Audience widget with custom target
Figure 150. New Audience widget with custom target


Creating audiences

Administrators perform this task.

Procedure. To create an audience:
  1. From the Navigation menu, select Admin > Audiences. The New Audience widget appears.

    new-audience.png
  2. 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.

  3. In the Content Type Group field, click |mi-search|. The content picker appears.

  4. In the content picker, click New Content Type Group. A content edit page appears.

    new-content-type-group.png
  5. In the content edit page, do the following:

    1. In the Name field, enter a name for the content type group, such as Landing Pages.

    2. From the Types list, select the content types that you want to apply to this audience.

    3. Click Save.

    4. Click Back. You return to the New Audience widget.

  6. From the Content Type Group list, select the content type group that you just created.

  7. 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.

  8. Under Targets, and using the following table Audience target types as a reference, set one or more targets.

  9. Click Save.

You can now create variations for the audience; for details, see Creating content variations.

The following table describes the available target types.

Table 53. Audience 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:

  • Requested item is of a specified content type

  • Visitor has previously viewed items of a particular content type and with a specified tag

  • Visitor viewed those items a minimum number of times, optionally during a specified time

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:

  • Requested item is of a specified content type

  • Visitor has previously viewed items of a particular content type

  • Visitor viewed those items a minimum number of times, optionally during a specified time

This target applies only to sites with authenticated users. For more information, see Understanding view count targets.



Modifying audiences
Procedure. To modify an audience:
  1. From the Navigation Menu, select Admin > Audiences. The Audiences widget appears.

  2. Click the audience you want to modify. The Edit Audience widget appears.

  3. Modify the settings as required. For details, see Creating audiences.

  4. Click Save.

Deleting audiences
Procedure. To delete an audience:
  1. From the Navigation Menu, select Admin > Audiences. The Audiences widget appears.

  2. Click the audience you want to delete. The Edit Audience widget appears.

  3. 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.