feat: persist script feature toggles to backend
Features (scroll, 404, outbound, downloads, frustration, storage, ttl) are saved to site.script_features JSONB column on every toggle change. Values are read from the site object on load.
This commit is contained in:
@@ -809,9 +809,15 @@ export default function SiteSettingsPage() {
|
||||
Add this script to your website to start tracking visitors. Choose your framework for setup instructions.
|
||||
</p>
|
||||
<ScriptSetupBlock
|
||||
site={{ domain: site.domain, name: site.name }}
|
||||
site={{ domain: site.domain, name: site.name, script_features: site.script_features }}
|
||||
showFrameworkPicker
|
||||
className="mb-4"
|
||||
onFeaturesChange={async (features) => {
|
||||
try {
|
||||
await updateSite(siteId, { name: site.name, script_features: features })
|
||||
mutateSite()
|
||||
} catch { /* silent — not critical */ }
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="flex items-center gap-4 mt-4">
|
||||
|
||||
Reference in New Issue
Block a user