A/B Testing for Elementor
A simple free A/B testing tool for Elementor in WordPress
by Melograno Venture Studio · github.com/alexander-gilmanov/ab-testing-for-elementor · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alexander-gilmanov/ab-testing-for-elementor/archive/refs/heads/main.zipRun split-test experiments on any Elementor page — measure what converts.
Requirements
| Requirement | Version |
|---|---|
| PHP | 7.4+ |
| WordPress | 6.4+ |
| Elementor | 3.18+ |
Installation
- Install the plugin (upload zip or copy the plugin folder to
wp-content/plugins/). - Activate from Plugins → Installed Plugins.
The plugin ships with the vendor/ autoloader; end users do not need Composer. Developers: run composer install only when working from source (e.g. after cloning); when building a release zip, include vendor/ so the distributed plugin works without Composer.
Architecture
- PSR-4 autoloading via Composer (
ABTestingForElementor\→src/). - Custom DB tables (
{prefix}abte_experiments,{prefix}abte_impressions,{prefix}abte_conversions,{prefix}abte_session_metrics) for experiments and tracking. - WP_List_Table for the admin list screen.
- Elementor integration loads conditionally — graceful degradation if Elementor is missing.
- Templates in
templates/admin/— HTML is separated from PHP logic; page controllers pass variables andincludethe template. - Cache-aware frontend: full-page tests use a tiny inline script that assigns visitors to control/variant and redirects variant visitors to
?abte_var=1before paint, so hosts can cache both URLs separately.
Product logic
Full specification: docs/PLUGIN_LOGIC.md — test types (section + full-page), variant assignment (cache‑friendly client-side redirect + server-side section routing), conversion goals (URL, form, engagement, CTA click), tracking, results UI, Apply Winner behaviour, settings, and out-of-scope. All implementation follows WordPress Security and the Plugin Handbook.
Current Status
- Full-page A/B test: Create from Elementor editor (floating button) or from A/B Tests → Add New. Variant B is a draft duplicate with noindex; control always lives on the canonical URL and variant is served on the same URL with
?abte_var=1. - Section A/B test: Considered, not supported yet.
- Variant assignment:
- Full-page: client-side cookie + early redirect to
?abte_var=1(cache-friendly, no visible flicker). - Section: Not supported yet, considered: server-side assignment per session/cookie; both variants live in one document, with the loser hidden at render time.
- Full-page: client-side cookie + early redirect to
- Tracking: Lightweight JS (~4KB),
fetch/sendBeaconwhere available; impressions, conversions and session metrics stored in DB; simple caching for active experiments per page. - Conversion goals: URL, form submission via CSS class
abte-cta, engagement (scroll OR time), CTA click via CSS classabte-cta. - Admin: Experiments list (type, status, page, stats, Start/Stop/Apply winner), single experiment results, Settings (traffic split default, future options), New experiment (select page → create full-page test).
- Elementor editor: Floating “A/B Test this page” button (creates experiment, opens variant in a new tab), stats overlay (impressions, conversions, rate, basic significance hint, Apply winner).
- Apply winner: Full page = import winner into original page ID, trash/delete loser. Section = remove loser section from document, complete experiment.
License
GPL v2 or later.