Experiments
Package docs status
Section titled “Package docs status”This page is generated from package source documentation in the Capell packages repository and the checked-in manifest. Source documentation is not distribution status. Before running a Composer command, verify that the exact package and compatible 1.x release are available through public Packagist or the authenticated marketplace account.
| Field | Value |
|---|---|
| Composer package | capell-app/experiments |
| Package slug | experiments |
| Product group | Capell Marketing & Growth |
| Tier | premium |
| Bundle | marketing-growth |
| Runtime contexts | admin, frontend |
| Capell version | ^1.0 |
| Source repository | capell-app/packages |
| Source path | packages/experiments |
| Docs source | packages/experiments/docs |
| Manifest | capell.json |
What This Plugin Adds
Section titled “What This Plugin Adds”Experiments is an Available, Schema-owning Capell package in the Capell Marketing & Growth product group. It ships as capell-app/experiments and extends these surfaces: admin, frontend.
Experiments adds server-side page and campaign tests with audience rules, weighted variant allocation, goal events, retention, and statistically gated winner reports.
Growth operators configure experiments, variants, goals, and eligible audiences in the admin, while consenting visitors receive an opaque allocation through private no-store endpoints.
Evidence: capell.json, src/Models/Experiment.php, src/Actions/AllocateVariantAction.php, src/Actions/BuildWinnerReportAction.php, docs/overview.admin.md, docs/screenshots.json, routes/experiments.php, tests/Feature/ExperimentRuntimeTest.php.
Status details:
- Status: Available
- Tier: premium
- Bundle: marketing-growth
- Composer package:
capell-app/experiments - Namespace:
Capell\Experiments - Theme key: not applicable
Why It Matters
Section titled “Why It Matters”For developers: Typed context and result data pass through focused Actions for audience evaluation, allocation, conversion recording, and winner calculation.
For teams: Teams can control who enters a test, compare goal performance, and wait for the configured evidence threshold before declaring a winner.
Evidence: src/Data/ExperimentContextData.php, src/Actions/EvaluateAudienceRulesAction.php, src/Actions/RecordGoalEventAction.php, tests/Feature/ExperimentFoundationTest.php, docs/admin-guide.md, src/Actions/BuildWinnerReportAction.php, src/Actions/DeclareExperimentWinnerAction.php, tests/Feature/ExperimentAdminSurfaceTest.php.
Screens And Workflow
Section titled “Screens And Workflow”Screenshot contract: docs/screenshots.json.


