Astro
A static Astro site collects signups with the SDK, with no backend needed. Gate and activation run wherever your app’s sign-up lives.
src/components/Waitlist.astro
<form data-waitlistly>
<input name="email" type="email" required placeholder="you@company.com" />
<button type="submit">Join the waitlist</button>
<p class="result"></p>
</form>
<script is:inline src="https://waitlistly.live/w.js" data-key="pk_your_public_key" async></script>
<script>
document.addEventListener('waitlistly:joined', (e) => {
const c = (e as CustomEvent).detail;
document.querySelector('.result')!.textContent = `You're #${c.position}. Share ${c.referral_link}`;
});
</script>The SDK submits any <form data-waitlistly> with an email input, remembers ?ref= and UTM tags for 30 days, and fires waitlistly:joined or waitlistly:error.
Last updated on