SDK integration for adding a new Discovery setup to an existing Engagement setup
Welcome note
Data hub is our new upgraded platform, which we rolled out in August 2025. It offers a single unified integration for passing your data through to your Bloomreach products.
You have access to Data hub if you've implemented with Bloomreach after August 2025.
Customers who have implemented before August 2025 should follow the existing documentation for Engagement, Discovery, and Clarity.
Adding Discovery to existing Engagement
- Follow this when you are adding Discovery specific tracking to a website with already existing Engagement tracking in place.
- You are not expected to replace
exponeawithbrwebafter transitioning from Engagement JS SDK to Bloomreach Web SDK.- Original Engagement tracking integration JS SDK uses
exponea.track()and after snippet upgrade to Bloomreach Web tracking snippet, you shall keep usingexponea.track().
- Original Engagement tracking integration JS SDK uses
- Prerequisite (provisioning and grant access)
- Engagement project is migrated to Data hub and workspace
- Discovery account project
- Update the tracking snippet on your website with the tracking snippet expansion below
- Update tracking events according to the tracking specifications here: SDK tracking required events details
- For any questions about which tracking events are relevant to your business objectives, refer to the Tracking document and data requirements tailored for you by Bloomreach or your implementation partner
Tracking snippet expansion
- Add Discovery specific keys to your snippet
- Set page title to a canonical form, especially if you use marquee or animated page titles
track: {
default_properties: {
page_title: "Yellow wide sweater with turtleneck | Pacific",
customer_tier: "gold-member" // your additional custom segments for Discovery
},
metadata: {
domain_key: "Pacific", // Bloomreach provided key for Discovery
view_id: "en_US", // Bloomreach provided key for Discovery
}
}
Track view_homepage
- Track this event when homepage loads.
- This event will show in Discovery as "Homepage page view" (ptype=homepage)
exponea.track("view_homepage");
Track suggest_click
- Track this event when user clicks on any suggested item (suggested item can be keyword, product, category, content)
- This event is an intent to search.
- This event will show in Discovery as "Suggest event" (etype=suggest)
function onSuggestClicked() {
exponea.track("suggest_click", {
q: "turtleneck",
aq: "tur",
catalogs: [
{
name : "products_en",
view_ids: ["en_US"]
}
]
});
}
Track search_submit
- Track this event when user submits a search query.
- This event is an intent to search.
- This event will show in Discovery as "Search event" (etype=suggest)
function onSearchSubmitted() {
exponea.track("search_submit", {
q: "turtleneck",
catalogs: [
{
name : "products_en",
view_ids: ["en_US"]
}
]
});
}
Track view_search_results
- Track this event on search results page
- This event will show in Discovery as "Search page view" (ptype=search)
exponea.track("view_search_results", {
search_term: "turtleneck",
catalogs: [
{
name : "products_en",
view_ids: ["en_US"]
}
]
});
Expand purchase event
- Add additional properties, follow the provided tracking specs
- Most importantly add
price_local_currencyandlocal_currency - Ensure the
purchase_statusis set to"created"for placed orders.
- Most importantly add
- If you are tracking
purchasefrom the server-side- Set
metadata._br_uid_2to the string contents of URL decoded cookie_br_uid_2.
- Set
- If you are tracking
purchase_item:- Add
product_listto yourpurchaseevent. - Stop tracking
purchase_itemto avoid duplicates.
- Add
- If you are not tracking
purchasefrom the server side, thenmetadata._br_uid_2is added automatically by JS SDK.
Adding metadata to your command (API request):
"metadata": {
"_br_uid_2": "uid=7080827054609:v=cde-v3.38.0:ts=1741771054202:hc=6:cdp_segments=NjY1MGUwZjEzMzdmODlhMmViZTY2Y2FiOjY2NTcyMmI2NGQwYWIyMmQ2NTYzODgwMw=="
}
Track view_other
- Track this event on any other page that can't be recognised as any of the above page load events.
- It will show in Discovery as "Other page view" (ptype=other).
exponea.track("view_other");
Track the rest of events
view_content: Track when a content page is viewed.view_thematic: Track when a thematic page served by Discovery SEO is loaded.view_quickview: Track when product details are shown in a modal on the current page.widget_view: Track when recommended products by Discovery Recommendations and Pathways are shown.widget_click: Track when a user interacts with an item from the widget.cart_updatefrom a widget: Track when a user adds an item to the cart from a widget.
Updated 4 months ago
