Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Engagement Interactions
An engagement interaction occurs when a customer engages with your site
through buttons, links, or other page elements.
| Interaction Name | Description |
|---|---|
| anchor-click | Captures any anchor click. |
| button-click | Captures any button click. |
| page-scroll-to-bottom | Captures when a user scrolls to the bottom of the page. |
| page-view | Captures the event when a user views a page. |
Fields
| Field | Details |
|---|---|
| attributes |
|
| linkhref |
|
| name |
|
Anchor Click Interaction Event
1event.target.dispatchEvent(
2 new CustomEvent('experience_interaction', {
3 bubbles: true,
4 composed: true,
5 detail: {
6 name: 'anchor-click',
7 linkHref: 'https://expectedUrl'
8 attributes: {
9 buttonLabel: 'Click here'
10 },
11 },
12 })
13);Button Click Interaction Event
1event.target.dispatchEvent(
2 new CustomEvent('experience_interaction', {
3 bubbles: true,
4 composed: true,
5 detail: {
6 name: 'button-click',
7 attributes: {
8 buttonLabel: 'Click here'
9 }
10 },
11 })
12);