Title: Async Code?
Last modified: August 19, 2019

---

# Async Code?

 *  Resolved Anonymous User 14978628
 * (@anonymized-14978628)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/)
 * 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](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11851977)
 * @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)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11852324)
 * 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](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11852343)
 * 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)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11852367)
 * 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](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11852370)
 * Al right. Please share your findings with me! 🙂
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11852567)
 * @martychc23 I added Async support in version 2.6.0 of CAOS! 🙂
 *  Thread Starter Anonymous User 14978628
 * (@anonymized-14978628)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11853027)
 * 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
 *  [politicske](https://wordpress.org/support/users/politicske/)
 * (@politicske)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11857954)
 * 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?
 *  [politicske](https://wordpress.org/support/users/politicske/)
 * (@politicske)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11864299)
 * Just discovered it was a bug with the second last update. Ignore my comment above.
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11864467)
 * [@politicske](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/host-analyticsjs-local/assets/icon-256x256.png?rev=3307068)
 * [CAOS | Host Google Analytics Locally](https://wordpress.org/plugins/host-analyticsjs-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-analyticsjs-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-analyticsjs-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-analyticsjs-local/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/async-code/#post-11864467)
 * Status: resolved