agrid-node
v5.11.9
Published
Agrid Node.js integration for server-side analytics and feature flags
Maintainers
Readme
Agrid Node.js SDK
Server-side SDK for Agrid product analytics and feature flags. Use this package to capture events from backend services, workers, and serverless functions.
Installation
npm install agrid-node
# or
yarn add agrid-node
# or
pnpm add agrid-nodeQuick Start
import { Agrid } from 'agrid-node'
const agrid = new Agrid('YOUR_PROJECT_API_KEY', {
host: 'YOUR_INGESTION_URL'
})
await agrid.capture({
distinctId: 'user_123',
event: 'purchase_completed',
properties: { product_id: '123', price: 99.99 }
})
await agrid.shutdown()Features
- Event capture with custom properties
- Identify users and manage groups
- Server-side feature flags and variants
- Works in Node.js
>= 20, serverless, edge runtimes (see exports)
Exports
nodeentry:dist/entrypoints/index.node.*edge/workerdentries for edge runtimes
Links
- Main repo: https://github.com/agridvn/agrid-js
- npm: https://www.npmjs.com/package/agrid-node
