sergehuber opened a new pull request, #27: URL: https://github.com/apache/unomi-tracker/pull/27
## Summary - New `wemInitConfig.apiKey`: the tracker sends it as `X-Unomi-Api-Key` on `context.json` and `eventcollector`. Without it, requests are unchanged, so the same tracker works with Unomi 2.x, 3.x and 4.x (https://issues.apache.org/jira/browse/UNOMI-1019). - No tenant ID setting: on public endpoints Unomi 4 finds the tenant from the public key alone. - Version 2.0.0. The TypeScript types added since 1.5.0 are strict: a TypeScript project that passes a short configuration no longer compiles. The README has an "Upgrading from 1.x" section. - `NOTICE` and `KEYS` are back in the npm package (`"files"` had dropped them). - README: setup example, configuration for each Unomi version, cookies across origins, all `wemInitConfig` options. - Corrected the `sendCredentials` comment from #26: without cookies, Unomi 4 creates a new profile on every request; Unomi 2.x and 3.x keep it through the session. - `yarn test:servers` (not part of CI): starts Unomi 2.7.0, 3.0.0, 4.0.0-SNAPSHOT multi-tenant and 4.0.0-SNAPSHOT in compatibility mode with Docker Compose, sets up the tenant, keys and scope, and runs the tracker in Chromium. See `test/servers/README.md`. ## Found by the new tests (not fixed here) Both are marked as expected failures, so the suite reports them until they are fixed: - The UMD build throws `Buffer is not defined` in a browser: `es6-crawler-detect` (3.x and 4.x) calls `Buffer.byteLength`. It works in Unomi's bundled tracker because its build adds Node polyfills. - Unomi drops view and click events from a page whose `digitalData.page` has `attributes`, as the manual's tutorial shows: the page schema does not allow that property (2.7.0, 3.0.0 and 4.0). ## Related - Manual changes in apache/unomi: see the UNOMI-1019 PR there. ## Test plan - [x] `yarn lint`, `yarn test` (includes `tsc`) - [x] `yarn test:servers`: all four servers pass - [ ] CI 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
