Article

How to Add a Waitlist to Any Website (2 Lines of Code)

Add a waitlist to any website with two lines of HTML — the inline widget, popup, DIY form, and no-JavaScript options, plus fixes for blocked scripts.

AAymane E.October 4, 20266 min read
Share
A laptop on a desk showing HTML for embedding a waitlist form on any website

Almost any website can host a GetWaitly waitlist, because the embed is just two lines of HTML: a script tag and a container div. If your site lets you add custom HTML anywhere, you can add a waitlist to it — 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 from 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 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>

Use the waitlist's public ID, not its URL slug. Both come from the Embed section of your dashboard.

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. Step-by-step guides:

Website builders

Ecommerce

No-code & app builders

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.

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.

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.

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, add https://getwaitly.com to script-src and connect-src.

The box is empty. Usually a wrong data-waitlist-id. It must be the public ID, not the slug.

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 small and loaded with defer, so it does not block rendering.

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?

In your GetWaitly dashboard, open the waitlist and go to the Widget/Embed section. Copy the public ID shown in the data-waitlist-id example.

Related guides

The simple, affordable waitlist for indie hackers. 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.