@justai/cuts 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Base.astro +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A persona's named parts \u2014 the page shell that holds them, and the cuts themselves.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
package/src/Base.astro CHANGED
@@ -169,7 +169,15 @@ const localePath = (l: string) => (l === defaultLocale ? "/" : `/${l}/`);
169
169
  // EEA + UK + CH: deny analytics until the visitor consents (the banner below grants it).
170
170
  gtag("consent", "default", { region: ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH"], ad_storage: "denied", ad_user_data: "denied", ad_personalization: "denied", analytics_storage: "denied" });
171
171
  try { var cc0 = localStorage.getItem("consent"); if (cc0) gtag("consent", "update", { analytics_storage: cc0 }); } catch (e) {}
172
- gtag("config", gaId, { cookie_expires: 60 * 60 * 24 * 60, /* two months — matches the GA data retention; the cookie must not outlive the data it labels (foundations/15) */ allow_google_signals: false, allow_ad_personalization_signals: false });
172
+ // page_title is PINNED to the title as it is at load, before anything can touch it. Only one
173
+ // persona mutates document.title today — time shows a live clock in the tab — and without this
174
+ // its analytics reports "13:32 · Amsterdam" as the page name instead of the page. For every
175
+ // other persona it captures the same string the title already has, so it costs nothing and
176
+ // removes a trap the next persona that animates its tab would otherwise walk into.
177
+ //
178
+ // Found by migration: it existed only in time, and the extraction dropped it silently. Nothing
179
+ // errored — the analytics would simply have been wrong from that day on.
180
+ gtag("config", gaId, { cookie_expires: 60 * 60 * 24 * 60, page_title: document.title, /* two months — matches the GA data retention; the cookie must not outlive the data it labels (foundations/15) */ allow_google_signals: false, allow_ad_personalization_signals: false });
173
181
  addEventListener("load", function () {
174
182
  (window.requestIdleCallback || function (f) { setTimeout(f, 1200); })(function () {
175
183
  var s = document.createElement("script");