Install
Works with Drupal: ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
31.27 KB
MD5: b5b899ea862e1ca4acd8d2f98d0dd680
SHA-1: f34c8cd19bf26bcbd6c43982ce619407b4e1d971
SHA-256: 6630aa74028cf95df1a128e2620acf570985adef0eff62ceccfd71555009bb40
Download zip
48.03 KB
MD5: dac9e3c6e5e601ba14bfca19c95d5ac9
SHA-1: 4e1e5bfcc5d502ddd14db5de85b1405f422aa729
SHA-256: 2c6701219e2ade57cc728aa03aa45ccd8c0b213845324969d56c9cd988e0bd08
Release notes
Server-side A/B Testing 1.0.0
Initial stable release.
Overview
Server-side A/B Testing provides a Drupal-native framework for running A/B experiments directly at the server level, using existing content entities and cache-aware delivery.
This module is designed for teams that require full control over experimentation logic, performance, and SEO, without relying on external SaaS platforms or client-side rendering.
Features
- Server-side A/B testing using Drupal nodes
- Explicit experiment model:
- Main Page (entry point)
- Control Page (baseline)
- Alternative Variants (weighted)
- Deterministic user assignment with sticky behavior
- Anonymous and authenticated persistence
- Automatic migration from anonymous to authenticated users
- Experiment lifecycle management (Draft, Active, Paused, Finished)
- Canonical URL handling for SEO-safe delivery
- GA4 / GTM integration via
drupalSettingsanddataLayer/gtag - Admin UI for experiment management and configuration
- Reset assignments with confirmation form
Performance
- Optimized experiment lookup using indexed queries
- Request-level caching for variant resolution
- Cache-aware delivery using a custom cache context (
ab_testing) - Compatible with Drupal Dynamic Page Cache
Reliability
- Deterministic persistence model using database constraints
- Safe handling of missing or misconfigured variants
- Collision detection for conflicting experiment configurations
- Graceful fallback to control page when needed
Developer experience
- Clean service-based architecture
- Fully testable components
- Kernel test coverage for:
- assignment logic
- persistence (anonymous and authenticated users)
- anonymous to authenticated migration
- reset functionality
- paused experiment behavior
- collision scenarios
Notes
- This module is intended for a moderate number of concurrent active experiments.
- GA4 / GTM integration is optional but recommended for analytics tracking.
- No external SaaS dependencies are required.
Future improvements
- Extended reporting capabilities
- Additional integration hooks
- Enhanced editorial UX