1. Funnel events

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.

Important

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:

NameTypeDescriptionValue
typeStringRequired.Type of the event.a2w
nameStringRequired.Name of the event, usually the name of the page where the event happened.homepdpcategorycartqview
value.productsArrayRequired.Products array containing a single product object.n/a
value.products[].skuStringRequired.SKU of the product that the user added to the wish list.n/a
value.products[].priceFloatRequired.Price of the product added to the wish list.n/a
value.products[].quantityIntegerRequired.Number of units of products that were added to the wish list by the user.n/a
value.products[].fitmentArrayRequired if the site supports fitments.Array of fitment objects. Refer to products and fitments for details.n/a
value.context.pageObjectRequired if the site is set up with locale configuration.Adds page-specific information (including locale information) under the page object.n/a
value.locale (deprecated)ObjectOptional.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"
          ]
        }
      }
    ]
  }
}
If you have suggestions for improving this article, let us know!