Notifizz Node.js SDK
The @notifizz/nodejs package is the official JavaScript/TypeScript client for Notifizz. Use it to track events, run workflows, generate hashed user tokens, and send notifications to the Notification Center.Installation
Initialize the client
Track events with workflows
Start tracking an event withtrack(), then attach one or more workflows and recipients. The context auto-sends after a short delay (configurable via config), or you can await it like a promise:
.workflow(campaignId, recipients) calls before the event is sent.
Generate a hashed user token
Use this for backend authentication (e.g. when the Notification Center is authenticated with a backend token):Configuration
Configure client options such as the auto-send delay for tracked events:API summary
| Method | Description |
|---|---|
new NotifizzClient(authSecretKey, sdkSecretKey) | Create a client. |
client.track({ eventName, sdkSecretKey, properties }) | Start tracking an event; returns a context. |
context.workflow(campaignId, recipients) | Attach a workflow and recipients (chainable). |
client.generateHashedToken(userId) | Generate a hashed token for the user. |
client.send({ notifId, properties }) | Send a notification to the Notification Center. |
client.config({ autoSendDelayMs }) | Configure options (e.g. auto-send delay in ms). |