This is a minimal technical example for developers. It shows how to integrate with the /subscribe endpoint.
The form sends a POST request to /subscribe with:
{ "email": "user@example.com", "source": "/demo/" }
The source field tells the backend which landing page variant was used, so users are redirected to the correct willkommen.html after confirming their email.
fetch('/subscribe', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: emailValue,
source: window.location.pathname
})
})