How Variables Work
User provides input → Variable stores it → You display it anywhere Variables are like personalized placeholders. They get replaced with actual values when your funnel runs, creating unique experiences for each visitor.Most common use: Showing users their own responses. “Thanks for your
interest in the {{plan-type}} plan, {{name}}!” feels personal because it
uses their actual selections.
Quick Example
Types of Variables
User Input Variables
Created automatically when users interact with input elements:Element: Text Input with ID “email”
Creates:
{{email}}
Contains: Whatever user typedExample: User types “[email protected]” → {{email}}
displays “[email protected]”URL Query Variables
Automatically captured from your funnel URL:{{query.utm_campaign}}
→ “summer”{{query.promo}}
→ “SAVE20”
Testing hack: Add
?title=New Headline Test
to your URL and use
{{query.title}}
in your funnel to quickly test different headlines
without editing.System Variables
Built-in variables provided by FunnelFox:Variable | What it contains | Use case |
---|---|---|
{{user.id}} | Unique profile ID | Track users across sessions |
{{user.session_id}} | Current session ID | Debug specific visits |
Using Variables
In Text Elements
Simply type the variable name with double braces anywhere in your text:In Actions
Variables work in action parameters:Pass data to external sites:
Combining Variables
Mix variables with text and other variables freely:Variable Rules
Naming Requirements
✅ Allowed:- Letters and numbers:
name
,email2
,step1
- Hyphens and underscores:
first-name
,user_age
- URL-friendly characters only
- Spaces:
user name
won’t work - Special characters:
email@address
won’t work - Unicode:
用户名
won’t work - Reserved prefixes:
user
,query
,inputs
Case Sensitivity
Variables are case-sensitive:{{name}}
≠{{Name}}
≠{{NAME}}
- Be consistent with your element IDs
Missing Variables
When a variable doesn’t exist:- The literal text
{{variable-name}}
displays - Analytics logs a
variable_not_found
event - User sees the brackets and all
Always test your funnel flow to ensure variables are collected before
they’re used. You can’t display
{{email}}
before the user provides it.Common Patterns
Personalized Feedback
Show users how they compare to others like them:Progressive Profiling
Build understanding across screens:- Screen 1: Collect
{{industry}}
- Screen 2: “As someone in {{industry}}, you’ll appreciate…”
- Screen 3: Collect
{{company-size}}
- Screen 4: “{{industry}} companies with {{company-size}} employees typically…”
Campaign Tracking
Maintain attribution throughout the funnel:Dynamic Testimonials
Match testimonials to user context:Relationship with Dynamic Actions
Variables and dynamic action states are closely related:- Variables: Display data as text (
{{age-group}}
shows “25-34”) - States: Control flow logic (if age-group = “25-34”, navigate to screen X)
Key difference: Variables are for showing content, states are for
controlling behavior. Same data, different purposes.
Limitations
No Transformations
Variables display exactly as stored:- Can’t uppercase/lowercase
- Can’t truncate or substring
- Can’t format numbers
- Can’t calculate with them
No Default Values
Variables don’t support fallbacks:- Can’t do
{{name|"Friend"}}
- Empty variables show as
{{name}}
- No conditional display
Session Scope
Variables are bound to one session:- Persist throughout the funnel visit
- Lost when session ends
- Can’t pass between different funnels
- Restored if same session continues in new tab
Best Practices
Name Meaningfully
Use clear, descriptive IDs:- ✅
first-name
,plan-type
,budget-range
- ❌
input1
,field2
,var3
Test Your Flow
Always preview with test data:- Add test parameters to URL:
?name=Test&plan=Premium
- Go through entire funnel
- Verify all variables display correctly
- Check what happens with missing data
Examples
Personalized Pricing Page
Quiz Funnel Personalization
Multi-Step Form
Troubleshooting
Variable shows as {{variable}} instead of value
Variable shows as {{variable}} instead of value
The variable doesn’t exist yet. Check:
- Element ID matches exactly (case-sensitive)
- User has actually provided input before you use it
- Query parameter exists in URL
- No typos in variable name
Special characters not working
Special characters not working
Variables must be URL-friendly:
- Remove spaces (use hyphens or underscores)
- Remove special characters
- Use only letters, numbers, hyphens, underscores
Can't use 'user' as variable name
Can't use 'user' as variable name
These are reserved prefixes:
user
(for system variables)query
(for URL parameters)inputs
(for user inputs)
Next Steps
- Actions & Triggers - Use states for dynamic navigation
- Element Reference - See which elements create variables
- Custom Code - Transform variables with JavaScript