// Lightweight GA4 wrapper (safe when gtag not loaded yet). window.soTrack = (name, params) => { try { if (typeof window.gtag === 'function') { window.gtag('event', name, params || {}); } } catch (e) { // no-op } }; window.soTrackPageView = (page) => { window.soTrack('page_view', { page_title: document.title, page_location: window.location.href, page_path: page || window.location.pathname + window.location.hash }); };