Add to wishlist event
The add to wishlist
event (a2w:<page title>
) must be sent when a user adds a product to a wish list.
Currently, you can use the a2w
event to customize the user experience but it does not yet generate analytics.
The following table lists the properties of the a2w
event:
Name |
Type |
Description |
Value |
---|---|---|---|
|
String |
Required. Type of the event. |
|
|
String |
Required. Name of the event, usually the name of the page where the event happened. |
|
|
Array |
Required. Products array containing a single product object. |
n/a |
|
String |
Required. SKU of the product that the user added to the wish list. |
n/a |
|
Float |
Required. Price of the product added to the wish list. |
n/a |
|
Integer |
Required. Number of units of products that were added to the wish list by the user. |
n/a |
|
Array |
Required if the site supports fitments. Array of fitment objects. Refer to products and fitments for details. |
n/a |
|
Object |
Required if the site is set up with locale configuration. Adds page-specific information (including locale information) under the page object. |
n/a |
|
Object |
Optional. A locale object. This attribute is deprecated. We suggest you use the page object for locale data. |
n/a |
Sample event specification
The following is an example of an add to wishlist
event object. This example is in the new format, which means it contains a context
object.
{
"type": "a2w",
"name": "home",
"value": {
"context": {
"page": {
"locale_country": "<country code, 2 letters, lowercase, e.g. fr>",
"locale_language": "<language code 2 letters, lowercase, e.g. en>",
"locale_currency": "<currency code, 3 letters, lowercase, e.g. eur>"
}
},
"products": [
{
"sku": "191258",
"fitment": {
"ids": [
"3333"
]
}
}
]
}
}