ga( ' ga(' google-analytics.com/analytics.js analytics.js gtagv4.js analytics-minimal.js
Google Tag Manager
/gtm.js /gtag/js gtag( /gtm-
*Delaying this too long can impact revenue/data. Test carefully. You will also need to delay the plugin you used to add AdSense (if applicable).
fbevents.js fbq( /busting/facebook-tracking/
Specific Plugins (Only Used When They Load Below The Fold)
To learn the exact files loading on your site, view your third-party code report in PSI:
Both Flying Script and Perfmatters let you set a timeout period in seconds. 5 seconds is a good starting point but if you’re not seeing good results in GTmetrix or PSI, try increasing the number.
WP Rocket does this automatically, so there’s usually no reason to do anything unless there are other JS files you notice aren’t being delayed. In this case, you’ll need another plugin since there’s no option to add JS files in WP Rocket.