AI-personalized text zones for any website. One script tag, HTML attributes, no build step. Powered by Personize.
Early Access — This project is under active development. The SDK API and zone behavior may change between releases. Want to collaborate closely? Let us know · Become a sponsor
<script src="https://gs.personize.ai/gs.js" data-key="pk_live_YOUR_KEY" async></script>Get your site key from the Personize dashboard → Generative Sites → Create Site.
<h1 data-gs-zone="hero.headline">Welcome to our platform</h1>
<p data-gs-zone="hero.subtitle">We help teams ship faster.</p>
<span data-gs-zone="hero.cta">Get Started</span>Open DevTools → Console → type GS.debug(). You should see your zones, visitor tier, and connection status.
That's it. Anonymous visitors see location-personalized text immediately.
| Type | Syntax | Source | Speed |
|---|---|---|---|
| Property | website_zones:hero_headline |
Personize memory lookup | Instant |
| Structured | hero.headline + hero.subtitle |
AI-generated as a coherent group | 2-5s |
| Flat | headline |
AI-generated independently | 2-5s |
Mix all three on the same page. Property zones cost zero. All generative zones are batched into one AI call.
| Example | Scenario |
|---|---|
| basic.html | Anonymous visitor — structured zones + custom prompt, location personalization |
| abm-landing-page.html | ABM outbound — property zones + /for/:slug identification |
| saas-dashboard.html | Logged-in app — window.__GS_USER__ auth session |
| lead-capture.html | Lead form — GS.identify() + memorize + mid-session re-render |
| multi-key-identify.html | Multi-key identification — email + website + phone + CRM IDs |
Each example is a single HTML file. Replace pk_test_YOUR_KEY with your key and open in a browser.
GS.identify(email, { firstName, company }) // Legacy: single email
GS.identify({ email, website, phone }, traits) // Multi-key: any match keys
GS.track(event, properties) // Track event (batched every 5s)
GS.memorize('collection:property', value) // Write to Personize memory
GS.consent({ analytics, marketing }) // Set consent (overrides OneTrust/CookieBot/Osano)
GS.refresh() // Re-render all zones
GS.refresh('zone-id') // Re-render one zone
GS.on('zone:render', fn) // Callback when a zone renders
GS.on('meta', fn) // Callback with visitor tier + location
GS.debug() // Returns config, visitor, zones, consent state| Method | How | Priority |
|---|---|---|
| Auth session | window.__GS_USER__ = { email, firstName } |
Highest |
| Preview | ?gs_preview=email (test keys only) |
High |
| Collection lookup | data-gs-identify="collection:property" + URL param |
Medium |
| Deanonymization | RB2B / Clearbit (server-side config) | Low |
| Location | Automatic from edge headers | Fallback |
Create the Personize schema, governance rules, and seed sample contacts:
npm install
cp .env.example .env # add your PERSONIZE_SECRET_KEY
npm run setup # create website_zones collection + governance
npm run seed # import 4 sample contactsSee SETUP-GUIDE.md for the full walkthrough.
| Doc | What It Covers |
|---|---|
| Zone Reference | Every attribute, method, URL parameter, and pattern |
| CMS Guides | WordPress, Webflow, Shopify, Squarespace, Next.js |
| Security | Attack surface, key model, XSS prevention |
| Deployment Architecture | Who hosts what — CDN, gs-edge, Personize cloud |
| Integrations | Pipelines, AI agents, Zapier, CRM sync |
| SKILL.md | AI agent reference — for Claude, GPT, Cursor |
Works behind any cache, CDN, or CMS — like adding Google Analytics or HubSpot.
WordPress, Webflow, Shopify, Squarespace, Next.js, plain HTML. See CMS Guides.
This project is supported by companies who believe website personalization should be open. Become a sponsor.
Your logo here — sponsor this project
We welcome contributions! See CONTRIBUTING.md for the full guide and ROADMAP.md for claimable features.
MIT