Variable Formats
ElasticFunnels supports two variable formats:- Percent Format:
%VARIABLE_NAME%- Used for simple replacements - Brace Format:
{variable_name}- Used for more complex data structures
Date Variables
Display current date and time information using these placeholders:%DAY_NAME%
Full name of the day of the week.
Example: “Monday”, “Tuesday”, “Wednesday”
%DAY%
Day of the month (1-31).
Example: 1, 15, 31
%DAY_POSTFIX%
Ordinal suffix for the day (st, nd, rd, th).
Example: “st”, “nd”, “rd”, “th”
%MONTH_NAME%
Full name of the month.
Example: “January”, “February”, “March”
%MONTH%
Month number (0-11, where 0 = January).
Example: 0, 5, 11
%YEAR%
Full 4-digit year.
Example: 2024, 2025
%HOUR%
Current hour in 24-hour format (0-23).
Example: 0, 14, 23
Complete Date Example
Customer Variables
Display customer information when a customer session exists.%CUSTOMER_FNAME%
Customer’s first name from session.
%CUSTOMER_FNAME%,
Customer’s first name with a trailing comma. The comma is removed if no first name is available.
{customer_name}
Customer’s full name. Works in both HTML and JavaScript.
{customer.*} Variables
Access detailed customer information using the {customer.*} format. These variables are populated from the customer’s most recent conversion/purchase.
Personal Information:
{customer.email}- Customer email address{customer.name}- Full name{customer.first_name}- First name{customer.last_name}- Last name{customer.phone}- Phone number{customer.country}- Country
{customer.address}- Street address{customer.city}- City{customer.state}- State/Province{customer.zip}- ZIP/Postal code
{customer.billing_address}- Billing street address{customer.billing_city}- Billing city{customer.billing_state}- Billing state{customer.billing_zip}- Billing ZIP code{customer.billing_country}- Billing country
{customer.shipping_address}- Shipping street address{customer.shipping_city}- Shipping city{customer.shipping_state}- Shipping state{customer.shipping_zip}- Shipping ZIP code{customer.shipping_country}- Shipping country
{customer.total_orders}- Total number of orders{customer.last_order_date}- Date of most recent order{customer.last_order_total}- Total amount of most recent order{customer.last_order_currency}- Currency of most recent order{customer.order_ids}- Comma-separated list of order IDs
{customer.email_hashed}- SHA-256 hashed email (for privacy/analytics)
Customer Variable Examples
- Customer variables require a valid customer session (email or
is_customerflag) - If no session exists, customer variables are removed from the page
- Variables are populated from the most recent conversion/purchase
- Empty values are replaced with empty strings
Brand & System Variables
Display brand information and system-level data that’s available on all pages.brand_name
Your brand/company name.
Formats: [brand_name], %brand_name%, {brand_name}
domain
Current domain name.
Formats: {domain}, %domain%
click_id
Click tracking ID for the current session.
Formats: {click_id}, [click_id]
IP & Location Variables
Access visitor IP address and location information (when available).{ip_whois.ip}
Visitor’s IP address.
{ip_whois.country}
Visitor’s country based on IP geolocation.
{ip_whois.city}
Visitor’s city based on IP geolocation.
{ip_whois.region}
Visitor’s region/state based on IP geolocation.
- IP geolocation data is approximate and may not be 100% accurate
- Location data is only available when
{ip_whois.*}variables are used in the page - IP address is always available, but country/city/region require geolocation lookup
- Use these variables responsibly and in compliance with privacy regulations
Custom Brand Variables ({var.*})
Access custom variables defined in your brand settings using dot notation.
Format: {var.path.to.variable}
Default Values: {var.path.to.variable=default_value}
Custom brand variables are defined in your brand settings as JSON. You can access nested values using dot notation.
Example Brand Variables JSON:
- Custom variables are defined in your brand settings
- Use dot notation to access nested values
- Variables work in HTML, head HTML, and JavaScript
- If a variable doesn’t exist and no default is provided, you’ll see:
<ef-undefined>undefined: var.path</ef-undefined> - Default values are only used when the variable is undefined
Brand Variable Examples
Query Parameter Variables
Access URL query parameters to personalize content based on traffic source, campaigns, or other URL data.%query.*%
Access any query parameter from the URL.
Format: %query.parameter_name%
Example URL: https://yoursite.com/page?aff_id=123&source=facebook
{query.*}
Alternative format for query parameters (works in HTML and JavaScript).
{queryparams}
Get the complete query string for use in URLs.
Query Parameter Examples
- Query parameters are case-sensitive
- If a parameter doesn’t exist, the variable is replaced with an empty string
- All query parameter values are automatically escaped for security
- Unused query parameter variables are cleaned up automatically
Variable Usage Tips
Combining Variables
You can combine multiple variables for rich personalization:Conditional Display
Use variables with CSS or JavaScript for conditional display:Security Considerations
- All variable values are automatically escaped to prevent XSS attacks
- Customer data is only shown to authenticated customers
- Query parameters are sanitized before use
- Empty variables are safely removed
Performance
- Variables are replaced server-side during page rendering
- No client-side processing required
- Variables that don’t exist are efficiently removed
Troubleshooting
Variables Not Showing
Issue: Variable appears as literal text (e.g.,%DAY_NAME% instead of “Monday”)
Solutions:
- Check spelling and case sensitivity
- Ensure you’re using the correct format (
%vs{}) - Verify the variable name matches exactly
Customer Variables Empty
Issue:{customer.*} variables are empty or removed
Solutions:
- Ensure visitor has a customer session (email or
is_customerflag) - Check that customer has made at least one purchase
- Verify the variable name is correct
Query Parameters Not Working
Issue:%query.*% variables are empty
Solutions:
- Verify the parameter exists in the URL
- Check parameter name spelling (case-sensitive)
- Ensure the URL includes
?parameter=valueformat
Related Documentation
- Order Tag - Display customer order history
- Product Item Tag - Display product listings
- Collection Item Tag - Display collection entries