- Experiments admin index (admin, required).
- Experiment variants admin index (admin, required).
- Experiment goals admin index (admin, required).
- Experiment audience rules admin index (admin, required).
- Experiment edit allocation state (admin, optional).
- Experiment winner report (admin, optional).
- Experiment running and paused states (admin, optional).
- Experiment public allocation proof (frontend, optional).
Technical Shape
Section titled “Technical Shape”- Service providers:
Capell\Experiments\Providers\ExperimentsServiceProvider. - Config files:
packages/experiments/config/capell-experiments.php. - Migrations:
packages/experiments/database/migrations/2026_05_31_000001_create_experiments_table.php,packages/experiments/database/migrations/2026_05_31_000002_create_experiment_variants_table.php,packages/experiments/database/migrations/2026_05_31_000003_create_experiment_goals_table.php,packages/experiments/database/migrations/2026_05_31_000004_create_experiment_audience_rules_table.php,packages/experiments/database/migrations/2026_05_31_000005_create_experiment_allocations_table.php,packages/experiments/database/migrations/2026_05_31_000006_create_experiment_goal_events_table.php,packages/experiments/database/migrations/2026_06_07_000001_add_idempotency_unique_to_experiment_goal_events_table.php. - Models:
Experiment,ExperimentAllocation,ExperimentAudienceRule,ExperimentGoal,ExperimentGoalEvent,ExperimentVariant. - Filament classes:
ExperimentAudienceRuleResource,CreateExperimentAudienceRule,EditExperimentAudienceRule,ListExperimentAudienceRules,ExperimentGoalResource,CreateExperimentGoal,EditExperimentGoal,ListExperimentGoals,ExperimentVariantResource,CreateExperimentVariant,EditExperimentVariant,ListExperimentVariants,and 5 more. - Route files:
packages/experiments/routes/experiments.php. - Policies:
AbstractExperimentsResourcePolicy,ExperimentAudienceRulePolicy,ExperimentGoalPolicy,ExperimentPolicy,ExperimentVariantPolicy. - Actions:
AllocateVariantAction,BuildWinnerReportAction,CreateExperimentAction,DeclareExperimentWinnerAction,EvaluateAudienceRulesAction,PruneExperimentHistoryAction,RecordGoalEventAction,ResolveExperimentVariantForContextAction,SyncExperimentStatusesAction. - Data objects:
ExperimentAudienceRuleData,ExperimentContextData,ExperimentData,ExperimentGoalData,ExperimentGoalEventData,ExperimentStatusSyncResultData,ExperimentVariantData,ResolvedExperimentVariantData,VariantAllocationData,WinnerReportData,WinnerVariantReportData. - Command signatures:
capell:experiments:prune,capell:experiments:sync-statuses. - Manifest action API:
allocateVariant: Capell\Experiments\Actions\AllocateVariantAction,buildWinnerReport: Capell\Experiments\Actions\BuildWinnerReportAction,createExperiment: Capell\Experiments\Actions\CreateExperimentAction,declareExperimentWinner: Capell\Experiments\Actions\DeclareExperimentWinnerAction,evaluateAudienceRules: Capell\Experiments\Actions\EvaluateAudienceRulesAction,pruneExperimentHistory: Capell\Experiments\Actions\PruneExperimentHistoryAction,recordGoalEvent: Capell\Experiments\Actions\RecordGoalEventAction,resolveExperimentVariantForContext: Capell\Experiments\Actions\ResolveExperimentVariantForContextAction. - Scheduled commands:
capell:experiments:prune (daily),capell:experiments:sync-statuses (everyFiveMinutes). - Console command classes:
PruneExperimentHistoryCommand,SyncExperimentStatusesCommand. - Manifest contributions:
admin-resource: Capell\Experiments\Manifest\ExperimentAudienceRuleResourceContribution,admin-resource: Capell\Experiments\Manifest\ExperimentGoalResourceContribution,admin-resource: Capell\Experiments\Manifest\ExperimentResourceContribution,admin-resource: Capell\Experiments\Manifest\ExperimentVariantResourceContribution,model: Capell\Experiments\Manifest\ExperimentsModelsContribution,route: Capell\Experiments\Manifest\ExperimentsRuntimeRoutesContribution,scheduled-job: Capell\Experiments\Manifest\ExperimentsRetentionScheduleContribution,scheduled-job: Capell\Experiments\Manifest\ExperimentsStatusSyncScheduleContribution. - Health checks:
Capell\Experiments\Health\ExperimentsHealthCheck. - Blade views:
packages/experiments/resources/views/filament/experiments/results-page.blade.php,packages/experiments/resources/views/filament/experiments/results.blade.php. - Cache tags:
experiments.
Data Model
Section titled “Data Model”- Required tables:
experiments,experiment_variants,experiment_goals,experiment_audience_rules,experiment_allocations,experiment_goal_events. - Models:
Experiment,ExperimentAllocation,ExperimentAudienceRule,ExperimentGoal,ExperimentGoalEvent,ExperimentVariant. - Core record references in migrations:
sites via site_id. - Migration files:
2026_05_31_000001_create_experiments_table.php,2026_05_31_000002_create_experiment_variants_table.php,2026_05_31_000003_create_experiment_goals_table.php,2026_05_31_000004_create_experiment_audience_rules_table.php,2026_05_31_000005_create_experiment_allocations_table.php,2026_05_31_000006_create_experiment_goal_events_table.php,2026_06_07_000001_add_idempotency_unique_to_experiment_goal_events_table.php. - Migration impact: run host migrations through the package install flow before opening package surfaces.
- Deletion/retention behaviour: migrations declare cascade-on-delete relationships and null-on-delete relationships; retention is scheduled through
capell:experiments:prune(daily).
Install Impact
Section titled “Install Impact”- Required packages:
capell-app/admin,capell-app/core. - Admin navigation: declares
admin-resource: ExperimentAudienceRuleResourceContribution,admin-resource: ExperimentGoalResourceContribution,admin-resource: ExperimentResourceContribution,admin-resource: ExperimentVariantResourceContribution; each Filament page or resource controls its own navigation visibility. - Admin/editor extensions: none declared.
- Permissions:
View:Experiment,Create:Experiment,Update:Experiment,Delete:Experiment,View:ExperimentVariant,Create:ExperimentVariant,Update:ExperimentVariant,Delete:ExperimentVariant,View:ExperimentGoal,Create:ExperimentGoal,Update:ExperimentGoal,Delete:ExperimentGoal,View:ExperimentAudienceRule,Create:ExperimentAudienceRule,Update:ExperimentAudienceRule,Delete:ExperimentAudienceRule. - Public routes: loads
routes/experiments.php; registersExperimentsRuntimeRoutesContribution. - Database changes: package migrations are declared.
- Config:
config/capell-experiments.php. - Settings: no package settings declared.
- Queues or schedules: scheduled commands
capell:experiments:prune (daily),capell:experiments:sync-statuses (everyFiveMinutes). - Cache tags:
experiments. - Commands:
capell:experiments:prune,capell:experiments:sync-statuses.
Common Pitfalls
Section titled “Common Pitfalls”- Keep required Capell packages on compatible v4 releases:
capell-app/admin,capell-app/core. - Run migrations before opening package resources or public routes.
- Review package configuration before production-like verification:
config/capell-experiments.php. - Review middleware, throttling, signatures, and public-output safety in
routes/experiments.phpbefore exposing routes. - Register the host scheduler so these declared commands run at their documented frequencies:
capell:experiments:prune (daily),capell:experiments:sync-statuses (everyFiveMinutes). - Keep public Blade and cached HTML free of authoring markers, model IDs, permissions, signed editor URLs, and lazy database queries.
- Custom write integrations must preserve invalidation for
experimentscache tags.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| Package surface is missing after install | Provider or manifest is not loaded | Confirm capell.json, package composer.json, and provider registration | Reinstall the package, refresh Composer autoload, and clear host caches |
| Admin screen or command fails on missing table | Package migrations have not run | Check the tables listed in Data Model | Run host migrations and rerun the focused package test |
| Route returns unexpected output | Route cache, middleware, or signed URL setup does not match the package route file | Check the route files listed in Technical Shape | Clear route cache and verify middleware before exposing public routes |
| Background work does not run | Queue worker or declared schedule is not active | Check the jobs and scheduled commands listed in Technical Shape | Start the queue worker or host scheduler, then run the focused command or package test |
| Public output leaks unexpected state | Render data, cache variation, or authoring boundary has regressed | Check public Blade, cache tags, and public-output safety tests | Move data loading out of Blade and rerun the package public-output tests |
Quick Start
Section titled “Quick Start”- Install the package:
composer require capell-app/experiments. - Run the required setup:
php artisan migrate. - Open the Experiments admin index and confirm the admin workflow loads.
Next Steps
Section titled “Next Steps”- Package docs
- Overview
- Admin guide
- Configuration files:
config/capell-experiments.php. - Troubleshooting
- Screenshot contract
- Marketplace assets
- Capell content language plan
- Capell documentation design system
- Capell and package ERD notes
- Related packages: Campaign Studio, Frontend Optimizer, Html Cache, Form Builder, Insights.
- Focused tests:
vendor/bin/pest packages/experiments/tests --configuration=phpunit.xml.