@hanzo/event 0.3.34 → 0.3.35

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.
package/README.md CHANGED
@@ -30,21 +30,33 @@ starve the other:
30
30
  ### No bundler? Use the hosted tag
31
31
 
32
32
  ```html
33
- <script defer src="https://api.hanzo.ai/v1/event.js" data-key="pk-…"></script>
33
+ <script defer src="https://api.hanzo.ai/v1/event/tag.js" data-key="pk-…"></script>
34
34
  ```
35
35
 
36
36
  That one line is the whole install, and it is the same line for a published site,
37
37
  hanzo.team and a customer's own page. The tag is served by the door that eats the
38
38
  events, so a caller allowlists ONE host and the tag can never drift from the wire
39
- it posts to. It adds DOM **autocapture** `$click` (with an element locator),
40
- `$outbound`, `$scroll`, `$form`, `$vitals` which a bundled app does not need and
41
- a plain page cannot get, and it carries the site's tag config from `/v1/tags`, so a
42
- pixel is configured on the project rather than pasted into the page.
39
+ it posts to `.js` is part of a segment rather than a child of one, so the tag
40
+ sits UNDER `/v1/event` rather than beside it, and the old sibling `/v1/event.js`
41
+ 404s.
42
+
43
+ It autocaptures pageviews — the first one and every SPA navigation, since
44
+ `history.pushState` fires no event of its own — plus uncaught errors and rejected
45
+ promises. Anything a page means on purpose goes through `window.hanzo`
46
+ (`track`, `identify`, `page`, `error`, `flush`). It also carries the site's tag
47
+ config from `/v1/projects/tags`, so a pixel is configured on the project rather
48
+ than pasted into the page.
49
+
50
+ > A bundled app should NOT add this tag. Both clients post pageviews to the same
51
+ > door, so a page running `@hanzo/event` and the tag counts every pageview twice.
52
+ > One surface, one client.
43
53
 
44
54
  > **`data-key` is a publishable `pk-`, and without one the tag is INERT.** A write
45
55
  > the door cannot attribute is refused (`401 ingest_key_required`) silently, so a
46
- > keyless tag measures fine in the browser and files nothing. Mint one with
47
- > `POST /v1/keys {"type":"publishable"}`.
56
+ > keyless tag measures fine in the browser and files nothing. A project mints one
57
+ > with itself: `POST /v1/projects`. A key that names no project is refused
58
+ > `403 ingest_key_unknown` — the door fails closed rather than filing a write it
59
+ > cannot attribute.
48
60
 
49
61
  This package is the client for a surface that **builds**. There is no second
50
62
  script-tag distribution here: one wire, one door, one tag.
package/dist/index.cjs CHANGED
@@ -376,7 +376,7 @@ function uuidv7Time(id) {
376
376
  }
377
377
 
378
378
  // src/version.ts
379
- var VERSION = "0.3.34";
379
+ var VERSION = "0.3.35";
380
380
 
381
381
  // src/sentry.ts
382
382
  var MAX_FRAMES = 50;