Skip to content

Configure Visitor Groups

⏱ 25 minutes intermediate
📜Corecms

Visitor groups are the foundation of content personalization in CMS. By defining who sees what, you transform a generic website into a targeted experience. Before configuring groups, read the Visitor Groups and Personalization concept to understand which personalization approach fits your scenario.

  1. Navigate to CMS AdminVisitor Groups
  2. Click “Create”
  3. Name the group descriptively (e.g., “Returning UK Visitors” not “Group 1”)
  4. Add criteria by dragging them from the criteria panel into the group definition
  5. Configure each criterion (e.g., Country = United Kingdom, Number of Visits > 1)
  6. Choose the match logic: “Match all” (AND) or “Match any” (OR)
  7. Click “Save”
CriteriaWhat it checksExample use
Geographic locationCountry, region, city based on IPShow regional offers
Number of visitsHow many sessions the visitor has hadDifferentiate new vs returning
Visited pageWhether visitor has viewed specific pagesRetarget based on interest
Landing URLThe first page in the current sessionCustomize for campaign traffic
ReferrerWhere the visitor came fromTailor for search vs social
Day of week / TimeCurrent day and timeWeekend vs weekday content
Browser / OSTechnical environmentShow platform-specific content
Logged inWhether visitor is authenticatedMember vs anonymous content

Use visitor groups for content personalization

Section titled “Use visitor groups for content personalization”

Once groups are created, content authors use them in the editor:

  1. Open a page with a ContentArea property
  2. Click the personalization icon on a content block
  3. Select “Personalize”
  4. Choose a visitor group and add the personalized content variant
  5. Repeat for other groups
  6. The default content shows for visitors matching no groups

When built-in criteria are not enough, developers can create custom criteria in code.

Custom visitor group criterion
csharp
using EPiServer.Personalization.VisitorGroups;
using System.Security.Principal;

[VisitorGroupCriterion(
    Category = "Custom",
    DisplayName = "Has Active Subscription",
    Description = "Matches visitors with an active subscription")]
public class ActiveSubscriptionCriterion : CriterionBase<ActiveSubscriptionModel>
{
    public override bool IsMatch(
        IPrincipal principal,
        HttpContext httpContext)
    {
        if (!principal.Identity.IsAuthenticated)
            return false;

        var userId = principal.Identity.Name;
        var subscriptionService = ServiceLocator
            .Current.GetInstance<ISubscriptionService>();

        return subscriptionService.HasActiveSubscription(userId);
    }
}

public class ActiveSubscriptionModel : CriterionModelBase
{
    [CriterionPropertyEditor(
        Type = EditorType.CheckBox,
        LabelTranslationKey = "Include trial subscriptions")]
    public bool IncludeTrials { get; set; }

    public override ICriterionModel Copy()
    {
        return ShallowCopy();
    }
}

After deploying, the custom criterion appears in the visitor group admin alongside the built-in criteria.

CMS includes a visitor group simulation tool:

  1. Navigate to the page you want to test
  2. Click the visitor group simulation button in the editor toolbar
  3. Select the visitor group(s) to simulate
  4. The page refreshes showing the personalized content for those groups
  5. Toggle between groups to verify each variant
  • Name groups clearly — “Enterprise Decision Makers from DACH” is better than “Segment A”
  • Limit groups per page — Keep under 10–15 active groups per content area to maintain cache performance
  • Test with simulation before publishing — verify each group sees the right content
  • Monitor effectiveness — Use Analytics or Experimentation to measure if personalization improves outcomes
  • Document your groups — Maintain a registry of active groups and their purposes