Insights from Google PageSpeed 5.0.0 has 4 actions and 9 filters, read directly from its source code on Nov 17, 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 Insights from Google PageSpeed fires an action
add_action( 'run_gpi', function( $arg1, $arg2, $arg3 ) {
// Your code runs here.
}, 10, 3 );
// Change a value Insights from Google PageSpeed is about to use
add_filter( 'gpi_check_status', 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
-
gpi_check_status
filterapply_filters( 'gpi_check_status', false ); -
run_gpi
actiondo_action( 'run_gpi', self::$force_recheck_urls, true, false ); -
gpi_update_option
actiondo_action( 'gpi_update_option', 'new_activation_message', false, 'gpagespeedi_options' ); -
gpi_addon_upgrade_check
actiondo_action( 'gpi_addon_upgrade_check' ); -
GPI_audits_to_skip
filterapply_filters( 'GPI_audits_to_skip', array( 'metrics', 'network-requests', 'main-thread-tasks' ) ); -
GPI_categories
filterapply_filters( 'GPI_categories', array( 'performance', 'accessibility', 'best-practices', 'seo', 'agentic-browsing' ) ); -
gpi_image_audit_keys
filterapply_filters( 'gpi_image_audit_keys', array( 'uses-optimized-images', 'uses-webp-images', 'modern-image-formats', 'image-delivery-insight' ) ); -
GPI_lab_data_indexes
filterapply_filters( 'GPI_lab_data_indexes', array( 'first-contentful-paint', 'largest-contentful-paint', 'total-blocking-time', 'cumulative-layout-shift', 'speed-index' ) ); -
GPI_remote_get_timeout
filterapply_filters( 'GPI_remote_get_timeout', 300 ); -
gpi_rest_filter_options
filterapply_filters( 'gpi_rest_filter_options', $filters, $options ); -
gpi_score_history_days
filterapply_filters( 'gpi_score_history_days', 365 ); -
gpi_truncate_custom_tables
actiondo_action( 'gpi_truncate_custom_tables' ); -
https_local_ssl_verify
filterapply_filters( 'https_local_ssl_verify', true );
Generated from Insights from Google PageSpeed's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: