Wordpress LScache Plugin: Google Analytics code best practice
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi guys, Looking for suggestions on the best way to add google analytics code, and how to set up Litespeed to increase page speed in regards to it. I have 3 GA codes in my header (UA,GA4, and WebStories) Im failing CWV, and Lighthouse suggests that these codes are a large drain on inital load time. I have Load JS Deferred set to deferred Many thanks The page I need help with: https://www.unsustainablemagazine.com/the-5-rs-of-zero-waste-living/ There is nothing else you can do to improve loading GA scripts. Neither with LiteSpeed cache plugin nor with any other method, but the problem is not GA Analytics itself. Each external request to load especially Javascript has affect on loading behaviour, so the best practice to improve is to remove GA. There are alternatives for GA. Check Matomo Analytics, a free open source analytics tool that is as powerfull as GA that you can host on own server.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference