Coder Social home page Coder Social logo

Comments (4)

rallu avatar rallu commented on August 17, 2024

Here is a new documentation page on getting those settings: https://docs.klevu.com/headless-sdk/klevu-merchant-center-settings

from frontend-sdk.

asunny4375 avatar asunny4375 commented on August 17, 2024

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.

rallu avatar rallu commented on August 17, 2024

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.

rallu avatar rallu commented on August 17, 2024

Closing as inactive

from frontend-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.