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
proxy.tssets a first-party, no-PII cookie (olgax_visitor) on a visitor's first request. No IP, user agent, or any other identifying data is stored - just a marker.lib/personalization.ts'sgetVisitorState()reads that cookie server-side and returns"new"or"returning".PageRendererpasses it to Puck's own documented<Render metadata={...}>prop, which every component receives asprops.puck.metadata.
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.