ImproveAB: A/B Testing 1.0.0 has 9 actions and 12 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when ImproveAB: A/B Testing fires an action
add_action( 'improveab_event_recorded', function( $test_id, $arg2, $inserted ) {
// Your code runs here.
}, 10, 3 );
// Change a value ImproveAB: A/B Testing is about to use
add_filter( 'improveab_enabled', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Allow sites to disable the front-end runtime, e.g. to gate it behind their * own consent-management logic. Return false to skip output. */ apply_filters( 'improveab_enabled', true ); -
/** * Fires after a tracking event has passed every validation step and has been * written (or de-duplicated by the unique index). */ do_action( 'improveab_event_recorded', $test_id, array( 'variant' => $variant, 'type' => $type, 'token' => $token, 'segment' => $segment, 'value' => $value, 'url' => $url, 'handoff' => $is_handoff, ), $inserted ); -
/** * Filter the hosts this site trusts as its own: where a cross-domain handoff * arriving here may report back to, and the pages /event accepts events from. * Each entry also covers its subdomains. */ apply_filters( 'improveab_handoff_hosts', array( improveab_root_domain() ) ); -
/** * Filter whether the plugin may purge full-page caches automatically. Return * false to disable and handle `improveab_purge_caches` yourself. */ apply_filters( 'improveab_auto_purge_caches', true, $reason ); -
/** * Filter the client IP used for per-IP rate limiting. */ apply_filters( 'improveab_client_ip', $ip ); -
/** * Filter whether this request is an editor canvas that must carry no visitor * runtime, no hiding and no redirect (a builder this plugin does not * recognise). */ apply_filters( 'improveab_is_editor', $is_editor ); -
/** * Whether to load the runtime on pages with no running test and no handoff in * the URL. Default: whether this site has ever received a cross-domain handoff * (the `improveab_handoff_seen` option). */ apply_filters( 'improveab_load_runtime_always', (bool) get_option( 'improveab_handoff_seen' ) ); -
/** * Fires after the plugin asked page caches to purge. Hook this to purge a CDN * or host cache the plugin does not know about. */ do_action( 'improveab_purge_caches', $reason ); -
/** * Filter the maximum number of events allowed per window per client IP. */ apply_filters( 'improveab_rate_limit', self::RATE_LIMIT ); -
/** * Filter the resolved root domain (e.g. to handle a public suffix the lists do * not know about). */ apply_filters( 'improveab_root_domain', $root, $host ); -
/** * How many summaries one user may email in an hour. */ apply_filters( 'improveab_summary_email_limit', 10 ); -
/** * Fires after a test changed state, for any integration to hook. */ do_action( 'improveab_test_event', $events[ $action ], $updated, array( 'previous_status' => $test['status'], 'winner' => 'winner' === $action ? $winner : '', 'reason' => isset( $data['reason'] ) ? $data['reason'] : 'manual', ) ); -
do_action( 'breeze_clear_all_cache' ); -
do_action( 'cache_enabler_clear_complete_cache' ); -
do_action( 'cloudflare_purge_everything' ); -
apply_filters( 'improveab_goal_types', ImproveAB_Tests::GOAL_TYPES ); -
apply_filters( 'improveab_max_active_tests', 0 ); -
apply_filters( 'improveab_max_variants', ImproveAB_Tests::MAX_VARIANTS ); -
do_action( 'litespeed_purge_all' ); -
do_action( 'rt_nginx_helper_purge_all' ); -
do_action( 'wphb_clear_page_cache' );
Generated from ImproveAB: A/B Testing's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: