- Visitor ID: A randomly generated identifier stored in local browser storage. It is unique to both the visitor and the device. It persists across sessions.
- Session ID: A randomly generated identifier stored in session storage. It expires after 40 minutes of inactivity or when the browser session ends. When the user returns, a new session ID is generated, but the visitor ID remains the same.
- Query ID: A randomly generated identifier created when a search query is submitted. It is temporarily stored in memory and is included with signal events related to that query, such as clicks or purchases.
- Cart ID: A unique identifier created when a product is added to the cart. It links cart interactions and purchases to the originating query. After a purchase, a new cart ID is generated to track subsequent transactions independently.
- When a user visits the site, a visitor ID and session ID are generated.
- When a query is submitted, a query ID is generated and a query signal is sent. This signal includes the visitor ID and session ID.
- For each new query, a new query ID is generated and another query signal is sent.
- When the user clicks on a product, a click signal is sent. This signal includes the associated query ID.
- When the user adds a product to their cart, a cart ID is generated and a cart-add signal is sent.
- When the user purchases a product, a purchase signal is sent. This signal includes the current cart ID, which allows the purchase to be traced back to the original query. After the signal is sent, the cart ID is replaced with a new one to track future transactions independently.

Configure the signals beacon
To see your signals analytics in Lucidworks Platform, you must configure the signals beacon as explained in this topic. The beacon sends signals to the:- Signals store for storage and aggregation
- Analytics Studio service, which provides insights about actions taken by users on your site
- Query signals. When a user performs a search, a signal is recorded.
- Click signals. When a user clicks on a product, a signal is recorded. One example of a click signal is when a user clicks a search result, which is a strong indicator the result is relevant.
- Cart-add signals. When a user clicks to add an item to the cart, a signal is recorded.
- Purchase signals. When a user clicks to purchase the items in the cart, a signal is recorded.
- Facet usage signals. When a user interacts with the facets associated with the results, a signal is recorded.
Prerequisites
You must be a workspace owner to configure the signals beacon. Before you begin, complete the following tasks:-
Analyze your site to confirm compatibility with the signals beacon.
The signals beacon is compatible with most websites, but you may need to adjust the configuration to ensure it works as needed.
- Your site should use URL query parameters (
?q=foo
), not other methods of sending the query parameters. If it is not an option to use query parameters on your site, you can use the Signals API to send signals.
- These fields should be surfaced in the page source, either as attributes or text nodes:
- Product ID
- Product title
- Product image URL
- Product price
- Product URL
- Your site should use URL query parameters (
-
Identify any other fields that you want the signals beacon to capture.
You’ll need their CSS paths to configure the beacon.
Again, these can be either attributes or text nodes, as in these examples:
The signals beacon supports multiple paths per field to accommodate this.A field’s path might be different on different pages of your site.
- Create the signals store where the signals will be stored.
Install the beacon
To install the beacon, navigate to the megamenu and click Signals.- Click the signal store where you want to configure the signals beacon and then click Integrations.
- If the beacon has never been configured for this app, you’ll see “No embed token found” on the Signals Using Beacon screen. In that case, click the Generate button. It can take a few moments to generate the token.
-
In the Allowed Origins field, enter the domains where you want to use the signals beacon. The format is
<scheme>://<hostname>[:<port>]
. For example,https://domain.your_company_name.com
. - Set the Signals Beacon toggle to On.
-
Click Copy to copy the script and insert that script into the
<head>
tag of your website’s HTML file.See Development and troubleshooting below.This also enables thewindow.logBeaconInfo()
function which you can use with your browser’s developer tools to inspect the fields captured by the beacon so that you can validate and refine your configuration. -
Edit the JSON configuration to process the signals you need for analytics.
For more details, see:
- Example JSON configuration
- Example signals script
- Field path configuration
- Beacon Configuration Interface for detailed configuration property information
-
Click Apply. The configuration is applied to your website and it begins to send signals instantly based on that configuration.
You can edit the configuration at any time. When you edit the JSON configuration and click Apply, the changes are applied in real time and signals are sent and processed using that configuration until it is modified.
Example JSON configuration
Use the following structure as an example to configure the beacon.JSON configuration
- Line 12. You can use multiple comma-separated paths in cases where a field has different paths on different pages of your site. See the Field path configuration section for details and examples.
- Line 15. Everything below this line is your signal configuration, where you list the signals you want to track and the fields you want to extract from them.
- Line 20. By default, these attributes inherit from the top-level attributes
[productPath|fields]
.
- Attributes and fields used to extract product details from page elements, see the Field path configuration section.
- The BeaconConfig interface, which includes detailed information about configuration properties, types, and default values, see Beacon configuration interface.
Example signals script
The following example contains possible fields and default values, as well as comments to help you determine other options and values.Signals script
- Line 2. Attributes provide a more advanced way to obtain product details using serialized JSON in an element attribute.
- Line 3. The CSS selector to target product elements. This is the global path inherited by each signal action if no custom path is provided at
[query/click/cartAdd/purchase].productPath
. The default is.lw-product-item
. - Line 4. The local storage key for the consumer page storing the cart UUID. The
cartId
value defaults tolwRetailCartId
. The beacon obtains the value fromlocalStorage.lwRetailCartId
when attaching cart info to/retail/signals/cartadd
and/retail/signals/purchase
. - Line 5. This list specifies the fields treated as number type fields. The defaults can be
[price, quantity, revenue]
. - Line 7. This is the main section to extract product field value from your site. For more information, see the Beacon element path section in this topic, which provides detailed configuration about extracting product information to ensure accurate and consistent data collection.
- Line 9. The
productId
field with a value ofscope@id
is the only required field to use the Lucidworks Retail Beacon API. - Line 14. Specifies the URL parameter the beacon uses to monitor query updates. For example, with the default param
query
, if the current product page is filtered with the keywordhat
, the URL parameter is http://example.com?query=hat. The default value isquery
. - Line 15. Specifies the delay, in milliseconds, for tracking element updates in the query. The default value is
1000
. - Line 17. Custom overwrite of the fields configuration at the root level.
- Line 34. The CSS selector that targets page elements for triggering add-to-cart actions. This has full CSS support for targeting multiple elements with comma-separated selectors. For example,
button.add-to-bag, #AddToBagWithPrice
. - Line 44. The CSS selector that targets page elements for triggering purchase or checkout actions. This has full CSS support for targeting multiple elements with comma-separated selectors. For example,
button.add-to-bag, #AddToBagWithPrice
.
Field path configuration
The signals beacon extracts product details from page elements using CSS selectors and attributes. You can capture any field that’s surfaced in the page’s DOM by adding it to your JSON configuration, under"fields"
.
This section shows you how to configure your field paths, with examples.
The format is: [Element CSS Selector]@[Value Attribute]
These special selectors and attributes are available:
- The
@text
pseudo-attribute captures the inner text node. - The
:scope
CSS class targets product details defined on the root product element.
Configure beacon for multiple pages of search results
You can configure the signals beacon if your site separates query results by tabs. For example, one tab for content and another tab for product information. In the following example, each tab’s content path is separated by a comma under"productPath"
with the "fields"
property defining what is tracked for each tab using :scope
.
Configuration
Development and troubleshooting
The signals beacon includes the built-inwindow.logBeaconInfo()
debugging utility that logs verbose information if the debug flag is enabled.
To enable the debug flag in your local storage, set localStorage.enableBeaconDev = true
.