Title: Not Tracking Correctly
Last modified: March 24, 2017

---

# Not Tracking Correctly

 *  Resolved [turkeysforlife](https://wordpress.org/support/users/turkeysforlife/)
 * (@turkeysforlife)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/)
 * Hi,
 * Since yesterday, not all visits seem to be tracking on [http://www.turkeysforlife.com](http://www.turkeysforlife.com).
 * Google Tag Assistant seems to see the code, but turns red and has two error messages:
 * 1) No HTTP response detected
    2) Missing analytics.js script
 * I’m signed out as editor and administator, so that’s not the problem.
 * Any ideas?
 * Thanks!

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

 *  Thread Starter [turkeysforlife](https://wordpress.org/support/users/turkeysforlife/)
 * (@turkeysforlife)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8955046)
 * Update:
 * If I remove ‘Editor’ and ‘Administrator’ from the ‘Ignore these user roles from
   tracking’ settings then the GA code tracks fine when I’m signed into WordPress
   but fails when I’m signed out.
 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8958085)
 * By default MI does not track editors and administrators as you’ve found out.
 * If it’s not tracking logged out users, I’m going to guess from the sound of it
   you have a caching plugin enabled like one of these:
    – Total Cache – Super Cache–
   Rocket Cache – AutoOptimize
 * or use a host that provides built in content caching:
    – WPEngine – Pagely – 
   SiteGround
 * These caches need to be cleared after installing MonsterInsights so that the 
   pages they serve to logged out users include the scripts inserted (as they likely
   last cached the page to serve before the script MI includes would have been output
   on the page)
 * -Chris
 *  Thread Starter [turkeysforlife](https://wordpress.org/support/users/turkeysforlife/)
 * (@turkeysforlife)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8959748)
 * Hi Chris,
 * Yes, I suspected caches too, so it was the first thing I tried. I cleared the
   cache of the plugin we use (WP Fastest Cache) and purged everything from Cloudflare,
   but it didn’t change anything. I still get those two error messages from Google
   Tag Assistant, unless I sign in to WP and then everything is fine.
 * There are also a few js settings in WP Fastest Cache so I tried turning those
   off to test if they could be affecting your plugin – but, again, no change.
 * I’ve also had Monster Insights installed for a long time (even back to when it
   was Yoast) without any problems – until the last two updates.
 * Any other ideas?
 * Thanks,
 * Barry
    -  This reply was modified 9 years, 2 months ago by [turkeysforlife](https://wordpress.org/support/users/turkeysforlife/).
 *  [cjone2](https://wordpress.org/support/users/cjone2/)
 * (@cjone2)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8959944)
 * Have the exact same issue and message displayed in tag assistant.
 * Tracking doesn’t work unless logged in or I enable WP Fastest Cache (clearing
   cache does not help).
 * Both plugins were playing fine together until yesterday when I updated Monster
   Insights.
 * Not sure if relevant but disabling all the JS related options in WP Fastest Cache
   didn’t make a difference.
 *  [cjone2](https://wordpress.org/support/users/cjone2/)
 * (@cjone2)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8966607)
 * As an update this is what the code in the cached version looks like:
 *     ```
       <script data-cfasync="false">// Function to detect opted out users function __gaTrackerIsOptedOut() { return document.cookie.indexOf(disableStr + '=true') > -1; } // Disable tracking if the opt-out cookie exists. var disableStr = 'ga-disable-UA-32348920-1'; if ( __gaTrackerIsOptedOut() ) { window[disableStr] = true; } // Opt-out function function __gaTrackerOptout() { document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; window[disableStr] = true; } (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker'); __gaTracker('create', 'UA-32348920-1', 'auto'); __gaTracker('set', 'forceSSL', true); __gaTracker('require', 'displayfeatures'); __gaTracker('send','pageview');</script>
       <script>
       var monsterinsights_frontend={"js_events_tracking":"true","is_debug_mode":"false","download_extensions":"doc,exe,js,pdf,ppt,tgz,zip,xls","inbound_paths":"","home_url":"http:\/\/space-facts.com","track_download_as":"event","internal_label":"int","hash_tracking":"false"};
       </script>
       ```
   
 * So seemingly triggering some sort of opt out option?
 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8976237)
 * Hi there,
    If you’re using a plugin to do HTML minification you’ll want to disable
   that option. We inadvertently used a non minification safe comment and we’ll 
   be correcting that during an update we scheduled for Wednesday to launch Google
   Optimize & Google AMP tracking.
 * -Chris
 *  Thread Starter [turkeysforlife](https://wordpress.org/support/users/turkeysforlife/)
 * (@turkeysforlife)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8977373)
 * Great, thanks Chris, that’s worked for us. Just a small note, though…with the
   WP Fastest Cache plugin in particular, it seems fine with the ‘Minify HTML’ option
   still selected, but it breaks the GA code if the ‘Minify HTML Plus’ is selected,
   too. So, for us at least it’s just that one setting that needed switching off.
 * Now, I just need to remember to turn it back on after your next update…
 * Cheers,
 * Barry

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

The topic ‘Not Tracking Correctly’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [turkeysforlife](https://wordpress.org/support/users/turkeysforlife/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/not-tracking-correctly/#post-8977373)
 * Status: resolved