Integrations
MagiCRM
When magicrmSiteId is set in site.config.json, MagiCrmAnalytics.astro injects api.magicrm.cloud/js/m.js. Public intake (newsletter, contact, custom forms) posts to MagiCRM public endpoints under api.magicrm.cloud.
The site-wide id is the default for forms; a form can override it. Optional tags on a submission are used for segmentation in MagiCRM. For local tests, use a sandbox siteId from MagiCRM rather than a production workspace.
Cloudflare Turnstile
turnstileSiteKey in site.config.json enables Cloudflare Turnstile on public forms. The widget token is sent with the submission; MagiCRM validates it server-side.
Cookie banner
src/content/globals/cookie.json controls the banner:
showCookieBanner— toggle.consentVersion— bump to force re-consent.text— richtext, supports inline markup.categories[]— list of{ id, name, description, required }. Required categories are always on.acceptAllLabel,acceptSelectedLabel,declineAllLabel— button labels.
CookieBanner.astro renders the banner via Alpine. ConsentScript.astro conditionally loads tracking scripts only when consent is granted.