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:

Name

Type

Description

Value

type

String

Required.

Type of the event.

a2w

name

String

Required.

Name of the event, usually the name of the page where the event happened.

  • home

  • pdp

  • category

  • cart

  • qview

value.products

Array

Required.

Products array containing a single product object.

n/a

value.products[].sku

String

Required.

SKU of the product that the user added to the wish list.

n/a

value.products[].price

Float

Required.

Price of the product added to the wish list.

n/a

value.products[].quantity

Integer

Required.

Number of units of products that were added to the wish list by the user.

n/a

value.products[].fitment

Array

Required if the site supports fitments.

Array of fitment objects. Refer to products and fitments for details.

n/a

value.context.page

Object

Required 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)

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.

RequestResponse
{
  "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"
          ]
        }
      }
    ]
  }
}

Do you have some feedback for us?

If you have suggestions for improving this article,