Skip to Content
ReferenceSystem Variables

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.

VariableTypeDescription
page.currentnumberOne-based count of pages visited in this session.
page.currentIndexnumberZero-based count of pages visited.
page.currentIdstringInternal ID of the current page.
page.totalnumberExpected total pages in the funnel path.
page.progressPercentagenumberProgress as a percentage (0-100).
page.timeOnCurrentnumberSeconds spent on the current page. Updates every second. Resets on navigation.
page.startedAtnumberTimestamp (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.*)

VariableTypeDescription
session.startedAtnumberTimestamp (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.

VariableTypeDescription
device.typestring"mobile", "tablet", or "desktop".
device.isMobilebooleantrue if the device is a mobile phone.
device.isTabletbooleantrue if the device is a tablet.
device.screenWidthnumberPhysical screen width in pixels.
device.screenHeightnumberPhysical screen height in pixels.
device.viewportWidthnumberBrowser viewport width in pixels.
device.viewportHeightnumberBrowser viewport height in pixels.
device.pixelRationumberDevice pixel ratio (e.g., 2 for Retina displays).

Browser Variables (browser.*)

VariableTypeDescription
browser.namestringBrowser name: Chrome, Safari, Firefox, Edge, or Unknown.
browser.versionstringBrowser version string.
browser.languagestringBrowser’s primary language (e.g., en, de, fr).
browser.onlinebooleanWhether the browser has network connectivity.

OS Variables (os.*)

VariableTypeDescription
os.namestringWindows, macOS, Linux, Android, iOS, or Unknown.
os.timezonestringIANA 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.

VariableTypeDescription
user.emailstringVisitor’s email address. Set via Input element or SDK.
user.namestringVisitor’s name. Set via Input element or SDK.
user.dateOfBirthstringDate of birth (stored as YYYY-MM-DD).
user.stripeCustomerIdstringStripe Customer ID. Set automatically after payment.
user.paddleCustomerIdstringPaddle 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).

VariableTypeDescription
purchase.statusstringStatus of the last purchase attempt.
purchase.successbooleantrue if the last purchase completed successfully.
purchase.cancelledbooleantrue if the last purchase was cancelled.
purchase.amountnumberAmount charged in the smallest currency unit (e.g., cents).
purchase.currencystringCurrency code (e.g., USD).
purchase.modestringpayment (one-time) or subscription.

Payment Variables (payment.*)

Track the state of an active payment operation (while the payment form is being submitted).

VariableTypeDescription
payment.loadingbooleantrue while a payment operation is in progress.
payment.errorstringError message from the last payment attempt. Empty on success.

Product Selection Variables (products.*)

VariableTypeDescription
products.selectedProductIdstringThe 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.

Last updated on