@punchline-analytics/next 0.2.0 → 0.3.0

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/dist/index.d.ts CHANGED
@@ -23,6 +23,11 @@ interface EdgeEvent {
23
23
  clicks?: Record<string, string>;
24
24
  accept: string | null;
25
25
  query?: string;
26
+ browserHeaders?: {
27
+ fetch: boolean;
28
+ hints: boolean;
29
+ lang: boolean;
30
+ };
26
31
  visitorId?: string;
27
32
  consent?: true;
28
33
  ip: string;
package/dist/index.js CHANGED
@@ -667,6 +667,8 @@ function buildEvent(request, siteId, facts, now = Date.now(), allowed = [], clic
667
667
  ...clicks ? { clicks } : {},
668
668
  accept: truncateAccept(h.get("accept")),
669
669
  ...query ? { query } : {},
670
+ // Presence only, never values: scripts that borrow a browser's name rarely send these (R15).
671
+ browserHeaders: { fetch: h.has("sec-fetch-dest") || h.has("sec-fetch-mode"), hints: h.has("sec-ch-ua"), lang: h.has("accept-language") },
670
672
  ip: (facts.ip || "unknown").slice(0, 45),
671
673
  userAgent: h.get("user-agent") ?? "",
672
674
  gpc: h.get("sec-gpc") === "1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punchline-analytics/next",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "See which visitors are AI agents: Next.js middleware/proxy for Punchline Analytics. Forwards a minimal, privacy-reduced event per page request.",
5
5
  "type": "module",
6
6
  "license": "MIT",