Session
Read and write values in the visitor’s server-side session.For security, some session keys are reserved and cannot be read or written via
session.get() / session.set(). Use your own key names (e.g. my_key, visit_count) for custom data.Cookies
Set or delete cookies on the visitor’s browser.cookie.set(name, value, options?)
| Option | Type | Description |
|---|---|---|
maxAge | number | Cookie lifetime in seconds |
path | string | Cookie path (default: '/') |
cookie.delete(name)
Clears the cookie by name.
Some cookie names are reserved and cannot be set or deleted. Use your own cookie names for custom data.
Redirect
Redirect the visitor to a different URL. This stops page rendering — the visitor is immediately sent to the new URL.When
redirect() is called, the entire funnel flow and page rendering are skipped. The visitor receives only the redirect response.Template Variables
Inject values into the template engine. These become available as{{ var.key }} in page HTML.
setVariable take precedence over brand variables with the same key.
Response Headers
Set custom HTTP response headers.For security, certain response headers cannot be set (e.g. those that control cookies, CORS, or connection). Header values are sanitized.
Custom Response
Send a custom response instead of the rendered page. These stop page rendering.response.status(code)
Set the HTTP status code (used with response.send() or response.json(), or with the normal page render).
response.json(data)
Send a JSON response. Skips page rendering.
response.send(html)
Send raw HTML. Skips page rendering.
Logging and errors
console.log, console.info, console.warn, and console.error are captured and stored in execution logs. Use them for debugging.