        ![A single Canvas component that can conditionally display nested eelements](/sites/default/files/styles/blog_hero_image_mobile/public/media/image/2026-12/CanvasConditionalComponent.jpeg?itok=gcRVf-ze) 

 

 

 Image

        ![Martin Anderson Clutz](/sites/default/files/styles/post_content_attribution_headshot/public/media/image/2026-09/Blue_0.png?h=07bda73c&itok=idUbO5Km) 

 

 

 

 [Martin Anderson-Clutz](/people/acquians/martin-anderson-clutz) Senior Product Marketing Manager, Drupal Acquia

 

 

 

## Collection

 [Drupal](/blog/series/drupal) 

 

 

 

Drupal

# Personalization That Starts Where You Build Pages

Published: December 3, 2026

Last Updated: December 4, 2026

8 minute read

 

 [Share this blog post on LinkedIn

 ](https://www.linkedin.com/sharing/share-offsite/?url=https://www.acquia.com/markdownify/node/61981) [Share this blog post on Twitter

 ](<https://twitter.com/intent/tweet?text=Personalization That Starts Where You Build Pages&url=https://www.acquia.com/markdownify/node/61981&via=acquia>) [Share this blog post via Email

 ](<mailto:?subject=Personalization That Starts Where You Build Pages&body=https://www.acquia.com/markdownify/node/61981>)   Copy Markdown  

 

 

 Canvas Conditional Container brings simple, rule-based personalization into the Drupal Canvas page builder, with no second platform required. 

        ![A single Canvas component that can conditionally display nested eelements](/sites/default/files/styles/blog_hero_image_mobile/public/media/image/2026-12/CanvasConditionalComponent.jpeg?itok=gcRVf-ze) 

 

 

## Collection :

 [Drupal](/blog/series/drupal) 

 

## Where personalization starts

Ask a team evaluating a new CMS what they want from personalization, and the answer is rarely a machine learning engine on day one. More often it sounds like this: show visitors from the spring campaign the spring offer. Show members a different call to action than first-time visitors. Show a Thanksgiving Day sale to visitors from the United States.

Each rule depends on something the visitor brings with them, like the link they clicked or where they are browsing from. These simple rules are where most personalization programs begin. They also matter in buying decisions. Analysts and evaluation teams increasingly look for personalization that is authored where pages are built, so a marketer can see each variant in the layout instead of in a separate tool.

Drupal sites can run mature personalization programs today, but usually by connecting a separate service, often with its own subscription. What Drupal has lacked is a simple, native answer for that first step, built into the page builder. In November, I started building one.

## The options so far

Acquia has offered personalization for Drupal sites for years, first with Acquia Personalization and today with Acquia Conversion Optimization powered by VWO. Conversion Optimization is a full platform for testing, behavioral insight, and personalization. For organizations running a dedicated optimization program, that depth is exactly what they need.

[Drupal Canvas](https://www.drupal.org/project/canvas), the new visual page builder, also has personalization on its roadmap. The Canvas team's design used Mautic, the open source marketing automation platform, for segmentation. It is a powerful approach, but it means running and maintaining a second system alongside Drupal. That personalization work was set aside in the run-up to the first stable release of Canvas, and I hope to see it return. Some of it remains in Canvas as a hidden Personalization submodule, which was a useful guide: Canvas Conditional Container follows several of its patterns for how a component decides what to show.

That still leaves room for something simpler. A small nonprofit with one marketer, or a team trying personalization for the first time, may not be ready to take on a second platform. They need a way to say "show this, not that" in the page they are already building, based on information the visitor has already shared. That is the low-hanging fruit. It can also be a first step toward a fuller program later.

## How it started

The idea had been on my mind for a while. A few years ago, working with Acquia Site Studio, I used its Context integration to serve different content to signed-in users based on their profiles, such as the roles assigned to them. I called it "profilization." It was a simple use case, but it showed how much a little conditional logic could do.

This fall I was at NEDCamp, where Chris Weber of Velir led a contribution day built around AI-assisted development. By the end of that day, we had a first draft of[ Canvas Content Embed](https://www.drupal.org/project/canvas_content_embed). By the end of the next day, it had its first release. On the trip home, I started planning what became Canvas Conditional Container. How AI helped me build it, and how much that experience has changed in six months, is the subject of what will be the third post in this series.

## A container that knows when to appear

[Canvas Conditional Container](https://www.drupal.org/project/canvas_conditional_container) adds a new component to the Canvas library. An editor drags it onto a page, places other components inside it, and picks the rules that decide whether that content appears. If the rules pass, a visitor sees what is inside. If they do not, the container renders nothing at all.

The rules come from[ Context](https://www.drupal.org/project/context), a long-standing Drupal module that I also maintain. Context lets a site builder define named situations, such as "members area," "visitors from the spring campaign," or "logged-in editors," from building blocks like the current path, a user's role, or a value in the URL. Once a situation is defined, any container on any page can use it. Editors pick from a list instead of rebuilding the logic each time.

Rules can be combined with AND and OR, and reversed, in a way that will feel familiar to anyone who has used filter groups in Drupal Views. Context is the first source of rules, not the only one. The module is designed so other modules can supply rules too.

Four decisions shape how it behaves. The decision happens on the server while the page is built, so hidden content never reaches the browser, and viewing the page source will not reveal it. If a rule points to a Context that someone deleted or disabled, the container hides its content instead of guessing. A deleted "VIP members" rule should never show VIP content to everyone.

Editors, on the other hand, always see everything. The editing view shows the container's content with a badge describing its rules, because an editor's visit is not a visitor's visit. And when content is shown, the container adds no extra markup around it.

Image

        ![The Canvas UI with a Condition Group](/sites/default/files/styles/wysiwyg_full_width_desktop/public/media/image/2026-12/CanvasConditionalContainer-Groups.png?h=a94f2fd8&itok=GEZv2Dmm) 

 



## This, that, or otherwise

As soon as I used the container on a real page, I wanted something it could not do well. I wanted to show one thing to members, another to visitors from the spring campaign, and something else to everyone else. With separate containers, each one has to exclude every case above it, and that gets fragile quickly.

Condition Groups solve that. A group is a second component that holds conditional containers, called variants, in priority order. On the live site, only the first variant whose rules pass is shown. If none pass, a Default area is shown instead. Editors arrange variants with the same drag and drop they already use in Canvas.

Image

 ![A conceptual view of how Condition Groups and Conditional Containers work together](/sites/default/files/styles/wysiwyg_full_no_crop_/public/media/image/2026-12/Condition-Group-diagram.png?itok=3iPtyLad)

 



An ordered stack of variants with a fallback is a familiar pattern. Builder.io, Uniform, and PersonalizeWP for WordPress all offer versions of it. It works because it matches how people describe the problem: try this first, then this, otherwise show the default.

The editing view does extra work to make that order visible. Each container is labeled "Variant 1," "Variant 2," and so on, and the labels update as variants are dragged into a new order. If a variant will always match, such as a container with no rules, nothing below it can ever be reached. The preview grays out those unreachable variants, so an editor can spot the problem before publishing.

## "Why did I see this?"

Personalization rules are invisible by design. That becomes a problem the first time someone reports seeing the wrong banner. In many tools, finding out why means switching to a preview mode, impersonating an audience, or opening a support ticket.

I wanted the page to explain itself. When a developer turns on Twig debug mode, a setting Drupal developers already use to see which templates built a page, every container and group writes a short note into the page's HTML source. The notes say which variant a group chose and why the considered container passed or failed, rule by rule. With debug mode off, which is how production sites should run, nothing is added.

Here is a shortened example of what a developer sees for an anonymous visitor:

```plaintext
<!-- Condition Group 3f2a… shows variant 2, 9c41… (container). -->
<!-- Conditional container 51be… hidden: failed.
  Rule group 1, rule 1: context:admins (Administrators), ok, false → false.
  Context "admins" is not active. -->
<!-- Conditional container 9c41… shown: passed.
  Rule group 1, rule 1: context:sitewide (Sitewide), ok, true → true.
  Context "sitewide" is active. -->
<h2>Welcome, everyone</h2>
```

A few details make these notes more useful than a log file. Variant numbers match the labels in the editing view, so a developer can go from the page source straight to the right variant in Canvas. If a Context was disabled or deleted, the note says so, instead of leaving people to guess why content disappeared.

Rules that never ran are marked as skipped, not failed. Once a rule group's result is decided, the remaining rules are not checked, and the note says so. Variants below the winner are left out of the page along with their notes, so what remains is only the decisions that mattered.

For a team that has to answer "why did this visitor see that?", this turns a mystery into something anyone with access to the page source can check. I have not seen another personalization tool that explains its decisions this directly, in the page itself.

## What is still missing

Context's rules can describe the page, the request, or the signed-in user. Many of the rules teams ask for first are about the anonymous visitor instead: which campaign link brought them in, where they are, and which part of the site they landed on first. A campaign code sits in the URL of the first page and disappears on the next click, so a rule that reads only the current page forgets it right away.

Remembering those facts, with the visitor's permission and without slowing the site down, needed a module of its own. That is the subject of the next post in this series.

In the meantime, Canvas Conditional Container is available on Drupal.org, along with[ an example project](https://www.drupal.org/project/canvas_conditional_container_example) that sets up a working demo. Try it on your own site and tell me what you build with it.



 

 Image

        ![Martin Anderson Clutz](/sites/default/files/styles/post_content_attribution_headshot/public/media/image/2026-09/Blue_0.png?h=07bda73c&itok=idUbO5Km) 

 

 

 

 [Martin Anderson-Clutz](/people/acquians/martin-anderson-clutz) Senior Product Marketing Manager, Drupal Acquia

 

 

 

 

 

 [Share this blog post on LinkedIn

 ](https://www.linkedin.com/sharing/share-offsite/?url=https://www.acquia.com/markdownify/node/61981) [Share this blog post on Twitter

 ](<https://twitter.com/intent/tweet?text=Personalization That Starts Where You Build Pages&url=https://www.acquia.com/markdownify/node/61981&via=acquia>) [Share this blog post via Email

 ](<mailto:?subject=Personalization That Starts Where You Build Pages&body=https://www.acquia.com/markdownify/node/61981>)   Copy Markdown  

 

 

 

 

## Keep Reading

 [View More Resources](/resources) 

  [Image

        ![](/sites/default/files/styles/card_tablet/public/media/image/2026-09/Social%20Thumbnail%20Webinars%20High%20Res%201%20%5BVectorized%5D.png?h=3c2a25c5&itok=hB4jFObO) 

 

 

 

 Webinar September 24, 2025

  

######  Drupal Canvas: The Next Chapter in Site Building

 Go beyond the basics and see how to deliver exceptional digital experiences faster, with less code, and more control. 

 Watch webinar Drupal  

 

 ](/events/webinars/drupal-canvas-next-chapter-site-building) 



  [Image

 ![](/sites/default/files/media/image/2026-09/Social%20Thumbnail_Webinars%201.svg)

 

 

 

 Webinar July 23, 2026

  

######  From Insights to Impact: Acquia Conversion Optimization

 In this deep dive, you will learn how the Wingify suite—comprising Insights, Testing, and Personalize 

 Watch webinar  

 

 ](/events/webinars/insights-impact-acquia-conversion-optimization-powered-vwo) 



  [Image

        ![Bespectacled black woman in yellow cardigan smiles at her open laptop screen](/sites/default/files/styles/card_tablet/public/media/image/2023-03/Personalized%20brand%20exp_display.jpg?h=5f1b5b34&itok=4WwOrNQG) 

 

 

 

 Blog Article 8 min 

######  How to Deliver Personalized Brand Experiences

 Tailor your brand experiences to dynamic customer needs. 

 Read article  

 

 ](/blog/6-steps-delivering-personalized-digital-brand-experience)