This topic details the BeaconConfig interface, including related interfaces, types, and default values. For more information about the script to paste into the <head> tag of your website’s HTML file and the JSON configuration, see Signals Beacon.

BeaconConfig

This object details the primary configuration interface for the signals beacon.
BeaconConfig
object
type
SignalAppType
default:"Retail"
The beacon supports both Retail signals and legacy site search signals.
attributes
BeaconAttributes
This attribute specifies a global configuration that will be inherited by each explicit action configuration for the beacon signals.
fields
{ [field: string]: BeaconFieldConfig }
default:":scope @id"
The main section for extracting product field values from your site.
query
BeaconQueryProps
This specifies how beacon signals should be handled when the main product page is searched.
click
BeaconClickProps
The configuration for beacon signals sent when a product is clicked.
cartAdd
BeaconCartAddProps
The configuration for beacon signals sent when a product is added to the shopping cart or bag.
purchase
BeaconPurchaseProps
The configuration for beacon signals sent when the user proceeds to the checkout phase on your site.

BeaconFieldConfig

This is a type alias for field configuration. The value can be a string, or a BeaconFieldRichConfig object.

BeaconFieldRichConfig

This object details the interface to fine tune field details.
BeaconFieldConfig
object
path
string
This is the field value path.
exclude
string
This string is excluded from the raw value.
type
string
default:"string"
This property provides additional typing information that allows for proper transformation of the value.

BeaconAttributes

This object details the interface for the global configuration inherited by each action configuration.
BeaconAttributes
object
idQueryParam
string
default:"pid"
The URL query parameter used to get the product ID from the product page.
cartId
string
default:"lwRetailCartId"
The local storage key for the consumer page storing the cart UUID.
productPath
string
default:".lw-product-item"
The CSS selector for targeting product elements. This is the global path inherited by each signal action.
numberTypeFields
string[]
default:"[price, quantity, revenue]"
This specifies the fields that are treated as number type fields.
data
string
This provides a more advanced way to obtain product details using serialized JSON in an element attribute.

BeaconSignalProps

This object details the interface that provides common properties for beacon signals.
BeaconSignalProps
object
productPath
string
The custom selector to target product elements specific to particular retail actions. The action values are query, click, cartAdd, and purchase.
fields
{ [field: string]: BeaconFieldRichConfig }
The main section for extracting product field values from your site.

BeaconQueryProps

This object details the interface for configuring beacon signals sent during a product search.
BeaconQueryProps
object
QueryParam
string
default:"query"
The URL query parameter the beacon uses to monitor query updates.
trigger
string
The CSS selector for targeting multiple page elements related to product query activities. The beacon analyzes the comma-separated elements, monitors when the ‘Enter’ key is pressed on the input element as well as clicks on the remaining elements, then sends query signals accordingly.
delayForTrackQueryUpdate
number
default:"1000"
This specifies the delay, in milliseconds, for tracking element updates in the query.

BeaconClickProps

This object details the interface for configuring beacon signals when the user clicks a product.
BeaconClickProps
object
productPath
string
The custom selector to target product elements specific to particular retail actions. The action values are query, click, cartAdd, and purchase.
fields
{ [field: string]: BeaconFieldRichConfig }
The main section for extracting product field values from your site.

BeaconCartAddProps

This object details the interface for configuring beacon signals sent when a product is added to the shopping cart or bag.
BeaconCartAddProps
object
productPath
string
The custom selector to target product elements specific to particular retail actions. The action values are query, click, cartAdd, and purchase.
fields
{ [field: string]: BeaconFieldRichConfig }
The main section for extracting product field values from your site.
trigger
string
The CSS selector for targeting multiple page elements related to trigger add-to-cart actions.

BeaconPurchaseProps

This object details the interface for configuring beacon signals sent when the user proceeds to the checkout phase of the transaction.
BeaconPurchaseProps
object
productPath
string
The custom selector to target product elements specific to particular retail actions. The action values are query, click, cartAdd, and purchase.
fields
{ [field: string]: BeaconFieldRichConfig }
The main section for extracting product field values from your site.
trigger
string
The CSS selector for targeting multiple page elements related to trigger purchase or checkout actions.
revenue
string
The path to the element that displays the total sum of the items in the cart.