@metrone-io/server 1.0.0 → 1.0.1

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 +55 -0
  2. package/package.json +6 -2
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # @metrone-io/server
2
+
3
+ Server-side SDK for [Metrone](https://metrone.io) analytics. Works with Node.js, Deno, Bun, and edge runtimes.
4
+
5
+ Track events, AI calls, and conversions from your backend. Read analytics data via the API.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @metrone-io/server
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```javascript
16
+ import { MetroneServer } from '@metrone-io/server'
17
+
18
+ const metrone = new MetroneServer({
19
+ apiKey: 'metrone_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
20
+ })
21
+
22
+ // Track events
23
+ await metrone.track('user_signup', { properties: { plan: 'pro' } })
24
+
25
+ // Track AI interactions
26
+ await metrone.trackAICall({
27
+ call_id: 'call_123',
28
+ provider: 'openai',
29
+ duration: 120,
30
+ intent: 'booking',
31
+ outcome: 'converted'
32
+ })
33
+
34
+ // Read analytics
35
+ const stats = await metrone.getStats({ days: 7 })
36
+ const pages = await metrone.getPages({ days: 7, limit: 10 })
37
+ const live = await metrone.getLiveVisitors()
38
+ ```
39
+
40
+ ## Features
41
+
42
+ - Zero runtime dependencies
43
+ - Event tracking with batching and retries
44
+ - AI call and chat session tracking
45
+ - Read API for stats, pages, sources, events
46
+ - Live visitor count
47
+ - Works on Node.js 18+, Deno, Bun, Cloudflare Workers
48
+
49
+ ## Documentation
50
+
51
+ [metrone.io/docs](https://metrone.io/docs)
52
+
53
+ ## License
54
+
55
+ [MIT](../../LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metrone-io/server",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Metrone server-side SDK for Node.js, Deno, Bun, and edge runtimes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -47,9 +47,13 @@
47
47
  "license": "MIT",
48
48
  "repository": {
49
49
  "type": "git",
50
- "url": "https://github.com/metrone/metrone.git",
50
+ "url": "https://github.com/metrone-io/sdks.git",
51
51
  "directory": "packages/server"
52
52
  },
53
+ "bugs": {
54
+ "url": "https://github.com/metrone-io/sdks/issues"
55
+ },
56
+ "homepage": "https://metrone.io",
53
57
  "engines": {
54
58
  "node": ">=18.0.0"
55
59
  },