šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.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
Version published
Weekly downloads
0
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