@eventra_dev/eventra-sdk 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +58 -49
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,15 +4,20 @@
4
4
 
5
5
  # Eventra SDK
6
6
 
7
+ [![npm version](https://img.shields.io/npm/v/@eventra_dev/eventra-sdk.svg)](https://www.npmjs.com/package/@eventra_dev/eventra-sdk)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@eventra_dev/eventra-sdk.svg)](https://www.npmjs.com/package/@eventra_dev/eventra-sdk)
9
+ [![TypeScript](https://img.shields.io/badge/typescript-ready-blue.svg)](https://www.typescriptlang.org/)
10
+ [![License](https://img.shields.io/npm/l/@eventra_dev/eventra-sdk)]()
11
+
7
12
  Production-grade analytics SDK for tracking **feature usage, product behavior, and backend activity**.
8
13
 
9
14
  Eventra helps you:
10
15
 
11
- * Track feature adoption
12
- * Detect unused features
13
- * Understand user behavior
14
- * Monitor backend usage
15
- * Analyze product growth
16
+ - Track feature adoption
17
+ - Detect unused features
18
+ - Understand user behavior
19
+ - Monitor backend usage
20
+ - Analyze product growth
16
21
 
17
22
  ---
18
23
 
@@ -20,12 +25,12 @@ Eventra helps you:
20
25
 
21
26
  Eventra SDK is:
22
27
 
23
- * Lightweight (~minimal overhead)
24
- * Runtime-aware (Browser, Node, Edge, Serverless)
25
- * Resilient (batching + retry + circuit breaker)
26
- * Durable (browser persistence)
27
- * Smart (adaptive behavior per environment)
28
- * TypeScript-first
28
+ - Lightweight (~minimal overhead)
29
+ - Runtime-aware (Browser, Node, Edge, Serverless)
30
+ - Resilient (batching + retry + circuit breaker)
31
+ - Durable (browser persistence)
32
+ - Consistent (same delivery model across all environments)
33
+ - TypeScript-first
29
34
 
30
35
  ---
31
36
 
@@ -64,11 +69,11 @@ That's it.
64
69
 
65
70
  The SDK automatically handles:
66
71
 
67
- * batching (browser)
68
- * retries
69
- * queueing
70
- * flushing
71
- * runtime adaptation
72
+ - batching
73
+ - retries
74
+ - queueing
75
+ - flushing
76
+ - runtime adaptation
72
77
 
73
78
  ---
74
79
 
@@ -76,13 +81,13 @@ The SDK automatically handles:
76
81
 
77
82
  Eventra SDK adapts automatically:
78
83
 
79
- | Environment | Behavior |
80
- | ----------- | ------------------------------ |
81
- | Browser | batching + persistence + retry |
82
- | Node.js | instant send |
83
- | Serverless | sync send (no event loss) |
84
- | Edge | lightweight send |
85
- | Workers | instant send |
84
+ | Environment | Behavior |
85
+ | ----------- | -------------------------------------- |
86
+ | Browser | batching + persistence + retry |
87
+ | Node.js | batching + retry |
88
+ | Serverless | immediate flush + retry |
89
+ | Edge | lightweight batching |
90
+ | Workers | batching |
86
91
 
87
92
  No config needed.
88
93
 
@@ -167,14 +172,14 @@ tracker.track("error.occurred", {
167
172
 
168
173
  ## Where You Can Use It
169
174
 
170
- * Browser apps
171
- * React / Next.js
172
- * Node.js backends
173
- * NestJS services
174
- * Express APIs
175
- * Edge runtimes
176
- * Serverless (AWS / Vercel)
177
- * Bun / Deno
175
+ - Browser apps
176
+ - React / Next.js
177
+ - Node.js backends
178
+ - NestJS services
179
+ - Express APIs
180
+ - Edge runtimes
181
+ - Serverless (AWS / Vercel)
182
+ - Bun / Deno
178
183
 
179
184
  ---
180
185
 
@@ -190,10 +195,10 @@ const tracker = new Eventra({
190
195
  tracker.track("page.viewed");
191
196
  ```
192
197
 
193
- batching
194
- retry
195
- persistence (localStorage)
196
- flush on tab close
198
+ - batching
199
+ - retry
200
+ - persistence (localStorage)
201
+ - flush on tab close
197
202
 
198
203
  ---
199
204
 
@@ -207,8 +212,10 @@ const tracker = new Eventra({
207
212
  tracker.track("invoice.created");
208
213
  ```
209
214
 
210
- immediate send
211
- no buffering
215
+ - batching
216
+ - retry
217
+ - auto flush (interval)
218
+ - graceful shutdown support
212
219
 
213
220
  ---
214
221
 
@@ -220,14 +227,15 @@ export default async function handler(req, res) {
220
227
  apiKey: "...",
221
228
  });
222
229
 
223
- await tracker.track("function.called");
230
+ tracker.track("function.called");
224
231
 
225
232
  res.status(200).end();
226
233
  }
227
234
  ```
228
235
 
229
- no event loss
230
- sync delivery
236
+ - immediate flush
237
+ - retry
238
+ - optimized for short-lived environments
231
239
 
232
240
  ---
233
241
 
@@ -252,7 +260,7 @@ const tracker = new Eventra({
252
260
  | ------------- | ----------------------------- |
253
261
  | apiKey | Project API key |
254
262
  | endpoint | Event ingestion endpoint |
255
- | flushInterval | Batch interval (browser only) |
263
+ | flushInterval | Flush interval (ms) |
256
264
  | maxBatchSize | Events per batch |
257
265
  | maxQueueSize | Max buffer size |
258
266
  | maxRetries | Retry attempts |
@@ -273,7 +281,7 @@ await tracker.flush();
273
281
  tracker.destroy();
274
282
  ```
275
283
 
276
- Stops timers and clears internal state.
284
+ Stops timers, removes listeners, and clears internal state.
277
285
 
278
286
  ---
279
287
 
@@ -281,12 +289,12 @@ Stops timers and clears internal state.
281
289
 
282
290
  Eventra SDK includes:
283
291
 
284
- * Idempotency (no duplicates)
285
- * Retry with exponential backoff
286
- * Circuit breaker (prevents overload)
287
- * Queue persistence (browser)
288
- * Safe fallback for all runtimes
289
- * sendBeacon optimization (browser exit)
292
+ - Idempotency (stable event IDs during retries)
293
+ - Retry with exponential backoff
294
+ - Circuit breaker (prevents overload)
295
+ - Queue-based delivery (all runtimes)
296
+ - Queue persistence (browser)
297
+ - sendBeacon optimization (browser exit)
290
298
 
291
299
  ---
292
300
 
@@ -297,11 +305,12 @@ Eventra SDK includes:
297
305
  "sentAt": "2026-03-12T10:00:00Z",
298
306
  "sdk": {
299
307
  "name": "@eventra_dev/eventra-sdk",
300
- "version": "ultra",
308
+ "version": "1.1.3",
301
309
  "runtime": "browser"
302
310
  },
303
311
  "events": [
304
312
  {
313
+ "idempotencyKey": "uuid",
305
314
  "name": "user_signup",
306
315
  "userId": "user_123",
307
316
  "timestamp": "2026-03-12T10:00:00Z",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventra_dev/eventra-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"