Set up the Compass recommendations block in PageBuilder Editor
This guide walks you through adding the Compass recommendations block to a page in Arc XP PageBuilder Editor so a personalized reel renders for your readers, then verifying that the block can reach the Recommendations API from the browser.
Content ingestion and API token provisioning are covered elsewhere; this guide links out to those references rather than repeating them.
Overview
The block calls the Recommendations API directly from the browser with an X-API-Key header. The API returns a ranked list of items, each carrying a display-ready card object, and the block renders them as a reel.
The block can only recommend content that is already in your catalog. For Arc XP CMS customers, the platform-managed arc_xp_compass integration keeps the catalog in sync; see Sync Your Content Catalog with Compass.
The Recommendations API is served from:
https://{org}-config-prod.api.arc-cdn.net/Replace {org} with your organization identifier; the config and prod
segments are fixed. The path prefix selects the backend — /collector/v1 for
the Collector API and /experiences/recommend/v1 for the Recommendations API — appended to
this host.
For the full API contract, see the Compass API Developer Guide and the API Reference.
Prerequisites
Before you start, make sure you have:
- Compass enabled for your organization. If it is not, contact Arc XP Client Support.
- A headless API token (
X-API-Key) assigned to the experiences key collection, used by the block in the browser. You do not need a collector key for the block. See Provision and Manage Compass API Keys. - Roles: PageBuilder Editor admin (to place the block and set site properties).
- Content in your catalog. Without ingested content the block renders an empty reel. See Sync Your Content Catalog with Compass.
Add the recommendations block
The block renders the personalized reel. It reads your experiences key and site identifiers from PageBuilder Editor site properties, calls the Recommendations API directly from the browser, and maps each returned card onto a story card.
Step 1 — Add the reference block to your theme
- Clone the recipe from arcxp-recommendations-ui-recipe and copy the recommendations feature block into your theme’s blocks.
- Deploy your theme so the block is available in PageBuilder Editor.
- In PageBuilder Editor, edit the page or template where the reel should appear.
- Add the Recommendations feature block (labeled Recommendations – Arc Block in the block picker) to the layout.
- Save the page as a draft — you will publish it after you complete Steps 2 through 4.

Step 2 — Set the block custom fields
The block exposes these custom fields in PageBuilder Editor:
| Custom field | Purpose | Example |
|---|---|---|
displayAmount | Number of recommendations to request and render (1–50). | 10 |
lazyLoad | Defer fetching until the block scrolls into view. | true |
openInNewTab | Open recommended items in a new browser tab. | false |
previewMode | Editor-only preview. When on, the carousel renders sample data (or recommendations for Preview User ID) so you can see the layout while composing. Off by default. | false |
previewUserId | Editor-only. With Preview Mode on, preview recommendations for this user id; leave empty to preview sample data. | (empty) |
Step 3 — Set the site properties
The block reads three site properties from your site configuration. Set these per deployment in the PageBuilder Editor admin. The property names carry an internal fyRecommender prefix; enter them exactly as shown:
| Property | Purpose | Example |
|---|---|---|
fyRecommenderOrg | Your organization identifier. Derives the API host {org}-config-prod.api.arc-cdn.net. | {org} |
fyRecommenderSite | The site_id your content is ingested under. For Arc XP CMS customers, this is the Arc XP website ID (arcSite). | <site_id> |
fyRecommenderApiKey | The headless X-API-Key assigned to the experiences collection. | <headless-key> |

Step 4 — Provide a stable user ID
The Recommendations API requires a user_id for every request. The block reads a stable per-visitor identifier from fy_user_id (cookie or localStorage). If it is absent, the block cannot request personalized results.
- For logged-in readers, set
fy_user_idto your anonymized, stable user identifier. - For anonymous readers, generate a stable ephemeral ID once and persist it, so the same visitor produces the same
user_idacross sessions.
When your properties are set and the block has a user_id, publish the page. The block renders the reel after the API returns items.
For a framework-agnostic view of how the returned card maps onto a story card (empty and error states included), see Deploying and Rendering Recommendations.
Verify the block
Run these checks to confirm the block’s experiences key and browser access are working.
1. Authentication check (server-side)
Confirm your experiences key is accepted and returns results:
curl -i -H "X-API-Key: <headless-key>" \ "https://{org}-config-prod.api.arc-cdn.net/experiences/recommend/v1/recommendations?site_id=<site_id>&user_id=test-user&num_results=5"Expected results:
200with arecommendationsarray. Before the model is trained, the items are a preview in which every score is0.0. That is still success. See Cold start and model warm-up.403with the body{"detail":"Tenant is not active"}→ the tenant is still onboarding with no content ingested, or is otherwise not active. This is not a key problem. Ingest content, or contact Arc XP Client Support.401→ the request reached Compass with no tenant identity, or for an org that is not a Compass tenant. This is a misconfiguration, never “not ready yet”. Check the key and the base URL.403with any other body → the key is not assigned to the experiences collection. Re-check the assignment step in the token-provisioning guide.422→ a required query parameter (site_idoruser_id) is missing.
2. CORS preflight check (browser-direct)
The block calls the API from the browser, so the preflight must succeed for your origin:
curl -i -X OPTIONS \ -H "Origin: https://<your-site-origin>" \ -H "Access-Control-Request-Method: GET" \ -H "Access-Control-Request-Headers: x-api-key" \ "https://{org}-config-prod.api.arc-cdn.net/experiences/recommend/v1/recommendations"Expected: 200 (or 204) with access-control-allow-origin for your origin, access-control-allow-methods: GET, OPTIONS, and access-control-allow-headers including X-API-Key.
If the allow headers are missing, your origin is not in the API’s allowed origins.
3. In-browser check
Load the page with the block and confirm the reel renders for a visitor with a valid user_id.
FAQs
What do I set fyRecommenderSite to?
For Arc XP CMS customers, your site_id is the Arc XP website ID (arcSite). Compass ingests each story under the website it is published to. Set fyRecommenderSite to that value so the block reads from the same partition your content is ingested under. See Finding your site_id.
Why does a card have no image?
The item has no thumbnail in its card. The block renders a placeholder in that case. Make sure your published content carries a lead image so the ingest maps a thumbnail.
Which key goes where — experiences or collector?
The experiences key goes in the block (browser) and is public. A collector key is server-side only and must never reach the browser. The block never needs a collector key.
Why do I get a 200 with a list of scores that are all 0.0, an empty list, or a 403?
An untrained tenant almost always gets a preview with every score 0.0, not an empty list. An empty list means the tenant is trained and nothing is eligible, or there is nothing to preview. A 403 is either the tenant status or the browser preflight. See Troubleshoot Compass Recommendations.