A laptop on a desk showing HTML for embedding a waitlist form on any website

article

Waitlist Widget for Any Website (2 Lines of Code)

Two lines of HTML add a waitlist widget to any website — inline, popup, DIY form, or no JavaScript at all. Plus fixes for blocked scripts and CSP.

AAymane E.October 4, 20266 min readUpdated November 29, 2026
Share

Almost any website can host a GetWaitly waitlist, because the HTML waitlist embed is just two lines: a script tag and a container div. If your site lets you add custom HTML anywhere, you can add a waitlist to any website — no plugin, no framework, no SDK.

Here is the generic HTML embed, plus the popup and no-JavaScript variants and how to troubleshoot it.

The short answer

Paste <script src="https://getwaitly.com/widget.js" defer></script> once near the end of your page, and place <div class="gw-widget" data-waitlist-id="YOUR_WAITLIST_ID"></div> where you want the form. The widget renders inline and matches your waitlist's branding. Total time: 2 minutes.

What you need

  • A GetWaitly account with a waitlist created (free plan covers 100 subscribers).
  • Your waitlist's public ID or slug — both are in the Widget/Embed section of the dashboard.
  • A website where you can add custom HTML — your own HTML, or any builder with an "Embed" or "Custom Code" feature.

The waitlist widget in two lines

Script tag (loads the widget; place it once per page):

<script src="https://getwaitly.com/widget.js" defer></script>

Container div (where the form appears):

<div class="gw-widget" data-waitlist-id="YOUR_WAITLIST_ID"></div>

Either the public ID or the URL slug works — the widget resolves both, and the example in your dashboard usually shows the slug.

Where to put them

  • Put the script just before the closing </body> tag, or anywhere on the page. The defer attribute makes it load after your content, so it does not block rendering.
  • Put the div exactly where you want the form. To control width and alignment, wrap it in a container:
<div style="max-width: 480px; margin: 0 auto;">
  <div class="gw-widget" data-waitlist-id="YOUR_WAITLIST_ID"></div>
</div>
<script src="https://getwaitly.com/widget.js" defer></script>

If you want the form on several pages, load the script once in your site's global footer or a shared template, and place only the div on each page.

Platform guides

The widget works the same everywhere, but each platform has its own place to paste it. These are the most common — the full directory covers all 30, from Durable and Dorik to Kajabi, Teachable, and Airtable.

Website builders

Ecommerce

No-code & app builders

Link-in-bio

Blog & publishing

Developers

The popup variant

For a button that opens the form in a modal, use a trigger element instead of the div:

<button class="gw-trigger" data-waitlist-id="YOUR_WAITLIST_ID">Join waitlist</button>
<script src="https://getwaitly.com/widget.js" defer></script>

This is useful for a header CTA, a floating button, or a "Join" link anywhere on the page.

All four are chosen in the dashboard rather than in code: the waitlist editor's Display control switches between Full (title, subtitle, logo, every field), Mini (email only, sized for a footer or sidebar), Docked (email field with the button inside it), and Popup (a trigger that opens a modal). The widget reads the variant from your saved settings, so the plain two-line snippet follows whatever you picked; the dashboard's snippet also pins it with data-widget-type="mini" (or docked), which is how one waitlist can be embedded two different ways on two different pages. Popup is the exception — it needs the gw-trigger button instead of a container div.

Two waitlists on the same page

Yes — the script initialises every .gw-widget element it finds, each from its own data-waitlist-id, so one script tag can serve two different waitlists on one page (two products, a header form and a footer form, an English page and a localised one).

<div class="gw-widget" data-waitlist-id="PRODUCT_ONE_ID"></div>
<div class="gw-widget" data-waitlist-id="PRODUCT_TWO_ID"></div>
<script src="https://getwaitly.com/widget.js" defer></script>

Each container renders its own waitlist's branding, fields, and display variant, and each is initialised once — the script marks containers as it goes, so a widget cannot be double-mounted.

The one thing not to do is include the script twice. Two containers is fine; two script tags is the bug in the troubleshooting section below, where the same form appears twice.

