Personalization

A single, narrow personalization signal - new vs. returning visitor - the one most starter kits and DXPs treat as a baseline. Deliberately not a general segments/audiences/rules-engine system; add one of those yourself on top if you need it, via the same metadata mechanism described below.

How it works

Using it in a component

Every default block in @olgax.com/components already has a "Show to" field (Everyone / New visitors only / Returning visitors only) via @olgax.com/sdk's visibilityFields()/isVisible() - the same pattern as colorOverrideFields():

import { registerComponent, visibilityFields, isVisible } from "@olgax.com/sdk";

registerComponent("MyBlock", {
  fields: {
    // ...your own fields
    ...visibilityFields(),
  },
  render: (props) =>
    isVisible(props.visibility, props.puck?.metadata?.visitor) ? <MyBlock {...props} /> : <></>,
});

In the Puck editor itself, puck.metadata.visitor is always undefined (the canvas has no real visitor) - isVisible() treats that as "always show", so authoring never hides a block you're editing.

Explicitly out of scope

No custom audience/segment builder, no rules engine, no third-party segment provider integration (GA, Segment, etc.). If you need those, this is the extension point - build on top of the same metadata mechanism rather than a separate system.