Newsletter Signup for AJAX (vanilla JS)
Email-only newsletter capture — perfect for footers and landing pages. Free for 500 submissions per month — no backend, no SDK, no plugin.
Why AJAX (vanilla JS) developers choose splitforms for newsletter signup
The newsletter signup on this page integrates with AJAX (vanilla JS)'s development workflow using the form markup in your AJAX (vanilla JS) project. Whether you're deploying to a static host or a server-rendered platform, the form posts standard <code>FormData</code> to splitforms, so your backend complexity stays at zero. AJAX (vanilla JS)'s ecosystem has strong tooling for UI, but form delivery is a separate concern that splitforms handles independently — Free includes spam filtering and a submissions dashboard; Starter adds email notifications and webhooks.
Yes — this is the shortest safe path for AJAX (vanilla JS).
Use the HTML snippet on this page, keep the newsletter signup fields visible in your AJAX (vanilla JS) UI, and let splitforms handle delivery, spam filtering, storage, and webhooks.
Paste the HTML version, then replace YOUR_ACCESS_KEY.
The posted payload contains your email. Required fields are your email.
Vanilla JS / AJAX forms have been the no-framework default since jQuery's heyday.
Email lists still convert 5-10x social. The newsletter signup form is the single most leveraged piece of your site — pop it up smartly, not annoyingly, and it pays compound interest.
Built for AJAX (vanilla JS) developers who hate operating a backend.
Splitforms is the form backend for AJAX (vanilla JS) sites. One POST endpoint, no SDK, no plugin — drop the newsletter signup into a page and ship.
Splitforms is the form backend for AJAX (vanilla JS) sites. One POST endpoint, spam filtering, and a real dashboard — drop-in, no server, no PHP. Free for 500 dashboard submissions per month; Starter adds email, signed webhooks, exports, and retained uploads; Pro is $5/mo for 5,000.
- ✓500 form submissions per month
- ✓2 forms on Free; unlimited forms on Pro
- ✓Spam protection (honeypot + classifier)
- ✓Webhooks: Slack, Discord, WhatsApp, custom
- ✓CSV export of all submissions
- ✓Email notifications (CC and BCC on Pro)
Drop into any AJAX (vanilla JS) project.
Replace YOUR_ACCESS_KEY with your splitforms key, paste into a AJAX (vanilla JS) page, and ship. No build-time integration required.
Generate, embed, receive.
Three actions stand between you and your first newsletter signup submission. None of them require a backend, a database, or a CAPTCHA library.
Generate a free splitforms key
Sign in at splitforms.com — your access key is created instantly. No credit card, no setup wizard, no SDK to install.
Paste the newsletter signup into your AJAX (vanilla JS) project
Drop the form snippet into a AJAX (vanilla JS) page, component, or layout. Replace YOUR_ACCESS_KEY with the key from your dashboard. The form action is a hard-coded URL — no env vars or build-time wiring needed.
Receive submissions
Dashboard updates live on Free. Starter adds email delivery, signed webhooks, CSV export, Slack/Discord forwarding, and BCC to your team.
The reason this newsletter signup exists.
Webhooks into ConvertKit / Mailchimp / Substack / Beehiiv / Buttondown.
Newsletter conversion benchmarks haven't moved much: ConvertKit / Substack landing pages convert at 1-2% of visitors, popup forms at 2-4%, content-upgrade lead magnets at 8-15%. The form itself is trivially simple (email field, optional name) but where it lives matters — exit-intent popup, scroll-triggered slide-in, footer inline, content-end inline all behave differently. Push the submission to your ESP (Mailchimp / ConvertKit / Substack / Beehiiv / Buttondown) via webhook so the welcome email fires automatically. GDPR / CASL require explicit consent — a checkbox or unbundled-consent text under the form covers it for EU and Canadian visitors.
Pick the form placement
Popup (highest volume, also highest annoyance — set scroll or exit-intent triggers), inline footer (low volume, low friction), content-end inline (best conversion-quality combo).
Push to your ESP
Webhook the email to ConvertKit / Mailchimp / Substack / Beehiiv / Buttondown. Each has either a native webhook receiver or a Zapier connector. Welcome email fires automatically on add.
Add GDPR / CASL consent
EU visitors need explicit consent — add a 'I want to receive emails from [your brand]' checkbox or unbundled-consent text under the email field. Required text varies by jurisdiction; consult your privacy lawyer if in doubt.
What changes when this newsletter signup lives in AJAX (vanilla JS).
These notes come from the AJAX (vanilla JS) platform registry and are rendered on this template page so crawlers see the framework-specific answer without opening a separate guide.
Vanilla JS / AJAX forms have been the no-framework default since jQuery's heyday. Without splitforms, the 'AJAX' part is one fetch line; the operational part is everything else: a backend route, an SMTP provider, a database for submissions, a honeypot or reCAPTCHA, a thank-you page, error handling for HTTP 4xx/5xx, retry logic. For 'JS-only on a static host' setups (Cloudflare Pages, GitHub Pages, S3), there's literally no server to run the route on — historically that meant Formspree, Formspark, Web3Forms, Basin. Splitforms is the modern entry: same shape, better free tier, better spam filtering, and signed webhooks from Starter.
Vanilla JS deploys to any static host — the snippet is HTML + inline <script>, no build step. CSP: if your site sets connect-src 'self', add https://splitforms.com to the directive or fetch is blocked. Browser support: native fetch is in every browser back to Edge 18 — the snippet runs without polyfills on every market-share-relevant browser. The progressive-enhancement variant (Pattern B) keeps the form working when JS fails to load — useful on flaky networks, ad-blocked clients, or for accessibility tools that disable JS.
Forgetting e.preventDefault() reloads the page
Without preventDefault, the browser does its own form submission to wherever the form's action attribute points (or the current page) AND your fetch runs. You see a flash, the page reloads, and your handler's effects are lost.
FormData includes ALL form fields — even disabled ones get dropped
new FormData(form) skips inputs without a name attribute, skips disabled inputs, skips unchecked checkboxes/radios. If a field doesn't show up in your splitforms inbox, check whether it's disabled at submit time.
fetch() doesn't reject on HTTP 4xx/5xx — only network errors
If splitforms returns a 401 (bad key) or 429 (rate limit), fetch resolves successfully. You have to check res.ok or data.success yourself. Wrapping in try/catch only catches network failures, not HTTP errors.
Double-click submit fires two requests
Without disabling the button on the first click, a quick double-click sends two POSTs. Both succeed; the user sees one success message; you see two submissions. Always set button.disabled = true at the start of the handler.
Pattern A — fetch + FormData + status element
Single submit listener. new FormData(form) reads inputs, append the access key, POST. Update an aria-live status <p> with the result. ~25 lines, no library. Use the same wiring for the newsletter signup fields on this page.
Pattern B — progressive enhancement (works without JS)
Form has a real action attribute and a redirect hidden field — works with JS disabled (browser POSTs natively, splitforms 302s). When JS is available, the listener intercepts for inline UX. Best of both worlds, no compromise. Use the same wiring for the newsletter signup fields on this page.
What every field actually does.
Each field below ships in the newsletter signup template — rename, remove, or add your own. Splitforms accepts any name you POST.
Your email
Reply-to address — splitforms wires this so hitting reply goes back to the sender.
One backend. Every framework.
The same newsletter signup template works on every framework splitforms supports. Pick yours.
Newsletter Signup on AJAX (vanilla JS) — FAQ.
Direct answers, no marketing fluff. Missing one? Email hello@splitforms.com.
splitforms vs everything else.
Same drop-in API. More free submissions, Starter signed webhooks, MCP support no other backend has.
Other ready-to-ship AJAX (vanilla JS) forms.
Same backend, different qualifying fields. Click through to copy the snippet.
Ship a newsletter signup on AJAX (vanilla JS) in 60 seconds.
500 submissions per month, free forever. No credit card. Copy the snippet above and paste it into your AJAX (vanilla JS) project.