Newer Version Available
Wish-List Interactions
| Interaction Name | Description |
|---|---|
| wish-list-add | Captures an event for the addition of an item to a wish list. |
| wish-list-remove | Captures an event for the removal of an item from a wish list. |
| wish-list-replace | Captures an event for the replacement of all items in a wish list at the same time. |
| wish-list-update | Captures events for updates to a wish list. |
Fields
| Field | Details |
|---|---|
| attributes |
|
| id |
|
| lineItems |
|
| name |
|
Add to Wish List Interaction Event
1event.target.dispatchEvent(
2 new CustomEvent('experience_interaction', {
3 bubbles: true,
4 composed: true,
5 detail: {
6 name: 'wish-list-add',
7 wishList: {
8 id: 'wish-list-12345',
9 lineItems: {
10 catalogObject: {
11 id: 'catalog-id-12345678',
12 type: 'Product'
13 },
14 attributes: {
15 quantity: 12,
16 price: 2.5,
17 name: 'gray-jeans'
18 },
19 },
20 attributes: {
21 currency: '$',
22 name: 'my-personal-wish-list,
23 },
24 },
25 },
26 })
27);