Abuja Digital Studio · Est. 2018
Start a Project
DocsOMailerCampaigns and A/B testing
Reference

Campaigns and A/B testing

OMailerorravo.com/docs/omailer/campaigns-ab-testing

Campaigns and A/B testing

Campaign statuses

StatusMeaning
draftNot yet scheduled
scheduledWill send at scheduled_at
sendingActive batch send in progress
sentCompleted
pausedPaused mid-send

Send modes

ModeBehaviour
immediateBatches sent on save-and-send
scheduledSends at scheduled_at datetime
smartSends to each subscriber at their optimal_send_hour

Smart-mode requires at least 3 historical opens per subscriber (calculated weekly by om_recalculate_send_times).

Creating a campaign in PHP

php$id = OM_Campaign::create([
    'subject'      => 'Your July Newsletter',
    'preview_text' => 'Inside: summer updates',
    'from_name'    => 'Jane',
    'from_email'   => 'jane@acme.com',
    'html_content' => '<h1>Hello {{first_name}}</h1>...',
    'list_id'      => 3,
    'send_mode'    => 'immediate',
]);
OM_Campaign::schedule( $id, '2026-08-01 09:00:00' );
OM_Campaign::pause( $id );
$stats = OM_Campaign::get_stats( $id );

A/B split testing

OM_ABTest runs subject, content, or sender-name variants against a parent (control) campaign.

  1. Create the parent campaign (becomes control).
  2. Create one or more variants with different subject lines or HTML.
  3. On send, OMailer splits the list by ab_split_pct per variant.
  4. After ab_eval_hours, OM_ABTest::evaluate() scores by open rate or click rate and marks the winner.
  5. The winner is sent to all remaining subscribers.
php$ab = new OM_ABTest();
$variant_id = $ab->create_variant( $parent_id, [
    'subject'      => 'Different subject line',
    'html_content' => '<p>Variant B...</p>',
], 30, 'open_rate', 24 );

Evaluation runs hourly via om_evaluate_ab_tests cron.

Campaigns and A/B testing · OMailer Docs | Orravo