This pull request introduces a new feature to the HitsSearcher component, enabling automatic sending of hits view Insights events with object IDs received from search results hits. The addition simplifies tracking user interactions with search results and generating valuable analytics data.
Adds the isAutoSendingHitsViewEvents flag to the HitsSearcher component, which defaults to true, indicating that the automatic hits view Insights events sending is enabled by default. The logic to automatically send Insights events when search results are received and displayed has been implemented, based on the state of the isAutoSendingHitsViewEvents flag.
Adds the userToken property to the HitsSearcher component to identify unique users and associate their interactions with the search results. If not provided, it's generated automatically according adopting the user-token format introduced in the Javascript, iOS and Flutter implementations.
Test cases have been added to ensure the correct behavior of the new feature when the flag is enabled or disabled.
Describe your change
This pull request introduces a new feature to the
HitsSearcher
component, enabling automatic sending of hits view Insights events with object IDs received from search results hits. The addition simplifies tracking user interactions with search results and generating valuable analytics data.Adds the
isAutoSendingHitsViewEvents
flag to theHitsSearcher
component, which defaults totrue
, indicating that the automatic hits view Insights events sending is enabled by default. The logic to automatically send Insights events when search results are received and displayed has been implemented, based on the state of theisAutoSendingHitsViewEvents
flag.Adds the
userToken
property to theHitsSearcher
component to identify unique users and associate their interactions with the search results. If not provided, it's generated automatically according adopting the user-token format introduced in the Javascript, iOS and Flutter implementations.Test cases have been added to ensure the correct behavior of the new feature when the flag is enabled or disabled.