// Cookie / tracker consent — our own, in this repo, no vendor CMP. // // The rule the previous version broke is LSSI art. 22.2 (and GDPR art. 6): a // tracker may not run before the visitor has agreed to it. OpenPanel's op1.js // used to be injected from the static on every page load, so by the time // anyone could have been asked, the request had already gone out. // // So the loading of every non-essential script now goes through here: // index.html only *publishes* window.__osAnalyticsInit; nothing calls it until // `analytics` is granted. Withdrawing consent is as easy as giving it (the // banner's two buttons are the same size and weight, and the footer link // reopens it), and because a script cannot be unloaded, revoking analytics // reloads the page so the tracker is genuinely gone. // // Categories: // necessary — always on, never asked about: the session JWT, the media // token, the UI preferences. All first-party, all localStorage. // analytics — OpenPanel (self-hosted script + TONVI's own instance). // marketing — nothing uses it today. It exists so that adding a pixel is a // decision someone has to make here, in the open, rather than a //