Skip to main content

Notifizz Event Tracking SDK

Event tracking is how your backend tells Notifizz that something happened. You emit one event with a flat track(eventName, properties) call, and the Notifizz orchestrator resolves campaigns, builds recipients, and dispatches notifications across every channel — no client-side workflow or recipient targeting.

TL;DR

  • One call, server-side routing. client.track(eventName, properties) is the only method you need to send. Campaign matching, enrichment, and channel dispatch happen in Notifizz.
  • Three SDKs, same wire format. Node, Java, and PHP all post to POST /v1/events/track with the same payload shape.
  • Idempotency built in. Every track() call carries an idempotency key (auto-generated UUID by default, caller-supplied when retrying jobs).
  • Retries built in. Each SDK retries transient failures twice (1s, then 2s) before bubbling the error.
  • Enrichers are Node-only today. Java and PHP can still receive enriched data — they just can’t expose enrichers. Parity is on the roadmap.

Available SDKs

Node.js

@notifizz/nodejs — full surface including the enricher subsystem and the body-only dispatch() webhook entry point.

Java / Kotlin

com.notifizz:notifizz-java — Maven Central package for JVM applications.

PHP

notifizz/php — Composer package for PHP applications.

Cross-language feature matrix

CapabilityNodeJavaPHP
track(eventName, properties, options?)✅ (overload with idempotencyKey)✅ (?string $idempotencyKey)
Auto-generated idempotency key✅ (UUID)✅ (UUID)✅ (random hex)
Caller-supplied idempotency key
Retry on transient failure (1s, 2s)
generateHashedToken(userId)
config({ baseUrl })
Expose enrichers (enricher() + dispatch(body))
Declare events with schema (declareEvent(name, options))
Schema validation modes (schemaMode: 'soft' | 'strict')
Bundled Zod re-exportn/an/a
The enricher subsystem (registering server-side resolvers that the Notifizz orchestrator calls back via HMAC-signed webhooks) ships only with the Node SDK today. A campaign that runs on Java or PHP backends can still consume enriched data — the enrichers themselves just need to be hosted from a Node service. Java/PHP parity is on the roadmap; track the docs gap audit for status.

Wire format

All three SDKs hit the same backend endpoint:
POST /v1/events/track
Authorization: Bearer <sdkSecretKey>
X-Idempotency-Key: <idempotencyKey>
Content-Type: application/json

{
  "eventName": "order.shipped",
  "properties": { "orderId": "ORD-4521", "userId": "u_42" },
  "sdkSecretKey": "<sdkSecretKey>",
  "idempotencyKey": "<idempotencyKey>"
}
The full DTO and idempotency contract are in the Event Tracking reference.

FAQ

Use the SDK that matches your backend runtime. There is no functional gap between them for track(). The only feature delta is the enricher subsystem, which is Node-only today — if your campaigns need server-side enrichment, host the enrichers from a Node service (the rest of your stack stays in Java or PHP).
client.send(...) and the POST /v1/notification/.../track route were removed. The whole platform is now event-driven: emit an event, let a campaign decide the channel and the recipients. Migrating is a one-line change to client.track(eventName, properties).
Put the recipient identifiers in the event properties ({ userId, email, ... }) and let the campaign’s orchestrator resolve them — directly, via an enricher, or via a dynamic recipient source. The shape “one event per audience” is intentional: it keeps the recipient resolution server-side and traceable.
Not today. Each track() call is one event. If you need to emit many events at once, fire them in parallel from your code — the SDK retries each one independently and idempotency keys prevent duplicates.
The backend has already accepted an event with the same idempotency key. This is the success path for a retried emit — your code does not need to do anything. See the Event Tracking reference for the full response shape.
Yes. The wire format is plain HTTP+JSON — see the Event Tracking reference. Any language that can make an authenticated POST works. The SDKs only add idempotency-key generation, retries, and HMAC token helpers on top.

See also

Backend quickstart

Send your first event in under five minutes.

Event Tracking reference

Full HTTP wire format, idempotency contract, error shapes.

Notification Center widget

Display the notifications your events drive.

Authentication overview

Pick the right widget auth mode for your stack.