# Sitebase — integration reference for agents Sitebase hosts website features (forms, email capture, testimonials, analytics, uptime, consent…) behind embeddable snippets. The site's repo never contains backend code for these features: no database tables, no email sending, no spam filtering to write or maintain. ## Prerequisites - The user needs a Sitebase account at https://sitebase.dev. Sitebase is currently in private beta: access is waitlist-gated (join at https://sitebase.dev/#waitlist) and there is no anonymous/free tier. - Every website registered in Sitebase gets a public site key (`sb_…`); every feature created on it gets its own public widget key (`sb_…`). - Keys are public identifiers, safe to commit. They identify, they don't authenticate. ## 1. Site analytics tracker (once per site) Add to the shared layout so it loads on every page: - Cookieless: no consent banner required for the tracker itself. - SPA-aware: tracks client-side route changes automatically. - Powers pageviews, visitors, sources, countries, devices, custom events, and funnels in the dashboard. ## 2. Feature embeds (one per feature placement) Place where the feature should render: Optional variant attribute where the feature supports variants: Variants by feature type: - testimonials: `wall` (default), `grid`, `carousel`, `marquee` — approved quotes; `form` — collect new testimonials. - newsletter_signup: default inline form; `popup` — overlay with exit-intent/scroll/time triggers and frequency capping. - Other feature types render their single default variant. The embed inherits the host page's fonts and colors (plus optional per-site theming configured in the dashboard, including dark mode). ## 3. Hosted embed page (script-less platforms) For platforms that strip script tags (Notion, Wix, Squarespace, Google Sites, Coda, Framer, Super.so…): https://sitebase.dev/embed/WIDGET_KEY https://sitebase.dev/embed/WIDGET_KEY?variant=VARIANT Paste as the platform's URL/iframe embed. Frameable by design; pageviews are attributed to the host page via the referrer. ## 4. Custom events API With the site tracker installed, track events from the page: window.sitebase?.track("event_name", { plan: "pro", value: 42 }); - Event names: lowercase, letters/numbers/underscores. - Properties: flat scalar values (string, number, boolean). Nested objects are dropped. - Declarative click tracking also works: `