Variables let you capture and display user data throughout your funnel. When someone enters their name, selects their age group, or arrives with tracking parameters - variables store these values so you can use them anywhere.

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

User selects: "25-34" for age group
Variable created: {{age-group}}
You can now use: "80% of people in {{age-group}} love our product"
User sees: "80% of people in 25-34 love our product"

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:
URL: https://your-project.fnlfx.com/funnel?utm_campaign=summer&promo=SAVE20
Available variables:
  • {{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:
VariableWhat it containsUse case
{{user.id}}Unique profile IDTrack users across sessions
{{user.session_id}}Current session IDDebug specific visits
For understanding profiles vs sessions, see Core Concepts.

Using Variables

In Text Elements

Simply type the variable name with double braces anywhere in your text:
Welcome back, {{name}}!

Based on your selection of {{plan-type}}, you'll save {{discount-amount}}.

Join {{percent}}% of {{age-group}} year olds who upgraded today!

In Actions

Variables work in action parameters:

Combining Variables

Mix variables with text and other variables freely:
"{{percent}}% of people using {{query.device}} in {{city}} are feeling {{mood}}"
Could display as:
"73% of people using iPhone in New York are feeling motivated"

Variable Rules

Naming Requirements

Allowed:
  • Letters and numbers: name, email2, step1
  • Hyphens and underscores: first-name, user_age
  • URL-friendly characters only
Not allowed:
  • 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:
"People in {{age-group}} who selected {{plan-type}} save an average of ${{savings}} per year"

Progressive Profiling

Build understanding across screens:
  1. Screen 1: Collect {{industry}}
  2. Screen 2: “As someone in {{industry}}, you’ll appreciate…”
  3. Screen 3: Collect {{company-size}}
  4. Screen 4: “{{industry}} companies with {{company-size}} employees typically…”

Campaign Tracking

Maintain attribution throughout the funnel:
Arrived with: ?utm_source=facebook&utm_campaign=summer
Use throughout: "Exclusive {{query.utm_campaign}} offer for our {{query.utm_source}} community"

Dynamic Testimonials

Match testimonials to user context:
"Just like you, Sarah was looking for a {{plan-type}} solution. 
She's now saving {{percent}}% on her {{category}} expenses."

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)
Both use the same underlying data - user inputs create both a displayable variable and a state for dynamic actions.
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
Need transformations? Use custom JavaScript.

No Default Values

Variables don’t support fallbacks:
  • Can’t do {{name|"Friend"}}
  • Empty variables show as {{name}}
  • No conditional display
Need defaults? Collect the data earlier or use custom code.

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:
  1. Add test parameters to URL: ?name=Test&plan=Premium
  2. Go through entire funnel
  3. Verify all variables display correctly
  4. Check what happens with missing data

Examples

Personalized Pricing Page

URL: ?source=podcast&code=SAVE20

Headline: "Exclusive {{query.source}} listener discount!"
Subtext: "Use code {{query.code}} at checkout"
After selection: "You've chosen the {{plan}} plan"
Confirmation: "Thanks {{email}}, your {{plan}} plan is ready!"

Quiz Funnel Personalization

Question 1: "What's your age?" → {{age-group}}
Question 2: "Main goal?" → {{goal}}
Question 3: "Experience level?" → {{level}}

Results page:
"Perfect! For someone in their {{age-group}}s looking to {{goal}}, 
with {{level}} experience, we recommend..."

Multi-Step Form

Step 1: {{first-name}}, {{last-name}}, {{email}}
Step 2: "Hi {{first-name}}, let's set up your account..."
Step 3: "{{email}} will receive a confirmation..."
Final: "All done, {{first-name}} {{last-name}}!"

Troubleshooting

Next Steps