What is Pulse?
Netcore Unbxd Pulse is a JavaScript snippet added to your website to capture anonymous data on user interactions. This data is sent to our servers, where it fuels Unbxd’s AI models, enhancing your shoppers’ ability to find the products they’re looking for.
Pulse is engineered to function without impacting site performance. It operates efficiently, utilizing event listeners to track shopper activity without interfering with the browser’s event loop.
How to integrate Netcore Unbxd Pulse?
Review prerequisites
Every event requires mandatory attributes to form its payload. Ensure these values are accessible in the page, DOM, or URL for sending the event. Additionally, specific HTML attributes may need to be added for each document or event type. Refer to the event payload section for detailed information.
Add the integration code
Add the following <script>
tag at the end of your site’s HTML body.
The use of the defer
attribute is to load the script in parallel with HTML parsing, ensuring the script executes only after the HTML is fully parsed. This improves the load performance of the page.
Validate payload data retrieval
Verify that Netcore Unbxd Pulse can retrieve event payload data from sources such as DOM, URL, or browser windows.
How to check if event payload data is retrieved?
Search event
The mandatory query
payload is captured from the search input box, and the event is triggered when the shopper either presses the Enter key or clicks the search submit button.
In this reference markup, the query value is extracted by targeting the input value from the class selector.
Browse event
💡 You can skip this event if you’ve not purchased Netcore Unbxd Browse.
The mandatory page
and pageType
payloads should be triggered on all category pages.
Activating the categoryPage
event relies on the configuration of category fields in your feed and the method used to request the category API. To enable this event, make sure the UnbxdAnalyticsConf
object is properly set on the window with accurate page
and page_type
values.
In this reference markup, the page
and page_type
values are extracted by targeting the UnbxdAnalyticsConf
object from the window.
Click event
The mandatory pid
payload is captured from the product element of the Products Listing Page, and the click event is triggered when the shopper clicks on the product.
Key points:
- The
pid
can be obtained from an HTML attribute or a URL, such as theimg_url
orhref
on the product card. - If the unique ID for the product has not been added to the product element, refer to the Netcore Unbxd Search API response to pass it.
Cart event
1. Quick view/Product details page
The mandatory pid
and variantid
(if your catalog contains product variants) payloads are captured from the DOM or from a URL, such as the browser URL, img_url
, or href
in the product details section. The event is triggered when the respective CTA button is clicked.
Example browser URL: https://www.example.com/product/product_107440/107440_green?sale=clearance
2. Cart dropdown/Cart page
The mandatory pid
and variantid
(if your catalog contains product variants) payloads are captured from the DOM or from a URL, such as the browser URL, img_url
, or href
in the product details section. The event is triggered when the quantities are modified.
Order event
The ownership of the Order event lies with the retailer. Details of successfully ordered products should be stored as a variable on the browser’s window, as demonstrated in the example below. Netcore Unbxd Pulse will retrieve this data from the window object and trigger the order event accordingly.
💡 The key names need to be maintained as shown in the example below given the ownership of the event will not be with Netcore Unbxd.
Autosuggest
Things to note before configuration:
- Only required if you’ve subscribed to the Netcore Unbxd Autosuggest solution.
- Mandatory to add the payload data to the DOM if you’ve not used the Netcore Unbxd Autosuggest SDK.
KEYWORD_SUGGESTION
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | KEYWORD_SUGGESTION |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.
TOP_SEARCH_QUERIES
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | TOP_SEARCH_QUERIES |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.
PROMOTED_SUGGESTION
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | PROMOTED_SUGGESTION |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.
TRENDING_QUERIES
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | TRENDING_QUERIES |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.
IN_FIELD
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | IN_FIELD |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
data-unxAsFldName | Name of the catalog field associated with the query |
data-unxAsFldValue | Value of the associated field |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.
POPULAR_PRODUCTS
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | POPULAR_PRODUCTS |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
data-unxAsPid | Unique ID of the product as per Unbxd catalog |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.
POPULAR_PRODUCTS_FILTERED
Below are the mandatory HTML attributes and values that need to be placed in the Autosuggest UI section:
Attribute Name | Value (Should be an exact match) |
---|---|
data-unxAsType | POPULAR_PRODUCTS_FILTERED |
data-unxAsSugg | suggested query |
data-unxAsPrank | index number |
data-unxAsPid | Unique ID of the product as per Unbxd catalog |
data-unxAsSrcQuery | Name of the suggested query shown upon hover |
The attribute names can be defined based on your requirements. However, the attribute values must match EXACTLY as provided above.