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'), defaultfalse). Contexts stay always on in both. - Minimal mode, the new default, needs no cookie consent. Guests get no ThumbmarkJS fingerprint, no
X-Guestheader, nocontextcookie and nolocalStorageflag, 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
registrationscolumns. 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, theCookieConsentcomponent. 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 acontext_consentcookie, 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
contextFingerprintingandcontextConsentshared Inertia props, thecontext-consent.updateroute and thecontext-fingerprintingfeature.
Changed
POST /api/contextnow 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
purchaseas their context'sregistered_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
- Run
composer installandnpm cito install the locked dependency versions. - Run
php artisan migrateto add the first-touch columns to theregistrationstable. - 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
contextcookies 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, setI_S_CONTEXT_FINGERPRINTING=true, and guests will be tracked once they accept the consent banner. - If you customized the top-level layouts or the welcome page, keep
<CookieConsent />next touseContext()when merging. If you replacedFooter.vue, add a "Cookie settings" link that callsuseCookieConsent().openSettings(), at least in fingerprint mode. - If you added locales, translate the new
messages.cookie_consentkeys. Review the banner text against your privacy policy, and describe the mode you use in the policy. - If other sites call
POST /api/context, turn on fingerprint mode and make sure they collect consent before fingerprinting visitors. - The
contextIdshared prop is now typednumber | null. Update any frontend code that assumed it is always set.