Skip to main content

Audience Filter — Audience Block Editor

Audience filter — an editor that determines who will see the block. The Audience filter card is available on the settings screens for the Cart complement, Cart similar, Wishlist similar, Frequently ordered, Trending, Recently viewed, Repeat purchase, Personal recommendations blocks, as well as on the rules screen for the Similar products block.

Why is this needed​

Often, a recommendation block should not be shown to everyone, but to a specific segment of users. For example:

  • The block "Toys for boys aged 5–10" — should only be shown to those whose user profile includes a child of that age;
  • The block "Premium products" — only to users from Moscow and St. Petersburg;
  • The block "Weekend discounts" — only to newsletter subscribers.

The Audience Filter allows you to describe such rules without programming.

Rule Structure​

First, select the filter mode — a toggle with two radio buttons in the Audience filter card:

  • None — the default value. The filter is not applied, the block is visible to all users, and there are no additional fields on the screen.
  • By user attribute — enables the filter fields described below.

The filter fields appear only after selecting "By user attribute" — if "None" is selected on the block screen, you will not see the rule fields.

First, choose which attribute to filter by. These two fields are common to the entire filter:

  1. User attribute sets — a set of attributes, for example, "User Profile" (see attribute sets).
  2. User attribute — an attribute within the set, such as "City" or "Is a subscriber".

Next come the rule lines. Each rule consists of:

  • Condition — the comparison condition;
  • Attribute value (e.g., male) — the value against which the user attribute is compared (for conditions that do not require a value, the field is hidden);
  • Categories — its own category tree in which this rule applies;
  • Delete button — removes the rule.

A new rule is added with the Add rule button.

The set of conditions in the Condition field depends on the type of the selected attribute. For example, for a string attribute, the following are available: contains, does not contain, equal to, not equal to, contains any value, does not contain a value, value based on the pattern, the same value as the selected attribute. For numbers and dates, instead of "contains" / "does not contain" and pattern, more and less are available, while for files, images, and text — only contains any value and does not contain a value.

⚠️User attribute set needed

The fields "set → attribute" are filled from existing sets of user attributes (and forms). If there is no suitable set in the project yet — create one (for example, "User Profile") and add attributes (Date of Birth, City, Subscriber, etc.).

Age Filter​

Age is set using a regular rule based on a user attribute with a date — for example, by date of birth: select this attribute in the User attribute field and set the condition (equal to, not equal to, more, less, etc.) with the value in the rule lines.

Multiple Rules​

In the Audience Filter, you can add multiple rules — they are applied with an "AND" logic (all rules must be true).

If you need "OR" logic between conditions — set them up through the attribute engine (see attribute types) or use a composite value in one attribute.

Content Categories​

The last step is to select categories in which the rule applies. Each rule has its own Categories tree with multi-selection; clicking on a category selects it along with its subcategories.

If no categories are selected — the rule is not applied. A warning will appear under the tree: "No categories selected — the rule is not applied, and a user matching it will see the entire block": a user falling under such a rule will see the entire block.

Out-of-the-box Behavior​

By default, the Audience filter card is set to None — the block is shown to all users on all pages where it is attached. Switch to "By user attribute" only when you need segmentation.

ℹ️Testing the Rule

Before publishing the block, check how the audience rule will work — open the preview window with the Open in modal button and look at the Investigate tab: it shows which rule was applied (section Audience rule applied) and what warnings the system issued.