Guide
Gate a page behind email capture
An email capture gate asks a visitor for their email address before Sentway serves the page. Sentway checks the gate on the server, so the page content is never sent to a browser that has not passed the gate. Hiding content in the browser is not gating, and Sentway does not do it.
Set the gate
Call set_gate_access with the site ID and the access mode. Use email_capture to ask for an address, and set verification on to require a magic link. Gate configuration lives outside the published snapshot, so changing a gate takes effect immediately without republishing the site.
What the visitor sees
Sentway serves a gate page carrying the account's branding, one email field, and the disclosure line naming the account that receives the details. An email gate never contains a password field and never resembles a third-party sign-in screen.
Read back who passed
Every visitor who passes the gate becomes a visitor record with the captured email attached. Call list_visitors to see who arrived, and get_visitor for one visitor's full timeline across every page of the site.
Other access modes
public serves the page to anyone. allowlist admits only addresses on a list the account supplies. password admits anyone holding a shared password. Choose allowlist when the audience is known in advance and email capture when the point is to find out who is interested.
Questions
- Can a visitor skip a Sentway email gate by reading the page source?
- No. Sentway enforces the gate on the server. A visitor who has not passed the gate receives the gate page and nothing else, so the protected page never reaches their browser in any form.
- What is the difference between email capture and verified email capture?
- Plain email capture accepts whatever address the visitor types. Verified email capture sends a magic link to that address and only grants access once the link is opened, which proves the visitor controls the mailbox.
- How long does access last after a visitor passes a gate?
- An entitlement is granted for 30 days by default. Access can be revoked at any time, and a revoked visitor can be granted access again later.