Snippet Generator
Configure your personalization settings and get a ready-to-paste <script> tag.
Your published Google Sheet CSV URL or any public CSV file.
URL parameter name (e.g., ?seg=acme)
CSV column that holds segment names
Row to use when segment isn't found or URL param is missing
Map CSS selectors to CSV columns. Column names ending in _href set the href attribute; _html set innerHTML; otherwise textContent.
→
→
→
→
Generated Embed Code
<script src="https://YOUR-DEPLOY/snippetforge.js"
data-csv-url="https://YOUR-SHEET-CSV-URL"
data-seg-param="seg"
data-key-column="segment"
data-fallback="default"
data-mapping='[{"selector":"#hero-title","column":"title"},{"selector":"#hero-subtitle","column":"subtitle"},{"selector":"#hero-cta","column":"cta_text"},{"selector":"#hero-cta","column":"cta_href"}]'>
</script>Live Preview
Enter a CSV URL and click Preview to see how your mappings resolve.
Quick tips:
- Column names ending in
_hrefset the element's href attribute - Column names ending in
_htmlset innerHTML (trusted content only) - Everything else sets textContent (safe from XSS)
- The snippet makes one GET request to your CSV — zero cookies, zero storage