Title: Pull the analytics.js script from CDN
Last modified: December 13, 2018

---

# Pull the analytics.js script from CDN

 *  Resolved [relle](https://wordpress.org/support/users/relle/)
 * (@relle)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/)
 * Hello,
 * I’m using the following plugin [https://wordpress.org/plugins/host-analyticsjs-local/](https://wordpress.org/plugins/host-analyticsjs-local/)
   to host Google’s analytics.js locally.
 * My GTMetrix performance report tells me:
 * There is 1 static component that is not on CDN
    [https://mywebsite.com/wp-content/cache/caos-analytics/analytics.js](https://mywebsite.com/wp-content/cache/caos-analytics/analytics.js)
 * How do I add analytics.js to my CDN?
 * Please advise, thank you!

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

 *  [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * (@stanleylitespeed)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/#post-10984891)
 * Hi [@relle](https://wordpress.org/support/users/relle/), Have you already put
   the resources to your CDN? If yes you go to LiteSpeed Cache > Settinn > CDN to
   set you CDN path for serving the file.
 *  Thread Starter [relle](https://wordpress.org/support/users/relle/)
 * (@relle)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/#post-10986075)
 * Hi,
 * I only see the ‘Exclude Path’. Am I missing something?
 * I enabled CDN and add my CDN URL. And all my static files are served over CDN
   except for the Google Analytics’ analytics.js file.
 * Thanks!
 *  [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * (@stanleylitespeed)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/#post-10988249)
 * Hi [@relle](https://wordpress.org/support/users/relle/), could you please provide
   your Report Number, you can found it in WP Admin > LiteSpeed Cache > Report.
 *  Thread Starter [relle](https://wordpress.org/support/users/relle/)
 * (@relle)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/#post-10988469)
 * Hi,
 * Report number: FNKCPZPM
 * Thanks for your help.
 *  [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * (@stanleylitespeed)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/#post-10994226)
 * Hi [@relle](https://wordpress.org/support/users/relle/), we found that the analytics.
   js is inserted by JS code (which you can check from the response on inspector
   > network) and our plugin is not handling rewrite CDN under JS script.
 * You may need to check with your GA plugin provider or update your code for inserting
   you script by CDN.

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

The topic ‘Pull the analytics.js script from CDN’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/pull-the-analytics-js-script-from-cdn/#post-10994226)
 * Status: resolved