Skip to main content Link Search Menu Expand Document (external link)

Others

Table of contents

  1. unbxdAnalytics
  2. hashMode
  3. updateUrls
  4. actionBtnClass
  5. actionChangeClass
  6. allowExternalUrlParams
  7. extraParams
  8. debugMode
  9. defaultFilters
  10. searchEndPoint
  11. browseQueryParam
  12. searchQueryParam

Other Configurations

unbxdAnalytics

Boolean

Turn this flag on if you want Unbxd Search sdk to fire analytics events like track search click, track category page click, track product impressions, track facet click, track product click, etc. Note that you have to integrate the Unbxd Analytics SDK as well for tracking analytics events.

Default Value

unbxdAnalytics: false

Scenarios

  1. true - analytics events will be fired from the search sdk
  2. false - analytics events will not be fired from the search sdk

hashMode

Boolean

From SDK version: v2.1.0, this configuration will be a part of URL. Please check here for more details.


updateUrls

Boolean

From SDK version: 2.1.0, this configuration will be deprecated.


actionBtnClass

Note: Please note this config has been moved as part of facet config from sdk version 2.1.5.


actionChangeClass

String

Note: Please note this config has been moved as part of facet config from sdk version 2.1.5.


allowExternalUrlParams

Boolean

From SDK version: v2.1.0, this configuration will be a part of URL. Please check here for more details.


extraParams

Object

The extraParams object is a versatile feature in our code to send any additional parameters in the search API call. It allows you to use static key-value pairs or dynamic functions returning the values in string formats, enabling real-time adjustments of data like segmentation, currencies, languages, etc. in your API requests. This flexibility enhances your Unbxd search API integration, making it more responsive and adaptable to your specific application needs.

Default Value

{ "version":"V2" }

Scenarios

  1. In case of dynamic values, a function can be written to return the value in a string format on the client end.
{
	"version":"V2",
	"uc_param": function() {
	    /** Custom logic based on dynamic conditions **/
	    return "value";
	},
	"segment": "region_id:101,Custome_type:Gold",
	"location": window.location
 }

Note: Please make sure that version: V2 is not overwritten in the custom implementation of extraParams.


debugMode

Boolean

In our ongoing commitment to providing a seamless integration and debugging experience, we are pleased to introduce the Debug Mode feature. Debug Mode serves as a valuable tool for developers by capturing configuration or coding errors directly in the browser’s development console during the integration or debugging process.

Enabling Debug Mode allows for real-time identification and logging of issues that may arise from misconfigurations or errors within the SDK code. This functionality aids developers in swiftly diagnosing and rectifying issues, facilitating a smoother integration process and expediting debugging efforts.

To leverage the benefits of Debug Mode, developers can easily toggle the feature on/off as needed, ensuring a customizable and efficient debugging experience.

Note: The debugMode is available only in the version v2.1.2 and beyond.

Default Value

debugMode: true

Scenarios

  • true: Console logs configuration and coding errors in real-time, aiding developers during integration.
  • false: Doesn’t not console any errors.

defaultFilters

Object

This is used to set a default filter condition for all search queries and category pages.

Default Value

{}

Scenarios

In cases where the search/category api results are required to be filtered based on a constant filter condition, apart from the user selected filters


searchEndPoint

String

Domain name of the search API endpoint.

Default Value

searchEndPoint:https://search.unbxd.io”	

Scenarios

  1. In case of a staging sitekey, it will be:
    searchEndPoint:"https://wingman-argocd.unbxd.io/"	
    

browseQueryParam

String

This will be the default query param for the search api to provide category information like category path or category id.

Default Value

browseQueryParam: "p"

Scenarios

  1. p-id: If we are providing the category path id to the search api.
     p-id: categoryPathId:"4"
    
  2. p: If we are providing the category path to the search api.
     p: categoryPath:"Computers & Accessories>Ink & Toner"
    

Note: This particular config is only for customizing the browse query param sent in the search API and not the web URL which is documented here.


searchQueryParam

String

From SDK version: v2.1.0, this configuration will be a part of URL.Please check here for more details.