• Resolved Anonymous User 14978628

    (@anonymized-14978628)


    Hi, normal insertion of GA (without this plugin) has the js code run async.

    Does the analytics.js file outputted from this plugin run as async js?
    Or perhaps defer loading until after page load?

    thanks

    • This topic was modified 6 years, 9 months ago by Anonymous User 14978628.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    @martychc23,

    You can do this by loading it in the footer. I should however look into how the current implementation is of Google’s snippet, async loading has made some steps forward in the last couple of years.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Do you mean if i load in footer async is automatically activated? Or do i need to add async myself? Thanks

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Well, it’s loaded in the footer. So since it’s not render blocking anymore, async is irrelevant.

    That being said, I’ll look into loading the tracking snippet asynchronous when it’s added to the header. Thanks for the suggestion.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    ok, look forward to seeing what you come up with.

    I’m noticing in lightspeed the analytics.js is taking some time to load and seem to be slowing overall page load speed.

    I need to test whether adding the code manually will improve this.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Al right. Please share your findings with me! 🙂

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    @martychc23 I added Async support in version 2.6.0 of CAOS! 🙂

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Great work!

    Tested speed difference between using your plugin and manual code insertion.

    Plugin is roughly same speed as manual insertion, so doesn’t look like there’s any slowdown to me.

    Thanks

    I use Litespeed too and the code used to appear on yslow telling me to use CDN but now it doesn’t since 2.6.0. Could be the async feature?

    Just discovered it was a bug with the second last update. Ignore my comment above.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    @politicske,

    Can you tell me more about this bug. Or are you talking about the one resolved in 2.6.2?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Async Code?’ is closed to new replies.