Why is req.op not typed in TypeScript?
The middleware adds `op` to the request object at runtime, so TypeScript needs a declaration to know about it. Add this to a `.d.ts` file or any module in your project:
```ts
import { OpenPanel } from '@openpanel/express';
declare global {
namespace Express {
export interface Request {
op: OpenPanel;
}
}
}
```
Do I need a client secret for Express?
Yes. `clientSecret` is required for server-side events, unlike browser SDKs where the client id alone is enough. Keep it in an environment variable and never ship it to a frontend bundle.
Which versions of Express are supported?
The package declares `express` as a peer dependency with the range `^4.17.0 || ^5.0.0`, so Express 4.17 and later on the 4.x line, and Express 5, are both supported.
Does Express analytics use cookies?
No. Privytics is cookieless by default and stores nothing on the device. On the server side there is no device to identify in the first place, so the way you get stable profiles is to call `identify()` with your own user id, or to return one from `getProfileId(req)`. That is opt-in and needs your own lawful basis. For browser traffic, the anonymous visitor id is a daily-rotating salted hash of IP, user agent and project id that rotates at midnight UTC.
How do I stop tracking health checks and internal routes?
Pass a `trackRequest(url)` function to the middleware and return `false` for the paths you want to skip. There is also a `filter` option that runs before an event is sent and drops it if it returns false, plus `disabled` to turn sending off entirely in local or test environments.
Where is the data stored?
Event data is stored in EU data centres in Germany. Privytics is a managed service built on the open-source OpenPanel engine (AGPL-3.0) and is not affiliated with, endorsed by, or sponsored by OpenPanel. The SDK packages are OpenPanel's, published under the @openpanel npm scope.