System Variable Reference
System variables are read-only values automatically computed by AppFunnel at runtime. They provide information about the current page, device, browser, operating system, session, purchase state, and payment state.
System variables are available in Liquid templates, conditions, and dynamic properties using the same {{ namespace.property }} syntax as all other variables.
System variables are not persisted across sessions. They are recomputed each time the funnel loads. User-created variables (answers.*, data.*, query.*) are the only variables that persist.
Page Variables (page.*)
Track the visitor’s position and time within the funnel.
| Variable | Type | Description |
|---|---|---|
page.current | number | One-based count of pages visited in this session. |
page.currentIndex | number | Zero-based count of pages visited. |
page.currentId | string | Internal ID of the current page. |
page.total | number | Expected total pages in the funnel path. |
page.progressPercentage | number | Progress as a percentage (0-100). |
page.timeOnCurrent | number | Seconds spent on the current page. Updates every second. Resets on navigation. |
page.startedAt | number | Timestamp (ms) when the current page was loaded. |
Common Patterns
Progress bar via Custom CSS:
width: {{ page.progressPercentage }}%;Countdown timer (10-minute limit):
{{ 600 | minus: page.timeOnCurrent | divided_by: 60 | floor }}:{{ 600 | minus: page.timeOnCurrent | modulo: 60 | round }}Session Variables (session.*)
| Variable | Type | Description |
|---|---|---|
session.startedAt | number | Timestamp (ms) when the session was created. |
Device Variables (device.*)
Information about the visitor’s device. Detected once from the user agent string and screen properties.
| Variable | Type | Description |
|---|---|---|
device.type | string | "mobile", "tablet", or "desktop". |
device.isMobile | boolean | true if the device is a mobile phone. |
device.isTablet | boolean | true if the device is a tablet. |
device.screenWidth | number | Physical screen width in pixels. |
device.screenHeight | number | Physical screen height in pixels. |
device.viewportWidth | number | Browser viewport width in pixels. |
device.viewportHeight | number | Browser viewport height in pixels. |
device.pixelRatio | number | Device pixel ratio (e.g., 2 for Retina displays). |
Browser Variables (browser.*)
| Variable | Type | Description |
|---|---|---|
browser.name | string | Browser name: Chrome, Safari, Firefox, Edge, or Unknown. |
browser.version | string | Browser version string. |
browser.language | string | Browser’s primary language (e.g., en, de, fr). |
browser.online | boolean | Whether the browser has network connectivity. |
OS Variables (os.*)
| Variable | Type | Description |
|---|---|---|
os.name | string | Windows, macOS, Linux, Android, iOS, or Unknown. |
os.timezone | string | IANA timezone (e.g., America/New_York). |
User Variables (user.*)
User variables are pre-created for every funnel. Unlike other system variables, these are writable — they are set when the visitor provides their information.
| Variable | Type | Description |
|---|---|---|
user.email | string | Visitor’s email address. Set via Input element or SDK. |
user.name | string | Visitor’s name. Set via Input element or SDK. |
user.dateOfBirth | string | Date of birth (stored as YYYY-MM-DD). |
user.stripeCustomerId | string | Stripe Customer ID. Set automatically after payment. |
user.paddleCustomerId | string | Paddle Customer ID. Set automatically after payment. |
User variables are persisted across sessions. Once a visitor provides their email, it is remembered if they return.
Purchase Variables (purchase.*)
Updated after a payment action completes (Submit Payment Element, Purchase).
| Variable | Type | Description |
|---|---|---|
purchase.status | string | Status of the last purchase attempt. |
purchase.success | boolean | true if the last purchase completed successfully. |
purchase.cancelled | boolean | true if the last purchase was cancelled. |
purchase.amount | number | Amount charged in the smallest currency unit (e.g., cents). |
purchase.currency | string | Currency code (e.g., USD). |
purchase.mode | string | payment (one-time) or subscription. |
Payment Variables (payment.*)
Track the state of an active payment operation (while the payment form is being submitted).
| Variable | Type | Description |
|---|---|---|
payment.loading | boolean | true while a payment operation is in progress. |
payment.error | string | Error message from the last payment attempt. Empty on success. |
Product Selection Variables (products.*)
| Variable | Type | Description |
|---|---|---|
products.selectedProductId | string | The ID of the currently selected product. Changes when a Select Product action fires. |
For the full list of properties available on each product, see Product Variable Reference.