Comments (4)
Here is a new documentation page on getting those settings: https://docs.klevu.com/headless-sdk/klevu-merchant-center-settings
from frontend-sdk.
Hi,
I have done the below code as per the document for retrieving the data in headless front-end using the Klevu React SDK.
import { KlevuKMCSettings, KlevuLastSearches } from '@klevu/core' const settings = await KlevuKMCSettings() setKmcSettings(settings.root) setKmcBanner(settings.banner) setLastSearches(Array.from(KlevuLastSearches.get()).reverse())
- Tried for popular search, but kmcSettings?.klevu_webstorePopularTerms doesn't exist
- Tried for recent searches, but KlevuLastSearches.get() not returning anything.
- Tried for promo banner by settings.banner returning empty.
I have enabled popular search and recent searches from Klevu dashboard. I have also added promo banner as well (Promotions -> Banner management)
Also need to get the promo banner if search results are empty for a keyword as well
Can you let me know why the above codes not returning the result. Let me know if any other code needs to be used to achieve this.
from frontend-sdk.
Sounds like there is a problem with the backend side of things with KMC settings. Please contact our support and they can debug your account and check the settings: https://help.klevu.com/support/tickets/new
For KlevuLastSearches
to work you need to make analytical calls correctly then the search is recorded. So you have to either use the sendSearchEvent()
modifier or use result objects click events.
from frontend-sdk.
Closing as inactive
from frontend-sdk.
Related Issues (20)
- kmcRecommendation doesn't support BOUGHT_TOGETHER_PDP logic HOT 3
- Promo banner in Quick Search HOT 1
- FilterManager.readFromURLParams should take care of multiple values in the URL HOT 2
- proposal: add selectedfilters getter to the FilterManager HOT 1
- 'itemGroupdId' is required for Product recommendation HOT 2
- "currentProductId" should be in "recentObjects" instead of "sourceObjects" for PDP recommendations HOT 2
- Integration issue | https://eselo-qbj-1618476066-staging-dal.readymage.com/ HOT 3
- ExcludeIds Limitation HOT 3
- fetch products by category (by category name) to show the products on category page HOT 5
- Question: How to get recommendations title HOT 4
- How to search based of language e.g en(english) or ar(arabic) HOT 2
- how to fetch products by brand HOT 2
- Facing issue on analytics Events HOT 1
- How to enable Personalization on NextJS framework server side render? Can't take effect on server side render HOT 5
- Ideas for improving Analytics detail HOT 3
- Error: Directory import not supported resolving ES modules HOT 1
- ReferenceError: window is not defined at isLocalStorage HOT 2
- How do I send a simple search to analytics HOT 2
- How to re-initialize template based on new search HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frontend-sdk.