Inertia Start

v2.2.0

v2.2.0

This release makes contexts work without cookie consent by default. Guests are no longer fingerprinted or remembered on their device unless you turn on the new fingerprint mode, which waits for their consent through a consent banner.

Added

  • Added two context modes, chosen with I_S_CONTEXT_FINGERPRINTING (config('inertia-start.context_fingerprinting'), default false). Contexts stay always on in both.
  • Minimal mode, the new default, needs no cookie consent. Guests get no ThumbmarkJS fingerprint, no X-Guest header, no context cookie and no localStorage flag, and have no context row. Their first touch (landing URL, external referrer, UTM parameters and first visit date) is kept in the server-side session from their first request, following the same first-touch rules as before. Their context is created with their account, from that first touch.
  • Starting an email sign-up copies the first touch onto the registration, in new nullable registrations columns. A confirmation link opened in another browser, such as a mail app's, keeps the true first touch.
  • Fingerprint mode (I_S_CONTEXT_FINGERPRINTING=true) keeps the guest tracking of previous versions, but only after the guest accepts a new consent banner, the CookieConsent component. Rejecting is exactly as easy as accepting, nothing is pre-selected, and the text links to the privacy policy. The choice is stored for 24 months in a context_consent cookie, which is strictly necessary. A "Cookie settings" link in the footer, and in the mobile "Legal" drawer, reopens the banner. Before or without consent, guests are handled exactly as in minimal mode. After consent, the guest context is created from the first touch kept in the session. Withdrawing consent stops the tracking and forgets the guest cookie and flag. Signed-in users never see the banner.
  • Added the contextFingerprinting and contextConsent shared Inertia props, the context-consent.update route and the context-fingerprinting feature.

Changed

  • POST /api/context now only creates guest contexts in fingerprint mode, and the calling site must collect the visitor's consent itself. It still returns the context of signed-in users in both modes. The application's own frontend no longer calls it.
  • The Umami script now loads whenever analytics is enabled and configured, whatever the context mode, since Umami is cookieless. It previously loaded only for visitors with a context. umami.identify('context:<id>') is still called only for visitors with a context: signed-in users, and consenting guests in fingerprint mode. It now also runs when a context appears without a full page load, such as after signing in.
  • Accounts created by a guest checkout now record purchase as their context's registered_via.
  • Updated the reusable AI guidance on analytics and contexts to describe both modes and the consent banner.

Dependencies

  • Updated minor and patch Composer and npm dependencies.

Upgrade Guide

  1. Run composer install and npm ci to install the locked dependency versions.
  2. Run php artisan migrate to add the first-touch columns to the registrations table.
  3. Decide on a context mode. Without any change, your application switches to minimal mode: guests no longer get a context before they create an account, and existing context cookies are forgotten on their next visit. Existing guest contexts stay in the database and in the admin users list. To keep tracking guests before sign-up, set I_S_CONTEXT_FINGERPRINTING=true, and guests will be tracked once they accept the consent banner.
  4. If you customized the top-level layouts or the welcome page, keep <CookieConsent /> next to useContext() when merging. If you replaced Footer.vue, add a "Cookie settings" link that calls useCookieConsent().openSettings(), at least in fingerprint mode.
  5. If you added locales, translate the new messages.cookie_consent keys. Review the banner text against your privacy policy, and describe the mode you use in the policy.
  6. If other sites call POST /api/context, turn on fingerprint mode and make sure they collect consent before fingerprinting visitors.
  7. The contextId shared prop is now typed number | null. Update any frontend code that assumed it is always set.