Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

search-insights

Package Overview
Dependencies
Maintainers
7
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

search-insights

Library for reporting click, conversion and view metrics using the Algolia Insights API

  • 2.17.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
627K
decreased by-8.61%
Maintainers
7
Weekly downloads
 
Created

What is search-insights?

The search-insights npm package is a JavaScript library that allows you to send analytics events to Algolia's Insights API. It helps you track user interactions with your search and discovery experiences, such as clicks, conversions, and view events.

What are search-insights's main functionalities?

Sending Click Events

This feature allows you to send click events to Algolia's Insights API. You can track which products users are clicking on after performing a search.

const searchInsights = require('search-insights');

searchInsights('init', { apiKey: 'yourAPIKey', appId: 'yourAppId' });

searchInsights('clickedObjectIDsAfterSearch', {
  eventName: 'Product Clicked',
  index: 'yourIndexName',
  queryID: 'theQueryID',
  objectIDs: ['objectID1', 'objectID2'],
  positions: [1, 2]
});

Sending Conversion Events

This feature allows you to send conversion events to Algolia's Insights API. You can track which products users are purchasing after performing a search.

const searchInsights = require('search-insights');

searchInsights('init', { apiKey: 'yourAPIKey', appId: 'yourAppId' });

searchInsights('convertedObjectIDsAfterSearch', {
  eventName: 'Product Purchased',
  index: 'yourIndexName',
  queryID: 'theQueryID',
  objectIDs: ['objectID1', 'objectID2']
});

Sending View Events

This feature allows you to send view events to Algolia's Insights API. You can track which products users are viewing.

const searchInsights = require('search-insights');

searchInsights('init', { apiKey: 'yourAPIKey', appId: 'yourAppId' });

searchInsights('viewedObjectIDs', {
  eventName: 'Product Viewed',
  index: 'yourIndexName',
  objectIDs: ['objectID1', 'objectID2']
});

Other packages similar to search-insights

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc