Understand and extend the web event schema

Updated Nov 8, 2026 Based on Salesforce Developer documentation for Personalization (Event API, Interaction Definitions, Custom Events, Sitemap Implementation), retrieved 2026-11-08

Every action the Salesforce Interactions SDK reports — a page view, a click, or a custom action you define — travels to Personalization as one event object built around an interaction: a small record naming what the visitor did. Most page views are captured automatically; everything else you send yourself with one function call.

Send and extend events

  1. Let the Sitemap capture page views automatically — no code needed on pages it already matches.
  2. Track a click or other custom action by calling SalesforceInteractions.sendEvent() with an interaction object that has a name.
  3. Attach product, cart, or order data to an interaction using the built-in CatalogObjectInteraction, CartInteraction, or OrderInteraction shapes instead of inventing your own fields.
  4. Include a known identity (such as an email address) on the event’s user.identities field when you want it tied to a specific visitor.
  5. Listen for OnBeforeEventSend during testing to inspect, or cancel, an event before it leaves the browser.
// Track a custom interaction when a visitor clicks a banner
SalesforceInteractions.listener("click", ".header-banner", () => {
  SalesforceInteractions.sendEvent({
    interaction: { name: "Banner Click" },
    user: { identities: { emailAddress: userEmail } },
  });
});
Browser developer tools network panel showing an ActionEvent payload sent by the Interactions SDK
Screenshot: ActionEvent payload in the browser network panel

Discussion

Comments are not configured for local development. They appear once the site owner connects GitHub Discussions (Giscus).

Support SF Guide

SF Guide is a free, independent guide to Salesforce Personalization, built and maintained in the open. If it saved you time on an implementation, a small contribution helps keep it current and ad-light.