Personalization overview
The personalization drop-in component provides a set of tools and containers designed to display content conditionally, based on Adobe Commerce customer groups, segments, and cart price rules.
Overview
The personalization drop-in component provides the TargetedBlock
container, which requires you to specify the content (or a path to a fragment containing the content) and optionally specify the block type, Adobe Commerce customer groups, segments, and cart rules that determine which customers can view the content.
The component’s initialization sets up event listeners that respond to changes in authentication state and cart state.
These listeners request the currently applied customer groups, segments, and cart price rules from Adobe Commerce and save them to a cookie.
When you add a TargetedBlock
container to a page, it displays only when the customer groups, segments, and cart price rules specified in the block configuration match the groups, segments, and rules stored in the cookie.
When you specify a block type for a TargetedBlock
, only the first targeted block of that type is rendered on the page. This behavior enables you to create a fallback chain of targeted blocks.