Full control: your own form

If you want to style the form yourself, write custom HTML and let GetWaitly handle submission with the DIY script (widget-diy.js):

<form class="gw-form" data-waitlist-id="YOUR_WAITLIST_ID">
  <input name="email" type="email" required placeholder="Your email" />
  <input name="name" type="text" placeholder="Full name (optional)" />
  <button type="submit">Join waitlist</button>
</form>
<script src="https://getwaitly.com/widget-diy.js" defer></script>

This submits without a page reload and shows an inline success message, while you keep full CSS control. The script also matches form.gw-form-popup if you want the same behaviour behind a modal trigger.

No JavaScript at all

If scripts are blocked or you simply do not want one, post a plain HTML form to your waitlist's join endpoint:

<form action="https://getwaitly.com/api/join/YOUR_WAITLIST_ID" method="post">
  <input type="email" name="email" required placeholder="Your email" />
  <button type="submit">Join the waitlist</button>
</form>

The browser posts the signup and redirects to your thank-you page. You lose the inline success animation, but the subscriber still lands in your dashboard. The action URL accepts either the public ID or the waitlist slug, so whichever you already have to hand will work.

Testing

Open the page, submit a test email, and confirm you see the success message and the subscriber appears in GetWaitly. Then check mobile — the widget is responsive out of the box.

Troubleshooting

Nothing renders. Check the browser console for a blocked script. Ad blockers, strict Content Security Policy (CSP), or a security plugin can block third-party scripts. If your site has a CSP, the widget needs more than the script allowlisted: https://getwaitly.com in script-src and connect-src (it fetches your config and posts the signup over XHR), 'unsafe-inline' in style-src (it injects its CSS as a <style> element), and https://fonts.googleapis.com in style-src plus https://fonts.gstatic.com in font-src (it loads your theme font from Google Fonts). Allowlisting only the script gives you a form that renders unstyled or without its font.

The box is empty. Usually a wrong data-waitlist-id. The value has to match the waitlist's public ID or slug exactly — either is fine, but a typo, or the old value of a renamed waitlist, renders nothing.

It works locally but not in production (or vice versa). Confirm the script tag is on the published page, not just your template or a preview.

Two forms appear. You loaded the script twice (for example, in a global footer and again in the page). Load it once.

FAQ

What kind of website can use the GetWaitly embed?

Any site that lets you add a <script> tag and an HTML element. That includes hand-coded HTML, WordPress, Webflow, Squarespace, Shopify, Framer, Carrd, and most page builders. Platform-specific guides are linked below.

Do I need to know how to code?

No. Copy two lines and paste them. If you can paste into an "Embed" or "Custom HTML" box, you can add a waitlist.

Will the widget slow down my site?

No. The script is about 22KB gzipped and loaded with defer, so it downloads in parallel and never blocks the first paint. The form it renders is plain HTML inputs — no framework.

Can I style the form to match my site?

The standard widget uses your GetWaitly accent color and font. For full styling control, use the DIY form (widget-diy.js) and style the inputs yourself, or the no-JavaScript form action.

Does it work if my site blocks external scripts?

Not the widget. Use the no-JavaScript form action above, which posts directly to your waitlist, or link to GetWaitly's hosted page at getwaitly.com/w/your-id.

Where do I find my waitlist ID?

Open the waitlist and go to the Widget/Embed section. The value in the snippet's data-waitlist-id is usually the slug — copy it as it is. The public ID works equally well; the widget and the join endpoint both resolve either.

Related guides

The simple, affordable waitlist tool for founders and makers. Start free in 5 minutes — no credit card required. Try GetWaitly free →

Aymane E.

written by

Aymane E.

Founder of GetWaitly. I write about validating ideas, pre-launch, and growth from building a waitlist tool as a solo founder.

Follow on X

Build your waitlist in 5 minutes

GetWaitly handles signups, referrals, broadcast emails, and analytics — free to start.

A published GetWaitly hosted waitlist page with a Launching soon badge, signup form, and early-access benefits