What's Changed
BREAKING CHANGE: Refactored result object to be more straight forward
Instead of calling a analytical function to return function to call it can be used directly send a event.
So previous one called analytical events like this:
const res = await KlevuFetch(categoryMerchandising("women"))
const query = res.queriesById("categoryMerchandising")
const eventHandler = query.getCategoryMerchandisingClickSendEvent()
// somewhere in click handler
eventHandler(product.id)
Is changed something like this:
const res = await KlevuFetch(categoryMerchandising("women"))
const query = res.queriesById("categoryMerchandising")
// somewhere in click handler
query.categoryMerchandisingClickEvent({ productId: product.id })
Note that queriesById
not returns KlevuResponseQueryObject
instead of KlevuFetchQueryResult
Full Changelog: https://github.com/klevultd/frontend-sdk/compare/@klevu/core-2.0.13...@klevu/core-3.0.0