| name | algolia-webhooks-events |
| description | Implement Algolia Insights API for click/conversion tracking, search analytics,
and real-time event-driven index updates via database change listeners.
Trigger: "algolia events", "algolia analytics", "algolia insights",
"algolia click tracking", "algolia conversion", "algolia event tracking".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(curl:*) |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","search","algolia"] |
| compatibility | Designed for Claude Code |
Algolia Events & Insights
Overview
Algolia doesn't use traditional webhooks. Instead, it provides the Insights API for sending user behavior events (clicks, conversions, views) back to Algolia, and the Analytics API for reading search performance data. For keeping your index in sync, you build event-driven pipelines from your database to Algolia.
Prerequisites
algoliasearch v5 installed (Insights client is included)
- Index with records and
queryID enabled (for click analytics)
search-insights npm package for frontend event tracking
Instructions
Step 1: Enable Click Analytics in Search
import { algoliasearch } from 'algoliasearch';
const client = algoliasearch(process.env.ALGOLIA_APP_ID!, process.env.ALGOLIA_ADMIN_KEY!);
const { hits, queryID } = await client.searchSingleIndex({
indexName: 'products',
searchParams: {
query: 'running shoes',
clickAnalytics: true,
},
});
Step 2: Send Click and Conversion Events (Backend)
await client.pushEvents({
events: [{
eventType: ,
: ,
: ,
: ,
: queryID,
: [],
: [],
: .(),
}],
});
client.({
: [{
: ,
: ,
: ,
: ,
: queryID,
: [],
: .(),
}],
});
client.({
: [{
: ,
: ,
: ,
: ,
: [],
: .(),
}],
});