Campaigns
Campaigns in Karla are powerful marketing tools that help you engage customers during their post-purchase journey and boost repeat sales. With Karla's campaign system, you can create targeted promotions that appear on tracking pages, in emails, and throughout the customer experience.
What Are Campaigns?
Campaigns are promotional content pieces that can be strategically placed throughout your customer's delivery journey. They allow you to:
- Promote products with visual recommendations
- Display banner offers with discount codes
- Create targeted content for specific customer segments
- Drive repeat purchases during high-engagement moments
- Increase customer lifetime value through strategic touchpoints
Campaign Types
Karla supports three distinct campaign types, each optimized for different marketing objectives:
Basic Campaigns
Best for: General promotions, brand awareness, simple offers
Simple promotional content with custom messaging and call-to-action buttons. Perfect for straightforward promotions that don't require specific product focus.
Key Features:
- Custom title and subtitle
- Single call-to-action button
- Featured image support
- Simple and clean design
Product Campaigns
Best for: Cross-selling, upselling, product recommendations
Product-focused campaigns that showcase multiple products with detailed information, pricing, and individual call-to-action buttons.
Key Features:
- Multiple product display
- Product images, names, and prices
- Individual product CTAs
- Discount codes per product
- Rich product metadata
Banner Campaigns
Best for: Sales events, discount promotions, limited-time offers
Large promotional banners featuring prominent discount codes and compelling offers designed to drive immediate action.
Key Features:
- Large banner format
- Prominent discount display
- Bold call-to-action
- Eye-catching design
- Perfect for sales events
Campaign Attribution
Understanding which orders come from your campaigns is crucial for measuring ROI and optimizing performance. Karla offers multiple attribution methods, each with different trade-offs between ease of setup, accuracy, and requirements.
Attribution Method Comparison
| Method | Reliability | Setup | Discount Required | Platform Support | Best For |
|---|---|---|---|---|---|
| Referral Parameter | Basic | Automatic | No | Shopify, Shopware | Quick start, basic tracking |
| Discount Codes | High | Very Low | Yes | All platforms | Easy setup, discount campaigns |
| Browser SDK | Highest | Medium | No | Shopify only | Maximum accuracy, automatic tracking |
| API Attribution | Highest | High | No | All platforms | Custom implementation, full control |
Method 1: Referral Parameter Tracking
Currently supported on: Shopify and Shopware. For other platforms, use Method 2 (Discount Codes) or Method 4 (API Attribution).
When customers click links from Karla (tracking pages, emails, push notifications), platform-specific referral parameters are added to the URL. Your e-commerce platform captures these parameters to identify Karla-originated orders.
How it works:
- Customer clicks a Karla link (e.g., from tracking email)
- Platform-specific parameter is added (e.g.,
ref=karlafor Shopify) - Parameter is captured during checkout
- Karla retrieves attributed orders via your platform's API
General limitations:
- Platform-specific: Only works on Shopify and Shopware
- May not work if customer has an existing session with your shop
- Can be overridden by other plugins or marketing tools
- Tracking pages embedded as iframes won't appear in some platform analytics reports
Platform-specific guides:
This method is enabled automatically but has reliability limitations. For better accuracy, use Method 2, 3, or 4.
Method 2: Discount Code Attribution
The simplest and most reliable attribution method when campaigns offer discounts.
Add a discount code to your campaign in the Karla portal. Orders using this discount are automatically attributed to the campaign.
How it works:
- Configure campaign with a discount code in Karla portal
- Ensure the discount code is exclusive to this campaign
- Customers apply discount at checkout
- Karla tracks orders via the discount code
Benefits:
- No technical setup - configure in portal, works immediately
- Cross-platform - works on Shopify, WooCommerce, custom platforms
- Not affected by browser settings, ad blockers, or JavaScript
- Easy to verify in your platform's order reports
- Works regardless of session state or other plugins
Limitations:
- Only works for campaigns offering discounts
- Discount must be exclusive to Karla for accurate attribution
- Over-attribution risk: If customers share the code outside Karla (social media, coupon sites), those orders will be incorrectly attributed
Best practices:
- Create unique codes per campaign to track performance individually
- Use time-limited codes to minimize sharing and code leakage
- Rotate discount codes for ongoing campaigns
- Keep codes simple but unique (e.g.,
KARLA-WELCOME-DECinstead ofSAVE10) - Monitor for code sharing by checking if attribution exceeds engagement metrics
Platform-specific verification:
- Shopify: Orders → Filter by Discount code
- WooCommerce: Orders → Filter by Coupon code
- Custom platforms: Query orders by discount/coupon field
Method 3: Browser SDK Tracking
Currently, automatic Browser SDK attribution is only available for Shopify. For other platforms, use Method 2 (Discount Codes) or Method 4 (API Attribution).
Install the Karla Browser SDK in global mode on your Shopify shop to track all orders originating from Karla interactions.
How it works:
- Browser SDK script loads on all shop pages
- When customers arrive from a Karla source, attribution parameters are captured
- Parameters are added to the cart as custom attributes (
_karla_*) - These persist through checkout regardless of session changes
- On checkout, cart attributes transfer to order
note_attributes - Karla retrieves orders with attribution data via Shopify API
Attribution data captured:
The Browser SDK captures URL parameters and stores them in the cart. On checkout, these transfer to the order_analytics object:
karla_source→source- Traffic source (e.g.,trackpages,email,push)karla_campaign→campaign- Campaign ID for detailed trackingkarla_medium→medium- Marketing medium (e.g.,transactional,promotional)- Landing URL →
landing_url- Full landing page URL (sanitized, max 255 chars) - Landing path →
landing_path- Landing page path - Referrer →
referrer- HTTP referrer (max 255 chars) - Timestamp →
captured_at- ISO 8601 timestamp of first Karla interaction
Benefits:
- Most accurate attribution - only tracks actual Karla engagement
- No over-attribution - code sharing doesn't affect accuracy
- Works without discounts - track non-promotional campaigns
- Session-independent - works even with existing shop sessions
- Plugin-resistant - not affected by other marketing tools
- Detailed analytics - rich campaign performance data
- Automatic - no manual API integration needed
Limitations:
- Shopify only - not available for other platforms yet
- Requires technical setup (theme modification)
- Can be blocked by ad blockers or privacy extensions (~5-10% of users)
- Won't work if JavaScript is disabled (~0.2% of users)
- Requires maintenance when changing themes
Setup guides:
Method 4: API Attribution (Custom)
Full control over attribution - manually send attribution data via the Orders API. Works on any e-commerce platform.
For maximum flexibility, you can implement custom attribution tracking and send the data to Karla via the Orders API.
How it works:
- Capture attribution parameters in your own tracking system (URL params, cookies, session data)
- When creating orders via the Karla API, include the
order_analyticsfield - Karla uses this data to attribute orders to your campaigns
Benefits:
- Works on all platforms - Shopify, WooCommerce, Magento, custom platforms
- Full control - implement exactly the attribution logic you need
- No JavaScript required - server-side implementation
- Not affected by browser blockers - all tracking happens on your backend
- Highest reliability - you control the entire attribution flow
Limitations:
- High setup complexity - requires custom development
- Maintenance required - you're responsible for tracking logic
- API integration needed - must create/update orders via Karla API
- Testing required - need to validate attribution data flow
Best practices:
- Always include source: The
sourcefield is required (e.g.,trackpages,email,sms) - Use consistent source values: Standardize identifiers across your implementation
- Include campaign IDs: Use the
campaignfield to track specific campaign performance - Set appropriate medium: Use
transactional,promotional, ornotification - Sanitize URLs: Remove sensitive data from
landing_url(passwords, tokens, PII) - Capture early: Store attribution data at the start of the customer session
- Include timestamp: Always set
captured_atwhen attribution is detected - Test thoroughly: Verify attribution is working correctly in production
When to use this method:
- You're on a platform not supported by Methods 1-3
- You need custom attribution logic beyond what the Browser SDK provides
- You want complete control over the attribution process
- You already have a custom order integration with Karla's API
Complete documentation:
Discount Codes (Method 2): Perfect for promotional campaigns, seasonal sales, or when you need quick setup with good reliability on any platform.
Browser SDK (Method 3): Best for Shopify users who want non-discount campaigns with maximum accuracy and automatic tracking.
API Attribution (Method 4): Essential for non-Shopify platforms, or when you need custom attribution logic and full control.
Referral Parameter (Method 1): Acceptable for initial testing on Shopify/Shopware, but upgrade to other methods for production campaigns.
Campaign Performance
Analytics & Insights
Track campaign effectiveness with built-in analytics in the portal:
- Impression metrics - How many customers see campaigns
- Click-through rates - Engagement with call-to-action buttons
- Conversion tracking - Purchases driven by campaigns (based on attribution method)
- Revenue attribution - Direct sales impact with confidence intervals
Your chosen attribution method directly impacts analytics accuracy:
- Discount codes: May show inflated conversions due to code sharing
- Browser SDK: Most accurate representation of true campaign performance
- Referral parameter: May undercount due to session limitations
A/B Testing
Test different campaign variations to optimize performance:
- Compare different messaging approaches
- Test various visual designs
- Optimize call-to-action wording
- Measure impact of different discount levels
A/B testing recommendations:
- Use Browser SDK attribution for most accurate test results
- Run tests for at least 7 days to account for weekly patterns
- Ensure sample sizes are statistically significant (>100 orders per variant)
- Test one variable at a time for clear insights
Best Practices
Targeting Strategy
- Start with broad segments and narrow based on performance
- Use time-sensitive offers to create urgency
- Align campaigns with seasonal trends and inventory
Content Guidelines
- Keep messaging concise and action-oriented
- Use high-quality product images (recommended: 800x800px minimum in
.webpformat) - Ensure mobile-friendly design and fast loading times
- Test different call-to-action phrases
Timing Optimization
- Launch campaigns during peak tracking page visits
- Consider customer time zones for global campaigns
- Avoid campaign overlaps within the same segment
- Plan campaigns around shipping delays or peak seasons
Performance Monitoring
- Review analytics weekly to identify trends
- A/B test campaign elements systematically
- Adjust targeting based on conversion data
- Document successful campaign patterns for reuse
Next Steps
You've learned what campaigns can do - now let's put them into action:
🚀 Quick Start Path
1. Access Portal
Log in to create your first campaign with our visual editor
2. Set Up Attribution
Choose the right tracking method for accurate campaign measurement
3. Verify Integration
Ensure your tracking page is ready to display campaigns
4. Add Notifications
Extend campaigns to email and messaging channels
📖 Deep Dive Resources
Campaign Strategy:
- Deep Dive: Segmented Campaigns - Advanced targeting strategies
- Best Practices Guide - Design and messaging tips
Attribution & Tracking:
- Shopify Attribution Guide - Shopify-specific tracking methods
- Browser SDK Attribution - Automatic tracking implementation (Shopify only)
- API Attribution Reference - Custom attribution for all platforms
Technical Implementation:
- Campaign API Reference - Complete API documentation
- Webhook Integration - React to delivery events
- Browser SDK - Embed campaigns on any page
💡 Campaign Ideas to Get Started
- New Customers
- VIP Customers
- Win-Back
Welcome Series Campaign
{
"segment": "Shopify.tag.first_purchase",
"promotion_type": "basic",
"promotion_properties": {
"title": "Welcome to [Your Brand]!",
"subtitle": "Thank you for your first order. Enjoy 15% off your next purchase.",
"cta_label": "Shop Now"
}
}
Exclusive Access Campaign
{
"segment": "Klaviyo.list.vip_customers",
"promotion_type": "product",
"promotion_properties": {
"title": "VIP Early Access",
"products": [
/* New arrivals */
]
}
}
Re-engagement Campaign
{
"segment": "Shopify.tag.dormant_90_days",
"promotion_type": "banner",
"promotion_properties": {
"title": "We Miss You!",
"subtitle": "Come back with 25% off",
"discount": {
"value": 25,
"value_type": "percentage"
}
}
}
Most merchants see their first campaign driving results within 24 hours. Start your free trial and transform your post-purchase experience today!