add documentation on how to use insights middleware in Nuxt #5379
Replies: 0 comments 6 replies
-
Hey! I guess Nuxt doesn't have access to the import insightsClient from 'search-insights';
// ...
export default {
data() {
// ...
return {
...mixin.data(),
insightsClient,
};
},
}; |
Beta Was this translation helpful? Give feedback.
-
And would you make events like this then? this.insights("clickedObjectIDsAfterSearch", item, "Go to product page") and this.insights("convertedObjectIDsAfterSearch", { eventName: "Add to cart", objectIDs: [item.objectID + ""] }); |
Beta Was this translation helpful? Give feedback.
-
it would be |
Beta Was this translation helpful? Give feedback.
-
Should I add it to ais-instant-search-ssr ? if I just import it into my hits component and use it like above i get this error: Otherwise if I use it like this:
I get this error: |
Beta Was this translation helpful? Give feedback.
-
Otherwise, do you have any docs on implementing this in nuxt? :) |
Beta Was this translation helpful? Give feedback.
-
Bug 🐞
What is the current behavior?
Currenly i'm using ais-instantsearch-ssr and i want to add algolia analytics to this.
But right now i get some errors regarding the server side rendering and etc.
What is the expected behavior?
Track searchs, clicks, and conversions with insights.
RIght now i get a window is not defined when i add insights to data like this:
is there a fix to this?
if i add it in beforeMount i get this error on clicks:
Do you have a working example with insights enabled in nuxt?
Beta Was this translation helpful? Give feedback.
All reactions