This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
feat(insights): add insights support to InfiniteHits widget #666
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
looks good to me |
this adds almost a whole kb, expected? |
tkrugg
force-pushed
the
feat/insights-with-vue-is-in-infinitehits
branch
from
April 24, 2019 12:04
ba19842
to
e91bb90
Compare
**Summary** This integrates insights with Vue Instantsearch to help using Click Analytics in InfiniteHits. Using `connectInfiniteHitsWithInsights` instead of `connectInfiniteHits` exposed a new property `insights` to the internal state, which user can call to emit insights events. **Result** ```html <ais-infinite-hits> <div slot-scope="{ items, refine, insights }"> <div v-for="item in items"> <button @click="insights('clickedObjectIDsAfterSearch', { eventName: 'Add to cart', objectIDs: [item.objectID] })">Add to cart</button> </div> <button @click="refine()"> Load more </button> </div> </ais-infinite-hits> ```
tkrugg
force-pushed
the
feat/insights-with-vue-is-in-infinitehits
branch
from
April 24, 2019 12:05
e91bb90
to
58f949e
Compare
I increased the bundlesize.
|
samouss
suggested changes
Apr 25, 2019
tkrugg
force-pushed
the
feat/insights-with-vue-is-in-infinitehits
branch
from
April 26, 2019 08:05
5cc5e49
to
b03c9c0
Compare
samouss
approved these changes
Apr 26, 2019
Haroenv
pushed a commit
to algolia/instantsearch
that referenced
this pull request
Dec 28, 2022
…vue-instantsearch#666) * feat(insights): add insights support to InfiniteHits widget **Summary** This integrates insights with Vue Instantsearch to help using Click Analytics in InfiniteHits. Using `connectInfiniteHitsWithInsights` instead of `connectInfiniteHits` exposed a new property `insights` to the internal state, which user can call to emit insights events. **Result** ```html <ais-infinite-hits> <div slot-scope="{ items, refine, insights }"> <div v-for="item in items"> <button @click="insights('clickedObjectIDsAfterSearch', { eventName: 'Add to cart', objectIDs: [item.objectID] })">Add to cart</button> </div> <button @click="refine()"> Load more </button> </div> </ais-infinite-hits> ``` * fix: increase bundle size 66kB -> 67kB * fix: declare variable inside scope * fix: expose insights in item slot
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This integrates insights with Vue Instantsearch to help using Click
Analytics in InfiniteHits.
Using
connectInfiniteHitsWithInsights
instead ofconnectInfiniteHits
exposed a new property
insights
to the internal state, which user cancall to emit insights events.
Result