Title: Analytics.js not loading
Last modified: February 19, 2021

---

# Analytics.js not loading

 *  Resolved [albie2011](https://wordpress.org/support/users/albie2011/)
 * (@albie2011)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/)
 * We use CAOS with MonsterInsights and it is showing no traffic or minor traffic
   since 2/13/21. We clicked to download analytics.js again and it said it was successful,
   cleared cache, cleared CDN, etc. but when loading and testing via GtMetrix it
   is not showing analytics.js as loading in the waterfall of items as it did in
   the past. Anything we can do to get this working? We do have the compatibility
   setting for MonsterInsights turned on – this was all working fine until 2/13/
   21 according to the data so we think it was a change since then. Also tried to
   exclude analytics.js in the AutoOptimize settings (there was a reference to that
   being a potential issue in another thread) and that did not help. Thanks!
    -  This topic was modified 5 years, 3 months ago by [albie2011](https://wordpress.org/support/users/albie2011/).
    -  This topic was modified 5 years, 3 months ago by [albie2011](https://wordpress.org/support/users/albie2011/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fanalytics-js-not-loading%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [albie2011](https://wordpress.org/support/users/albie2011/)
 * (@albie2011)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14078593)
 * UPDATE 2/20/21: I rolled back to 3.9.0 and that dit not fix the problem and analytics.
   js was still not loading. I then rolled back to 3.8.1 and can confirm that analytics.
   js IS now loading on this site and another affected site. Hope this helps. Waiting
   to see if MonsterInsights will pick up the data as well.
    -  This reply was modified 5 years, 3 months ago by [albie2011](https://wordpress.org/support/users/albie2011/).
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14078603)
 * Hi!
 * That’s weird. Nothing much has changed in how the tracking code is added to the
   page.
 * I’ll have to make a comparison between the two, to see if I’ve missed anything!
 * Thanks for notifying me.
 *  Thread Starter [albie2011](https://wordpress.org/support/users/albie2011/)
 * (@albie2011)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14078626)
 * [@daanvandenbergh](https://wordpress.org/support/users/daanvandenbergh/) You 
   are welcome. To clarify, looking again I now see both sites using 3.8.1 but the
   call is not to the local file – it is calling google-analytics.com to load analytics.
   js – before both were calling the local analytics.js file which then went to 
   our CDN. The other site is gussislaw.com. I also verified both cache folders 
   and do see a fresh analytics.js file in the folders (which I updated after reverting
   to 3.8.1). So I guess I am still having issues on these two sites as the load
   is not local like it was. Not sure what changed on 2/13/21 for the first site
   but didn’t see changes (decrease in page view count) on the second site (gussislaw.
   com) until a day or two ago. The first site (inhouseblog.com) went to basically
   0 tracked page views on 2/13/21.
    -  This reply was modified 5 years, 3 months ago by [albie2011](https://wordpress.org/support/users/albie2011/).
    -  This reply was modified 5 years, 3 months ago by [albie2011](https://wordpress.org/support/users/albie2011/).
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14078631)
 * I’m not sure I understand completely what you mean. Could you provide screenshots
   of your settings and what you tried to illustrate above?
 *  Thread Starter [albie2011](https://wordpress.org/support/users/albie2011/)
 * (@albie2011)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14078650)
 * [@daanvandenbergh](https://wordpress.org/support/users/daanvandenbergh/) on InhouseBlog.
   com I reverted from 3.9.2 to 3.8.1 after tracked traffic went to basically 0 
   on 2/13/21. By reverting to 3.8.1. I am now able to see in GtMetrix that analytics.
   js is loading, but it is loading from Google (not using the local file the plugin
   downloads as it did before) – see GtMetrix result:
 * [https://share.getcloudapp.com/NQuJxnky](https://share.getcloudapp.com/NQuJxnky)
 * For settings on the Extensions tab Safe Mode is enabled and no checkboxes are
   checked. Advanced Settings looks like this:
 * [https://share.getcloudapp.com/bLugxNYn](https://share.getcloudapp.com/bLugxNYn)
 * The CDN is deployed on a DNS basis (StackPath full site integration) so it should
   be pulling the local analytics file and then putting it into the CDN so it is
   loading from our domain. Instead now Google Analytics appears to be working, 
   but it is loading the file from Google.
 *  [tf5_bassist](https://wordpress.org/support/users/tf5_bassist/)
 * (@tf5_bassist)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14081337)
 * It may have to do with the fact that MonsterInsights forced everyone over to 
   Gtag from Analytics.js, and the CAOS setting for MonsterInsights mode was set
   to Analytics.js still.
 * I’ve gone through toggling off all the recently updated plugins during the window
   of 2/9/21-2/12/21 (my traffic plummeted to near-zero on the 11th/12th), and nothing
   caused any change.
 * After disabling MonsterInsights and adding the property tracking code manually,
   I did see that CAOS was involved, and checked the settings. MI compatibility 
   mode was already enabled, but the code method was set to Analytics.js–MI just
   moved away from this for EVERYONE.
 * Turned on Gtag mode and it does appear that all my traffic is now registering
   as expected within Analytics.
 * This may be worth putting some sort of notice out to CAOS users, perhaps with
   a banner notification within Admin (an actual useful one for once lol).
 *  Thread Starter [albie2011](https://wordpress.org/support/users/albie2011/)
 * (@albie2011)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14081936)
 * [@tf5_bassist](https://wordpress.org/support/users/tf5_bassist/) [@daanvandenbergh](https://wordpress.org/support/users/daanvandenbergh/)
   I can confirm that what [@tf5_bassist](https://wordpress.org/support/users/tf5_bassist/)
   did also worked for me. I chose the Gtag (deprecated) option and it downloaded
   the file and the file is now at the CDN as well. I see stats being generated 
   in Monster Insights. So I believe it is working on both my sites now too. I did
   not do Gtag v4 as I haven’t upgraded to that in Google Analytics yet.
 *  [tf5_bassist](https://wordpress.org/support/users/tf5_bassist/)
 * (@tf5_bassist)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14108910)
 * As a follow-up on this, I’ve also noticed that my GA Events data has also flatlined
   as of making this switch. If anyone’s figured out anything related to all this,
   please for the love of god let me know haha.
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14109253)
 * Hi [@tf5_bassist](https://wordpress.org/support/users/tf5_bassist/),
 * Thanks for your message. Could you create a separate ticket for your issue?
 * It seems the main issue here is fixed, and although I do agree that they’re related,
   this thread is becoming a bit cluttered now. 🙂
 * Thanks,
 * Daan

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

The topic ‘Analytics.js not loading’ 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/)

 * 9 replies
 * 3 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/analytics-js-not-loading/#post-14109253)
 * Status: resolved