Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@algolia/autocomplete-plugin-algolia-insights
Advanced tools
A plugin to add Algolia Insights to Algolia Autocomplete.
@algolia/autocomplete-plugin-algolia-insights is a plugin for Algolia's Autocomplete library that integrates Algolia Insights, allowing you to track user interactions and improve search relevance based on user behavior.
Initialize the plugin
This code initializes the Algolia Insights plugin by passing the Algolia Analytics (aa) client to it. This setup is necessary to start tracking user interactions.
const algoliaInsightsPlugin = createAlgoliaInsightsPlugin({
insightsClient: window.aa,
});
Track search results click
This code tracks when a user clicks on a search result. It sends the event name, index name, object IDs, positions, and query ID to Algolia Insights.
algoliaInsightsPlugin.onClick({
insightsMethod: 'clickedObjectIDsAfterSearch',
payload: {
eventName: 'Product Clicked',
index: 'your_index_name',
objectIDs: ['objectID1'],
positions: [1],
queryID: 'queryID',
},
});
Track search results conversion
This code tracks when a user converts (e.g., makes a purchase) after searching. It sends the event name, index name, object IDs, and query ID to Algolia Insights.
algoliaInsightsPlugin.onConversion({
insightsMethod: 'convertedObjectIDsAfterSearch',
payload: {
eventName: 'Product Purchased',
index: 'your_index_name',
objectIDs: ['objectID1'],
queryID: 'queryID',
},
});
react-instantsearch is a library for building search interfaces with Algolia in React. It includes connectors and widgets for tracking user interactions, but it is more focused on building complete search UIs rather than just tracking events.
search-insights is another library for sending events to Algolia Insights. It is similar to @algolia/insights but is designed to work with the InstantSearch.js library. It does not provide the same level of integration with the Autocomplete library.
A plugin to add Algolia Insights to Algolia Autocomplete.
yarn add @algolia/autocomplete-plugin-algolia-insights@alpha
# or
npm install @algolia/autocomplete-plugin-algolia-insights@alpha
1.0.0-alpha.44 (2021-03-01)
shouldPanelOpen
(#456) (dd28098)title
s to submit and clear button (45944e4), closes algolia/algoliasearch-netlify#203FAQs
A plugin to add Algolia Insights to Algolia Autocomplete.
The npm package @algolia/autocomplete-plugin-algolia-insights receives a total of 472,563 weekly downloads. As such, @algolia/autocomplete-plugin-algolia-insights popularity was classified as popular.
We found that @algolia/autocomplete-plugin-algolia-insights demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 82 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.