Skip to main content

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

MethodReliabilitySetupDiscount RequiredPlatform SupportBest For
Referral ParameterBasicAutomaticNoShopify, ShopwareQuick start, basic tracking
Discount CodesHighVery LowYesAll platformsEasy setup, discount campaigns
Browser SDKHighestMediumNoShopify onlyMaximum accuracy, automatic tracking
API AttributionHighestHighNoAll platformsCustom implementation, full control

Method 1: Referral Parameter Tracking

Limited platform support

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:

  1. Customer clicks a Karla link (e.g., from tracking email)
  2. Platform-specific parameter is added (e.g., ref=karla for Shopify)
  3. Parameter is captured during checkout
  4. 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:

tip

This method is enabled automatically but has reliability limitations. For better accuracy, use Method 2, 3, or 4.

Method 2: Discount Code Attribution

Easiest setup - works on all platforms

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:

  1. Configure campaign with a discount code in Karla portal
  2. Ensure the discount code is exclusive to this campaign
  3. Customers apply discount at checkout
  4. 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-DEC instead of SAVE10)
  • 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

Shopify only

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:

  1. Browser SDK script loads on all shop pages
  2. When customers arrive from a Karla source, attribution parameters are captured
  3. Parameters are added to the cart as custom attributes (_karla_*)
  4. These persist through checkout regardless of session changes
  5. On checkout, cart attributes transfer to order note_attributes
  6. 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_sourcesource - Traffic source (e.g., trackpages, email, push)
  • karla_campaigncampaign - Campaign ID for detailed tracking
  • karla_mediummedium - 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)

For advanced users and all platforms

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:

  1. Capture attribution parameters in your own tracking system (URL params, cookies, session data)
  2. When creating orders via the Karla API, include the order_analytics field
  3. 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:

  1. Always include source: The source field is required (e.g., trackpages, email, sms)
  2. Use consistent source values: Standardize identifiers across your implementation
  3. Include campaign IDs: Use the campaign field to track specific campaign performance
  4. Set appropriate medium: Use transactional, promotional, or notification
  5. Sanitize URLs: Remove sensitive data from landing_url (passwords, tokens, PII)
  6. Capture early: Store attribution data at the start of the customer session
  7. Include timestamp: Always set captured_at when attribution is detected
  8. 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:

When to use each method

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
Attribution affects analytics

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 .webp format)
  • 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

📖 Deep Dive Resources

Campaign Strategy:

Attribution & Tracking:

Technical Implementation:

💡 Campaign Ideas to Get Started

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"
}
}

Ready to Launch?

Most merchants see their first campaign driving results within 24 hours. Start your free trial and transform your post-purchase experience today!