Insights from Google PageSpeed icon
Performance & Caching

Insights from Google PageSpeed hooks reference

  • By Matt Keys
  • v5.0.0
  • Updated

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.

functions.phpyour child theme
// 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

  • classes/class-GPI-Data.php line 596 · used in 8 places
    apply_filters( 'gpi_check_status', false );
  • run_gpi

    action
    classes/class-GPI-Core.php line 351 · used in 6 places
    do_action( 'run_gpi', self::$force_recheck_urls, true, false );
  • classes/class-GPI-Admin.php line 180 · used in 3 places
    do_action( 'gpi_update_option', 'new_activation_message', false, 'gpagespeedi_options' );
  • classes/class-GPI-Admin.php line 63
    do_action( 'gpi_addon_upgrade_check' );
  • classes/class-GPI-Pagespeed-API.php line 39
    apply_filters( 'GPI_audits_to_skip', array( 'metrics', 'network-requests', 'main-thread-tasks' ) );
  • classes/class-GPI-Pagespeed-API.php line 45
    apply_filters( 'GPI_categories', array( 'performance', 'accessibility', 'best-practices', 'seo', 'agentic-browsing' ) );
  • classes/class-GPI-Data.php line 518
    apply_filters( 'gpi_image_audit_keys', array( 'uses-optimized-images', 'uses-webp-images', 'modern-image-formats', 'image-delivery-insight' ) );
  • classes/class-GPI-Pagespeed-API.php line 32
    apply_filters( 'GPI_lab_data_indexes', array( 'first-contentful-paint', 'largest-contentful-paint', 'total-blocking-time', 'cumulative-layout-shift', 'speed-index' ) );
  • classes/class-GPI-Pagespeed-API.php line 71
    apply_filters( 'GPI_remote_get_timeout', 300 );
  • classes/class-GPI-Data.php line 121
    apply_filters( 'gpi_rest_filter_options', $filters, $options );
  • classes/class-GPI-Core.php line 100
    apply_filters( 'gpi_score_history_days', 365 );
  • classes/class-GPI-Data.php line 1424
    do_action( 'gpi_truncate_custom_tables' );
  • classes/class-GPI-Core.php line 186
    apply_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: