PHP code example of xwp / site-performance-tracker
1. Go to this page and download the library: Download xwp/site-performance-tracker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xwp / site-performance-tracker example snippets
add_theme_support( 'site_performance_tracker_vitals', array(
'ga4_id' => 'G-XXXXXXXXXX',
) );
add_filter( 'site_performance_tracker_chance', function() {
return 0.05;
} );
add_filter( 'site_performance_tracker_disabled', '__return_true' );
add_filter( 'site_performance_tracker_web_vitals_delay', function() {
return 1000;
} );