Table of Contents
Although traffic increase can differ per site for different reasons, e.g. a tech blog might receive more visitors with ad blockers activated compared to a fashion blog, there could be several factors at play here. This article lists several causes with ideas on how to identify them.
IMPORTANT: Did you flush your caches?
In lots of cases I’ve seen caching and/or optimization plugins are the culprit. Before wasting your time digging through this troubleshooting guide, please make sure that you’ve flushed any and all caches from JS/CSS optimization/minification and page caching plugins.
If that doesn’t help, check if your server has any PHP (e.g. Varnish) and/or database (e.g. Redis) caching mechanisms activated. Either could be preventing CAOS and/or CAOS Pro’s code from executing properly. When in doubt, contact your hosting provider.
1. CAOS isn’t correctly loaded in the Frontend.
Head to CAOS’ settings screen inside your WordPress admin area and take note of the following things:
At the top of the screen there’s a permanent notice looking like this:
Take note of the two filenames in bold. The first is the original filename, and the 2nd is the obfuscated (renamed) filename.
Now head into your site’s frontend and open up Developer Tools by pressing F12 and click on the Network tab. Now reload the page (any post/page on your site will do) and you should see requests being listed inside the Network tab.
Each browser has a different way of approaching this, but all developer tools allow you to search through the list of requests. Either by filter or by search (CTRL + F on Windows, CMD + F on Mac).
Do a search for the obfuscated filename and see if the filename pops up.
If it exists, CAOS’ files are properly loaded and you can continue to the next chapter. If the file isn’t loaded, then you’ve found the culprit.
If the file isn’t loaded, make sure any files generated by CAOS are excluded from any JS minification/combination plugins you might be using. This works differently in every plugin, but usually you can use wildcards symbols to exclude files stored in CAOS’ cache folder, e.g. *caos*. Make sure to flush the plugin’s caches after excluding the files.
If it’s still not loaded, then your theme must not be implementing wp_head() and/or wp_footer() (depending on the tracking code position you chose) properly.
Set Tracking code position to Add manually and add the tracking code to your theme manually (preferably using a Child Theme).
2. Stealth Mode API isn’t loaded in the Frontend.
Head to CAOS’ settings screen inside your WordPress admin area and take note of the following settings and its values:
- Settings > Optimize Google Analytics > Extensions > Stealth Mode
Obviously, Stealth Mode should be checked.
If all that checks out, head to your site’s frontend, open up Developer Tools (chapter 1 contains steps on how to this) and do a search for stealth.
If no request containing the word “stealth” appears, you’ve found your culprit. If it does, head on to the next chapter.
3. Requests fail when Stealth Mode is enabled.
Status Code 404 – Not Found
This is usually caused by other (security) plugins blocking the WordPress API. You should never block the WordPress API entirely, because WordPress (and other plugins) use a lot of its functionality.
Status Code 50x – Internal Server Error(s)
Any status code higher than 500 indicates that something went wrong on the server while executing the request.
Head into your server PHP (Error) logs, extract any information that might be relevant and send it to me using the contact form.