Understanding Usertune Variants: The Building Blocks of Personalized Content
Learn how Usertune variants work as the core feature that defines personalized content delivery, from payload structures to conditional logic and dynamic variable processing.
Guide Expert
• 5 min read
While containers act as intelligent orchestrators in Usertune's personalization system, variants are where the magic actually happens. They contain the real content data and the rules that determine exactly what each user sees. Think of variants as the individual experiences within your personalization strategy.
What Makes a Variant?
A variant in Usertune consists of four essential components that work together to deliver personalized experiences:
Name: A human-readable identifier for team organization is_enabled: A toggle for activation control without deletion Payload: JSON object containing your actual content data Conditions: Rules that determine when to serve this variant
This architecture separates what to show (payload) from when to show it (conditions), creating flexible personalization possibilities.
How Variants Process User Requests
When a user requests content, variants follow a systematic five-step process:
- Context Analysis: Evaluate user location, time, and custom attributes
- Condition Matching: Check which enabled variants match the user context
- Variant Selection: Choose the appropriate variant based on conditions
- Payload Processing: Replace variables with actual user data
- Content Delivery: Return the processed content to the user
This real-time processing ensures every user receives content tailored to their specific context.
Payload Structure and Dynamic Variables
Variants use JSON payloads with dynamic variables that get replaced with real user data:
{
"welcome_message": "Hello from {geo.city}!",
"offer_text": "Special deals for {geo.country} customers",
"personal_greeting": "Hi {attribute.user_name}!"
}
The variable system supports multiple data sources:
- Geographic Data:
{geo.country}
,{geo.city}
,{geo.region}
- Time Information:
{time.hour}
,{time.weekday}
,{time.today}
- Custom Attributes:
{attribute.user_name}
,{attribute.premium_user}
Conditional Logic for Smart Targeting
Conditions determine when variants should be served using flexible rule structures:
[
{
"logic": "or",
"rules": [
{
"attribute": "geo.city",
"operator": "in",
"values": [{"value": "Berlin"}, {"value": "Munich"}]
}
]
}
]
This example serves the variant only to users in Berlin or Munich, demonstrating how precise targeting can be achieved.
Real-World Use Cases
Geographic Personalization
Deliver location-specific content, comply with regional regulations, and adapt messaging for local customs and languages.
User Segmentation
Create different experiences for new vs returning users, premium vs free accounts, or various demographic segments.
Time-Based Content
Show different content during business hours, seasonal campaigns, or based on user's local time zone.
A/B Testing and Experimentation
Test different messages, layouts, or features while measuring performance and optimizing for better results.
Practical Example: Dynamic Processing
Here's how variants transform templates into personalized content:
Template Payload:
{
"greeting": "Good morning from {geo.city}, {attribute.user_name}!"
}
User Context:
{
"geo": {"city": "Berlin"},
"attribute": {"user_name": "Anna"}
}
Final Output:
{
"greeting": "Good morning from Berlin, Anna!"
}
This demonstrates how static templates become dynamic, personalized experiences.
Key Benefits of Variant Architecture
Flexible Content Management: Modify targeting rules without changing content, or update content without affecting distribution logic.
Safe Experimentation: Enable/disable variants instantly with the is_enabled
toggle, allowing safe testing and rollbacks.
Scalable Personalization: Support unlimited variants within containers for complex personalization strategies.
Context-Aware Delivery: Automatically adapt content based on user location, time, attributes, and custom data.
Getting Started with Variants
To begin using variants effectively:
- Define Your Use Case: Identify what you want to personalize and for whom
- Structure Your Payload: Design JSON content with appropriate variables
- Set Up Conditions: Create rules that target your desired audience segments
- Test and Iterate: Use the enable/disable toggle to safely test variants
- Monitor Performance: Track which variants perform best for optimization
Conclusion
Variants are the foundation where personalization transforms from concept to reality. By combining flexible payload structures with intelligent conditional logic, variants enable you to create sophisticated, context-aware experiences that adapt to each user's unique situation.
Whether you're implementing simple geographic personalization or complex multi-variant A/B testing campaigns, understanding how variants work is essential for successful personalization strategies. The combination of dynamic variable processing and precise targeting conditions makes variants the powerful building blocks of modern personalized experiences.
Ready to start creating personalized content? Explore Usertune's variant documentation and discover how variants can transform your user experiences.