Links (A/B Testing)
Create smart links that split traffic across multiple destinations for A/B testing and traffic distribution
Links (A/B Testing)
Links in Fly Super are intelligent routing tools that distribute traffic across multiple destinations based on configurable weights. Perfect for A/B testing landing pages, gradual rollouts, and traffic splitting.
What Are Links?
A link is a short URL that redirects visitors to one of several destination URLs (called "variants") based on weight distribution. Each visitor is consistently assigned to the same variant.
Example:
Link: yourdomain.com/special-offer
Redirects to:
- 50% → yourdomain.com/offer-page-v1 (Control)
- 50% → yourdomain.com/offer-page-v2 (Variant)Key Features:
- Multiple variants per link (2-10 URLs)
- Weighted distribution (e.g., 70/30, 50/50, 33/33/34)
- Consistent visitor routing (same user always sees same variant)
- Edge-based routing (zero latency, ~10ms redirects)
- Cookie persistence (variant assignment stored)
- Redis-backed for speed
Use Cases
1. A/B Testing Landing Pages
Test different versions to find highest-converting design:
Example:
- Link:
yourdomain.com/product-launch - Variant A (50%): Long-form sales page
- Variant B (50%): Short-form minimal page
Measure: Which variant drives more conversions?
2. Headline Testing
Test different value propositions:
Example:
- Link:
yourdomain.com/webinar - Variant A (50%): "Learn How to 10x Your Revenue"
- Variant B (50%): "Free Masterclass: Revenue Growth Strategies"
Measure: Which headline gets more signups?
3. Gradual Rollouts
Release new page version gradually:
Example:
- Link:
yourdomain.com/pricing - Variant A (90%): Current pricing page
- Variant B (10%): New pricing page
Gradually shift traffic: 90/10 → 75/25 → 50/50 → 0/100
4. Geographic Routing
Send users to region-specific pages:
Example:
- Link:
yourdomain.com/signup - Variant A (40%): US-specific page
- Variant B (30%): EU-specific page
- Variant C (30%): Asia-specific page
Note: Currently random distribution. True geo-routing coming soon.
5. Multi-Variant Testing
Test more than 2 options:
Example:
- Link:
yourdomain.com/offer - Variant A (33%): $99/month offer
- Variant B (33%): $199/year offer
- Variant C (34%): Custom pricing offer
Measure: Which offer generates most revenue?
6. Campaign Testing
Test different campaign messaging:
Example:
- Link:
yourdomain.com/campaign - Variant A (50%): Problem-focused messaging
- Variant B (50%): Solution-focused messaging
Share link in ads, measure which messaging resonates.
How Links Work
1. Visitor Clicks Link
User clicks: yourdomain.com/special-offer
2. Edge Routing
- Request hits Fly Super edge network
- Redis lookup for link configuration (< 10ms)
- No database query (blazing fast)
3. Variant Assignment
First-time visitor:
- Deterministic hash based on IP + User Agent
- SHA-256 hash → mod by total weight → select variant
- Cookie set:
fs_variant_[linkId]=variantId
Returning visitor:
- Check cookie for existing assignment
- Route to same variant consistently
4. Redirect
- HTTP 307 Temporary Redirect
- Visitor lands on variant URL
- Entire process: ~10ms
Why 307?
- Temporary redirect (search engines don't index)
- Preserves HTTP method (POST requests work)
- Allows changing destinations
Key Concepts
Variants
A variant is a destination URL with a weight:
{
"url": "https://yourdomain.com/page-v1",
"weight": 50
}Each link can have 2-10 variants.
Weights
Weight determines traffic percentage:
Examples:
50/50 Split:
- Variant A: weight 50 (50% traffic)
- Variant B: weight 50 (50% traffic)
70/30 Split:
- Variant A: weight 70 (70% traffic)
- Variant B: weight 30 (30% traffic)
33/33/34 Split (3 variants):
- Variant A: weight 33 (33% traffic)
- Variant B: weight 33 (33% traffic)
- Variant C: weight 34 (34% traffic)
Important: Weights must sum to 100!
Deterministic Routing
Same visitor always sees same variant:
How:
- Hash visitor's IP + User Agent with SHA-256
- Take hash mod 100
- Map result to weight ranges
- Store assignment in cookie
Result:
- User sees consistent experience
- No flip-flopping between variants
- Accurate test results
Cookie Persistence
Variant assignment stored in cookie:
Cookie name: fs_variant_[linkId]
Cookie value: variantId
Duration: 30 days (default)
Purpose:
- Fast lookups (no hashing needed)
- Cross-session consistency
- Works even if IP changes
Creating Links
Quick Start
- Navigate to Links in sidebar
- Click "Create Link"
- Enter link slug (e.g.,
special-offer) - Add 2+ variants with URLs and weights
- Ensure weights sum to 100
- Click "Create"
Your link is now live! Share: yourdomain.com/slug
Detailed instructions: See Creating Links
Managing Links
Viewing Links
Links list shows:
- Link slug
- Domain
- Number of variants
- Weight distribution
- Created date
- Active/inactive status
Editing Links
Click a link to edit:
- Change variant URLs
- Adjust weights
- Add/remove variants
- Update slug
Note: Changes apply immediately to new visitors. Existing cookie assignments persist until expiry.
Deactivating Links
To stop using a link:
- Open link settings
- Click "Deactivate"
- Link returns 404
Use case: End A/B test after winner determined.
Deleting Links
To permanently delete:
- Open link settings
- Click "Delete"
- Confirm deletion
Warning: Cannot be undone. Existing links will break.
Performance
Speed
Redirect time: ~10ms average
Why so fast?
- Edge network (Vercel Edge Middleware)
- Redis cache (no database queries)
- Deterministic algorithm (simple hash calculation)
- Global CDN (request handled at nearest edge)
Scalability
Handles:
- Millions of redirects per day
- Thousands of requests per second
- Global traffic distribution
Powered by:
- Vercel Edge Runtime
- Upstash Redis (global)
- SHA-256 hashing
Analytics (Coming Soon)
Track link performance:
Metrics:
- Total clicks per link
- Clicks per variant
- Conversion rate per variant
- Traffic sources
- Geographic distribution
Use case: Determine which variant wins your A/B test.
Current workaround: Use UTM parameters and track in your analytics:
Variant A: /page-v1?utm_content=variant_a
Variant B: /page-v2?utm_content=variant_bBest Practices
Testing Strategy
- Start with 50/50 split for unbiased results
- Run tests for at least 1-2 weeks for statistical significance
- Aim for 100+ conversions per variant minimum
- Test one variable at a time (headline OR image, not both)
- Don't stop test early even if one variant is "winning"
Weight Distribution
- Even splits for A/B tests (50/50, 33/33/34)
- Gradual rollouts start small (90/10 → 80/20 → etc.)
- Always sum to 100 exactly
- Consider minimum viable traffic (don't use 1%, results won't be meaningful)
Variant URLs
- Use landing pages on same domain for consistency
- Include UTM parameters for tracking
- Ensure all variants are published before going live
- Test each variant URL manually before launching
Link Slugs
- Use descriptive names (e.g.,
spring-sale-2024, notlink-1) - Keep it short for easy sharing
- Avoid special characters (use hyphens, not underscores)
- Include campaign/test name for organization
Limitations
Current Limitations
-
No built-in analytics (coming soon)
- Workaround: Use UTM parameters + your analytics platform
-
No true geo-routing (coming soon)
- Workaround: Use weight distribution as proxy
-
No time-based routing (coming soon)
- Workaround: Manually adjust weights at scheduled times
-
No device-based routing (coming soon)
- Workaround: Create separate links for mobile/desktop
-
Cookie-dependent consistency
- Users who clear cookies may see different variant
- Private browsing won't persist across sessions
Weights Must Sum to 100
Invalid:
Variant A: 50
Variant B: 60
Total: 110 ❌Valid:
Variant A: 45
Variant B: 55
Total: 100 ✅Advanced Usage
Sequential Testing
Test variants sequentially, not simultaneously:
Week 1:
- Variant A: 100%
Week 2:
- Variant B: 100%
Compare results. Useful when simultaneous split isn't possible.
Multi-Armed Bandit (Coming Soon)
Automatically adjust weights based on performance:
- High-converting variants get more traffic
- Low-converting variants get less traffic
- Dynamically optimize over time
Personalization (Coming Soon)
Route based on user attributes:
- First-time vs returning visitors
- Logged in vs logged out
- Subscription tier
- User preferences
Troubleshooting
"Link not found (404)"
Possible causes:
- Link slug is incorrect
- Link is deactivated
- Domain not configured
- Link was deleted
Solution: Verify link exists and is active in Links dashboard.
"Visitor keeps seeing different variants"
Causes:
- User is clearing cookies
- Using private/incognito mode
- Different devices/browsers
Solution: This is expected behavior. Variant assignment is per-device/browser.
"Traffic split doesn't match weights"
Causes:
- Small sample size (< 100 visitors)
- Bot traffic (not assigned variants)
- Recently changed weights (existing assignments persist)
Solution: Wait for larger sample size, exclude bots from analysis.
"Redirect is slow"
Causes:
- Variant URL is slow to load (not the redirect itself)
- Network issues on visitor's end
Solution: Test redirect speed with curl:
curl -I -L https://yourdomain.com/your-linkRedirect should be ~10ms. Page load time is separate.
What's Next?
- Creating Links - Detailed guide to creating and configuring links
- Traffic Splitting - Deep dive into weight distribution and routing
- Landing Pages - Create variants for A/B testing
Quick Reference
| Feature | Description | Limit |
|---|---|---|
| Variants per link | Destination URLs | 2-10 |
| Weight distribution | Traffic % per variant | Must sum to 100 |
| Redirect speed | Edge-based routing | ~10ms |
| Consistency | Same user, same variant | Cookie-based (30 days) |
| Analytics | Performance tracking | Coming soon |
| Use Case | Split Example | Best For |
|---|---|---|
| A/B Test | 50/50 | Finding winner between 2 options |
| Multivariate | 33/33/34 | Testing 3+ options |
| Gradual Rollout | 90/10 → 0/100 | Safe new version deployment |
| Champion/Challenger | 80/20 | Testing new variant against proven winner |
Pro Tip: Always test your link variants manually before launching to production. Ensure all variant URLs work correctly and land on published landing pages!