Variants
Variants let you serve different content to different audiences. Show mobile users a simplified layout, VIP customers exclusive offers, or regional users localized content - all from the same page.
What is a Variant?
A variant is an alternative version of your content that displays when certain conditions are met. Each piece of content can have multiple variants:
Homepage
├── Default variant (shown to everyone else)
├── Mobile variant (simplified for small screens)
├── VIP variant (exclusive offers)
└── Holiday variant (seasonal content)How Variants Work
- Create variants for a page or entity
- Set targeting rules for each variant
- When a visitor arrives, Foir checks the rules
- The matching variant is displayed (or default if none match)
Creating Variants
In the Editor
- Open any page or content item
- Click the Variants dropdown (top of editor)
- Click Add Variant
- Configure:
- Name: “Mobile Version”
- Key:
mobile(used internally) - Targeting: Set rules for when to show
- Priority: Higher = checked first
- Edit the variant’s content
- Publish when ready
From the Variant Catalog
For rules you use frequently:
- Go to Settings > Variant Catalog
- Create reusable targeting rules (e.g., “VIP Customers”, “Mobile Users”)
- When creating a variant, select from catalog instead of creating custom rules
Targeting Rules
Targeting rules determine which variant to show. Build rules using conditions:
Available Conditions
Device & Platform
- Device is mobile, tablet, or desktop
- Platform is web, iOS, or Android
Authentication
- User is logged in or anonymous
Custom Contexts (you configure these)
- Market (UK, US, etc.)
- Language/locale
- Customer segments (VIP, first-time, etc.)
Combining Rules
Use AND/OR logic:
Show to VIP mobile users:
- Segment is VIP AND Device is mobile
Show to UK or US visitors:
- Market is UK OR Market is US
Variant Priority
When multiple variants could match, priority determines the winner:
| Variant | Priority | Rule |
|---|---|---|
| Holiday VIP | 30 | Is holiday AND is VIP |
| VIP | 20 | Is VIP |
| Mobile | 10 | Device is mobile |
| Default | 0 | (always matches) |
Higher priority variants are checked first. The first match wins.
Publishing Variants
Each variant publishes independently:
- Edit the VIP variant without affecting the default
- Publish mobile changes while VIP stays in draft
- Schedule different variants for different times
Version History
Each variant maintains its own version history:
- Make changes (auto-saved as draft)
- Preview before publishing
- Publish when ready
- Roll back if needed
Common Use Cases
Mobile Optimization
Create a mobile variant with:
- Shorter headlines
- Fewer images
- Simplified navigation
- Larger tap targets
Regional Content
Create market variants with:
- Local currency and pricing
- Region-specific offers
- Localized images
- Local contact information
Customer Segments
Create segment variants with:
- VIP-exclusive content
- First-time visitor onboarding
- Returning customer promotions
- Loyalty tier benefits
A/B Testing
Create test variants with:
- Different headlines
- Alternative CTAs
- Layout variations
- Image options
Best Practices
- Always have a default - One variant should match when nothing else does
- Keep rules simple - Complex rules are hard to debug
- Use the catalog - Reuse common rules across your site
- Test thoroughly - Preview with different contexts before publishing
- Document your variants - Use clear names and descriptions
- Consider mobile first - Many visitors are on mobile devices