FoPost LogoFoPost Docs
AI Features

A/B Testing

Generate content variants and track performance.

A/B Testing

Pro + AI

Generate multiple versions of a post and track which variant performs best.

Create an A/B test

$test = $client->ai()->createAbTest([
    'content' => 'Check out our new product launch!',
    'platform' => 'twitter',
    'variants' => 3,
]);

// Returns 3 AI-generated variants:
foreach ($test->variants() as $variant) {
    echo "Variant {$variant->id()}: {$variant->content()}\n";
}

Run the test

// Publish each variant at different times or to different audiences
$client->runAbTest($test->id());

OwlStack publishes the variants and tracks engagement for each.

View results

$results = $client->abTestResults($test->id());

foreach ($results->variants() as $variant) {
    echo "Variant {$variant->id()}:\n";
    echo "  Impressions: {$variant->impressions()}\n";
    echo "  Engagement: {$variant->engagement()}\n";
    echo "  Clicks: {$variant->clicks()}\n";
    echo "  Score: {$variant->score()}\n\n";
}

echo "Winner: Variant {$results->winner()->id()}\n";

How it works

  1. Generate — AI creates multiple content variants with different angles, hooks, and tones
  2. Publish — variants are published at optimal times
  3. Measure — OwlStack tracks engagement metrics for each variant
  4. Learn — results inform future content generation and optimization

On this page