This guide gives you a working personalization path: a visitor records a preference, ACI evaluates that consented event, and a later request can receive the matching compiled experience. Visitors without a matching membership continue to receive the base page.
Access: Must be enabled for your organization. Contact your Gradial team to get access.
Prerequisites
- Node.js 22 or newer
- npm 10 or newer
- A personalization-enabled ACI site for hosted preview
Local development does not require an ACI account. It verifies content, contracts, overlays, and rendering. Hosted preview is required to verify consented identity and request-time selection.
1. Create the starter site
Astro is the shortest path to a new ACI project:
Open the local URL printed by Astro. The starter compiles .content/ on startup and refreshes the page when content changes.
2. Find the personalization resources
The starter includes one complete example:
The base homepage contains a component block with a stable ID:
The rendered buttons record a custom event without application-specific analytics code:
ACI normalizes that event to custom.preference.
3. Understand the segment
.content/segments/preference-blue/_index.json defines the behavior that qualifies:
event_latest evaluates the most recent event with that name. Here, the color property must be blue.
4. Connect the segment to an audience
.content/audiences/preference-blue/_index.json gives that membership a stable target:
The segment decides membership. The audience decides which experience can be selected. Keeping them separate lets you reuse targeting logic across content.
5. Inspect the experience overlay
.content/overlays/audience/preference-blue/pages/home/_index.json patches the base block by its ID:
Only the two changed fields appear in the overlay. ACI retains the remaining props from the base component and validates the resolved experience against the same contract.
6. Confirm site configuration
The starter’s .content/config/site.json includes the audience dimension and enables collection:
The preset connects to an existing consent manager; it does not define your privacy policy. See Collection and Consent before using real traffic.
7. Run the local gates
A successful compile proves that the segment, audience reference, overlay, base page, and component contract resolve together. A successful local render does not prove hosted identity or edge selection.
8. Preview the selected experience
Push the reviewed content to an ACI branch, then open the branch preview supplied for your site:
On the ACI preview surface, compare:
The first request must show the base experience. The second explicitly selects the compiled audience variant for preview. The aci_audience selector is a preview control; production selection follows authored targeting and consented membership.
When both paths are correct, continue with Preview, Publish, and Roll Back.
Next: Audiences and Segments →