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.
Catalog Interactions
A catalog interaction occurs when a customer interacts with various
tracking items. For example, catalog items could include a product or a blog
post.
| Interaction Name | Description |
|---|---|
| catalog-object-click | Captures the event of a user clicking a catalog object. |
| catalog-object-impression | Captures the event of a user viewing search results or category products. Available in package version 1.3 and later. |
| catalog-object-view-start | Captures the start point of a user viewing a catalog object. |
| catalog-object-view-stop | Captures the stop point of a user viewing a catalog object. |
| form-submit | Captures the event of a user submitting a form. |
Fields
| Field | Details |
|---|---|
| attributes |
|
| id |
|
| lineItems |
|
| name |
|
| type |
|
View Catalog Object Start Interaction Event
1event.target.dispatchEvent(
2 new CustomEvent('experience_interaction', {
3 bubbles: true,
4 composed: true,
5 detail: {
6 name: 'catalog-object-view-start',
7 catalogObject: {
8 id: 'product-12345678',
9 lineItems: {
10 id: 'line-item-12345',
11 catalogObject: {
12 . id: 'catalog-id-12345678',
13 type: 'Product'
14 },
15 attributes: {
16 quantity: 12,
17 price: 2.5,
18 name: 'blue-shirt'
19 },
20 },
21 },
22 },
23 })
24);View Catalog Object Stop Interaction Event
1event.target.dispatchEvent(
2 new CustomEvent('experience_interaction', {
3 bubbles: true,
4 composed: true,
5 detail: {
6 name: 'catalog-object-view-stop,
7 catalogObject: {
8 id: 'product-12345678',
9 lineItems: {
10 id: 'line-item-12345',
11 catalogObject: {
12 . id: 'catalog-id-12345678',
13 type: 'Product'
14 },
15 attributes: {
16 quantity: 12,
17 price: 2.5,
18 name: 'blue-shirt'
19 },
20 },
21 },
22 },
23 })
24);Click Catalog Interaction Event
1event.target.dispatchEvent(
2 new CustomEvent('experience_interaction', {
3 bubbles: true,
4 composed: true,
5 detail: {
6 name: 'catalog-object-click',
7 catalogObject: {
8 id: 'product-12345678',
9 lineItems: {
10 id: 'line-item-12345',
11 catalogObject: {
12 . id: 'catalog-id-12345678',
13 type: 'Product'
14 },
15 attributes: {
16 quantity: 12,
17 price: 2.5,
18 name: 'blue-shirt'
19 },
20 },
21 },
22 },
23 })
24);