Google Analytics Not Detected

If you have enabled either the Google Tracking add-on or the Delay JavaScript Execution option in WP Rocket, and you use an automated tool like GAchecker.com, Google Tag Assistant, or an automated SEO analysis tool, they may report that they cannot find Google Analytics on your website, even though it's there. 

Tools like this typically search the code of your site for a specific word, filename or pattern related to Analytics.

With the above WP Rocket features, the code is changed slightly and the optimized version won't match what the tool is looking for. The code is still there, just not in the specific format they are looking for. So these tools will often product a false result. 

For example, the Google Tracking Add-on replaces the analytics.js file with a different one, using a filename that looks like this:
/ga-53ee95b384d866e8692bb1aef923b763.js

So Tag Assistant and other tools won't recognize this and will show a warning, even though tracking is working correctly:

Check that tracking is working


To verify if the tracking is working (this is the method recommended by Google)

  1. Visit your site while logged out of WordPress.
  2. Open your Google Analytics account
  3. On the left side find the Real Time report. Give it a few seconds and your visit should show up. 

This lets you know the tracking is working and you can ignore the false result. 

Troubleshooting a problem

If visits are not showing up, your next step is to find out which option is related. 

  1. Deactivate the Google Tracking Add-On, and Delay JavaScript Execution, one at a time. 
  2. Then check your Analytics after each, as described above. This will let you identify which option is causing the problem.

Google Tracking Add-On

If the problem is with the Google Tracking Add-On, check if the Analytics code you are using is compatible, by consulting our documentation.

If the code is not compatible, you will have to disable the add-on.

Delay JavaScript Execution

If the problem is with Delay JavaScript Execution, you may exclude Analytics from being delayed by removing the following keywords from the list:

google-analytics.com/analytics.js
ga( '
ga('
/gtag/js
gtag(
/gtm.js
/gtm-

If you need further help, contact our support team.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.