• Resolved unsustainable

    (@unsustainable)


    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)

    I’m 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: [log in to see the link]

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)

The topic ‘Google Analytics code best practice’ is closed to new replies.