Skip to content

Set up Personalization

EdgeKit sets up Personalization for your organization. You tell EdgeKit how your events and profile fields map onto it and which scenarios you need. EdgeKit creates the database and the scenarios, writes the configuration and deploys it.

  • Your CMS content syncs to EdgeKit. The catalog is built from your content items, so a site with no synced content has nothing to recommend. See Content sources and Arc XP.
  • Your pages run EdgeKit’s tracker, and set its user id to the EdgeKit user id when a user signs in. Call setUserId on the tracker from createTracker with the user’s EdgeKit user id. Recommendations, profile fields and erasure all name the user by that id, so events under any other id land on a different user in your Personalization database.
  • Your events carry the article id. An event that says a user viewed an article must carry that article’s id from your CMS in a top-level field of its own data, the same value Content › Content › Items shows as CMS id.

Ask EdgeKit to create your organization’s Personalization database, and say which region it should be in. Use one database for your whole organization: EdgeKit separates your sites inside it.

There is no console screen for this. Personalization is on once EdgeKit has set up your database: EdgeKit starts writing to it, and both recommendation paths answer. Until then, both answer 503 service_unavailable, Recommendations are not configured.

EdgeKit then syncs your content again, so every published item reaches your Personalization catalog. From then on, each item is sent when it syncs.

Tell EdgeKit:

  • Which of your event schemas count as which interaction, and which top-level field holds the article id. For example: com.example/article_view/1 is a detail view with the article id in article_id. An event schema can be a detail view, a view portion, a bookmark, a rating, a purchase or a cart addition. See The event map. Unless the article’s content source has the source key arcxp, also give that source key, as Content › Configuration › Sources lists it, for example news. See Item ids.
  • Which of your event schemas fires when a user signs in. EdgeKit merges the device into the user on that event. It must carry both the device id and the user id, so track it after setUserId.
  • Which profile fields to send as user properties. Only your own profile fields can be sent. See Users.
  • Which site’s profile to send. One site only.

EdgeKit writes this as your organization’s Personalization configuration, adds it to your draft and deploys it. It takes effect from that deploy. Staging refuses a draft whose Personalization configuration is invalid, or names a profile site the deployment does not carry. See Stage and deploy a change.

Ask EdgeKit to change the configuration later, for example when you add an event schema or a profile field.

Tell EdgeKit each place your pages or newsletters show recommendations and what each should show, such as read-next under an article and for-you on a home page. EdgeKit creates and tunes a scenario for each, with its logic, filters and boosters, and gives you its name. Ask EdgeKit to change a scenario at any time.

A request that names a scenario your database does not have answers 422 unprocessable_entity, Unknown scenario.

Every link EdgeKit returns carries ?recomm_id=<id>, and each answer has its own id. Set your CDN to ignore recomm_id in its cache key, or every recommended click misses your cache. Keep the parameter in the URL the page loads: EdgeKit reads it from the page URL of the events the page sends, and that is how a click is attributed to its recommendation.

  • From your pages: call /edgekit/v1/recommendations on your own domain. Your domain must route /edgekit/ to EdgeKit. A call from any other origin must come from one of the site’s allowed origins. See Mount /edgekit/ on your domain.
  • From your server: issue an API key pinned to the site, and call /v1/recommendations with it. See Issue and revoke API keys.

See Get recommendations for both requests.

A personalised feed in a newsletter picks each recipient’s items from Personalization when the edition is sent.

In Messaging › Email & Push Editions › Feeds, a feed of type Personalised takes a scenario, picked from your database’s scenarios. With No scenario, every recipient gets the same items from the feed’s filters. The Personalised type cannot be chosen until EdgeKit has set up your database.

When Braze renders a recipient’s message, it calls GET /v1/recommendations with the recipient’s user id, the feed’s scenario and the feed’s filters. Store an API key pinned to the newsletter’s site in Braze as a Connected Content credential named edgekit. EdgeKit never puts the key in the URL. If the call fails after Braze’s retries, Braze does not send that recipient’s message. An empty answer leaves the slot out, and the message still goes.

Before you send personalised editions:

  • Tell EdgeKit before your first personalised edition, so your database is ready for the volume. Every recipient costs at least one recommendation call, so an edition to a million recipients is at least a million calls, sent as fast as Braze sends.
  • Ask EdgeKit to turn on already-read filtering for your database before a feed uses Remove what the user already read, which sends excludeAlreadyRead=true. Until then, every such request fails, and with it the send.

edgekit.ai