Skip to content

Commit 11a0f20

Browse files
docs: enhance telemetry documentation with self-reporting capabilities
1 parent 1549544 commit 11a0f20

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

apps/docs/resources/telemetry.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ const editor = await Editor.open(file, {
9191
Custom key-value pairs included with every event. Use this to attach your own identifiers (customer ID, environment, etc.).
9292
</ParamField>
9393

94+
<ParamField path="telemetry.licenseKey" type="string" deprecated>
95+
**Deprecated.** Use the root-level `licenseKey` instead. If both are provided, the root-level key takes priority.
96+
</ParamField>
97+
9498
### Disabling telemetry
9599

96100
Set `enabled: false` to turn telemetry off entirely:
@@ -107,6 +111,28 @@ const superdoc = new SuperDoc({
107111

108112
No network requests will be made. Document metadata (GUID and timestamp) is still generated locally so files export correctly.
109113

114+
### Self-reporting
115+
116+
You can route telemetry through your own server using `telemetry.endpoint`. SuperDoc sends the same JSON payload to whatever URL you provide — inspect it, store it, forward it, or drop it.
117+
118+
```javascript
119+
const superdoc = new SuperDoc({
120+
selector: '#editor',
121+
document: yourFile,
122+
licenseKey: 'your-license-key',
123+
telemetry: {
124+
enabled: true,
125+
endpoint: 'https://your-server.com/superdoc/telemetry',
126+
},
127+
});
128+
```
129+
130+
Your server receives a `POST` with the payload described in [Payload example](#payload-example). From there you can aggregate usage on your side — count document opens per customer, track adoption across teams, or feed the data into your own billing pipeline.
131+
132+
<Note>
133+
A dedicated self-reporting API with dashboards and usage summaries is under development and will be available soon. In the meantime, proxying via `telemetry.endpoint` gives you full control over the raw data.
134+
</Note>
135+
110136
## License key
111137

112138
The license key identifies your organization. It's sent as an `X-License-Key` header with every telemetry request.

0 commit comments

Comments
 (0)