Saltar a contenido

Comprehensive Guide to Dynamic Content, Segmentation, and AB Testing

Joystick's Dynamic Content system empowers teams to optimize and operate their products using segmentation and AB testing on remote configurations. This guide provides a complete overview of the system, including both specific value replacement and full config overlays.

Key Concepts

Joystick Dynamic Content enables transformations on any value in your remote config based on user parameters sent with the request. You can use it for simple segmentation, AB testing, or create in-depth business rule sets to tailor user experiences.

Use Cases

  • Differentiated pricing based on user attributes.
  • Location-based content presentation.
  • AB testing new features or content.
  • Staged feature rollouts.

Methods of Dynamic Content

Joystick supports two methods for dynamic content:

  1. Specific Value Replacement: Annotate individual parameters in the config to make them dynamic.
  2. Full Config Overlays: Replace the entire configuration for specific segments or AB tests.

1. Specific Value Replacement

Declaration Syntax

Dynamic content is declared directly in the config JSON using a special syntax. For example:

{
  "my_string": "#LK-SimpleString:string:Hello!#",
  "my_boolean": "#LK-SimpleBoolean:boolean:true#"
}

Joystick's editor will recognize these declarations and display the default values.

Dynamic Mapping for Specific Values

Once declared, you can define how these values change for different segments or AB tests using a Dynamic Map. Example:

[
  {
    "expression": "location = 'ch'",
    "name": "switzerland-segment",
    "values": {
      "my_string": "Hello Switzerland!",
      "my_boolean": false
    }
  }
]

2. Full Config Overlays

Full config overlays allow you to replace the entire configuration for specific segments or AB tests. This is useful for scenarios where multiple parameters need to change together.

Example Base Config

{
  "SpecialPricingOffer": {
    "OfferTitle": "Special Offer",
    "PercentBonus": "10",
    "Price": "4.99",
    "BackgroundColor": "LightGreen",
    "ButtonColor": "LightSalmon",
    "ButtonActionText": "Buy Now"
  }
}

Dynamic Mapping for Full Config Overlays

[
  {
    "expression": "location = 'a'",
    "name": "fullConfig-segment-only",
    "overlayType": "FullConfig",
    "fullConfig": {
      "SpecialPricingOffer": {
        "OfferTitle": "Full Config - Segment Only",
        "PercentBonus": "1",
        "Price": "1.99",
        "BackgroundColor": "Blue",
        "ButtonColor": "Blue",
        "ButtonActionText": "Buy Blue"
      }
    }
  },
  {
    "expression": "location = 'b'",
    "name": "fullConfig-with-ab-test",
    "overlayType": "FullConfig",
    "groups": [
      {
        "variantName": "variant_a",
        "mod": [[0, 199]],
        "fullConfig": {
          "SpecialPricingOffer": {
            "OfferTitle": "Full Config - AB Test - Variant A",
            "PercentBonus": "2",
            "Price": "2.99",
            "BackgroundColor": "Orange",
            "ButtonColor": "Orange",
            "ButtonActionText": "Buy Orange"
          }
        }
      },
      {
        "variantName": "variant_b",
        "mod": [[200, 499]],
        "fullConfig": {
          "SpecialPricingOffer": {
            "OfferTitle": "Full Config - AB Test - Variant B",
            "PercentBonus": "3",
            "Price": "3.99",
            "BackgroundColor": "Yellow",
            "ButtonColor": "Yellow",
            "ButtonActionText": "Buy Yellow"
          }
        }
      }
    ]
  }
]

How to Use Dynamic Content

Step 1: Create a Base Config

  1. Navigate to Joystick and create a new config.
  2. Add your base configuration JSON.

Step 2: Declare Dynamic Content (Optional for Specific Values)

Annotate individual parameters in your config using the declaration syntax.

Step 3: Add Dynamic Mapping

  1. Open the Dynamic Mapping editor.
  2. Define your segmentation or AB testing rules.
  3. Save the mapping.

Step 4: Test Your Configuration

  1. Use the Dynamic Content Demo page to test your setup.
  2. Provide the API Key, Config Content ID, and user parameters.
  3. Verify the results.

Advanced Features

  • Expressions: Use the expression parameter to define complex segmentation rules. Example:
location = 'ch' and user_id = 'd'
  • Activation DateTime: Schedule live-ops events using activationDateTime.

  • QA Testing: Use overrideAndActivateNow to test future events immediately.

What's Next?

Explore more advanced use cases and features in the Dynamic Content - In Depth guide.