Skip to content

Forms and analytics reference

Markdown
  • The action marks a form the platform captures. A form with method="post" and action="/_ws/forms/NAME" sends its entries to the platform, where NAME is any lowercase name with hyphens. Nothing is set up first. Any other form, such as a search box a script handles, is left alone: it gets no spam field and sends nothing to the platform.
  • You choose the fields, including file uploads: all the files in one sent form may add up to 10 MB in total. Three names are reserved: email is the reply-to address, thanks is the page shown after sending, and names starting with _ws belong to the platform.
  • The platform checks the named required fields on the form it served, including required consent checkboxes. JavaScript can fill these values before sending. Add data-ws-may-disable to each required control that JavaScript may disable. The server skips its requirement because browsers omit disabled controls from the entry. Only use the mark for fields the visitor may leave out. If a new version goes live while a form is open, the visitor must reload before sending.
  • The platform saves each entry before the visitor sees “Thank you”. It emails it to the owner, or to the builder who made the site until the business buys it. If the email fails, it tries again for 24 hours. Every entry stays in the owner’s account, so a failed email loses nothing. If the entry cannot be saved, the visitor sees “Not sent. Please try again.” and their browser keeps what they typed.
  • On a preview, entries go only to the person who ran ws preview, with “[Preview]” in the subject.
  • ws site --form-email changes where entries go. On a bought site, the owner is emailed when entries go to anyone else, and Leads in their panel says where each new entry is emailed; every entry stays in Leads.
  • Every site counts its visits, with nothing to add. The platform counts each page view on its servers as the page is served, with no script and no cookie. Samples, previews and frames are not counted. The owner sees the counts under Visits in the owner panel.
  • Google Analytics 4 and PostHog are connected by the owner under Visits in the owner panel. The platform then puts a small loader on every public page and adds the tool’s domains to the Content Security Policy. A cookie question appears, and the tool’s script loads only if the visitor accepts: nothing is sent to Google or PostHog before that, and nothing after a decline.
  • Builders add no analytics or tracking tags to a site’s files. A tag in the files would count twice once the owner connects the tool, and would skip the visitor’s consent, which the platform asks for.