The value object

Every event you send to Discover must include a value object. The contents of this object depend on the type of event being sent as well as the type of widget the event originates from.

The following table lists supported attributes for the value object:

Name

Type

Description

Value

context

context object

Required when sending user's fitment, geo, or browser information.

Information about context.

n/a

products

array of product objects

Required for product events such as widget:click, view:pdp, order:confirm, and so on.

Array of objects containing product information. Can be an array containing a single product.

n/a

user

user object

Required for any event that accesses user information, such as user:login, user:info, and so on.

Basic user information.

n/a

checkout

checkout object

Required for order:confirm events.

Checkout information.

n/a

f (deprecated)

string

Optional. Can be used in widget events.

Type of widget.

  • rw: recommendation widget

  • sp: search results widget

  • sb: preview search widget

  • cb: content block widget such as a banner or HTML block

rfkid

string

Required.

ID of the widget configured in CEC.

Important

This must match the corresponding rfkid set up in the CEC. If the rfkid is not provided or the wrong rfkid is sent, then no attribution numbers for that widget are reported.

n/a

index

integer

Required if product or facet link.

Position in an array of objects. Objects can be products, keyphrase suggestions, suggested categories, and so on.

Indexing starts at 0.

n/a

url

string

Required for widget events.

URL of the page in which widget is placed.

n/a

dn (deprecated)

string

Optional.

Domain.

n/a

locale (deprecated)

locale object

Optional.

Locale information.

Important

This locale object is deprecated. We recommend you use the page object for locale information.

n/a

w

string

Required for preview search widget events.

Area of widget where click happened.

Tip

Use the type field for further information about the type of suggestion or facet.

  • suggestion

  • facet

type

string

Required for preview search widget events.

Type of suggestion link or facet type the user clicks on.

Example facet types: size, color, rating, price, and so on.

Link types:

  • trending_category

  • trending_brand

  • keyphrase

  • category

  • brand

text

string

Optional.

Link or facet text that was clicked.

n/a

kw

string

Required for search widgets.

Keyword user typed before clicking a link.

n/a

m

string

Required if backend returns a modified keyword.

Modified keyword returned as part of response.

n/a

click_type

string

Required for clicks on HTML content or embedded action buttons.

The type of link or button that is associated with a click event.

n/a

click_sub_type

string

Optional.

Additional sub-type of the link or button that the user clicked.

n/a

click_text

string

Required for clicks on HTML content or embedded action buttons.

Label value of the link or button associated with the above click type.

Example values are "Add to Cart", "Show", "Quick View", and so on.

n/a

click_text_id

string

Optional.

Normalized text ID of a label value associated with the link or button that the user clicked.

n/a

click_uri

string

Required if the clicked link has a URI associated with it.

URI associated with a click

n/a

Do you have some feedback for us?

If you have suggestions for improving this article,