CAOS (Complete Analytics Optimization Suite) for Google Analytics allows you to host analytics.js/gtag.js/ga.js locally and keep it updated using WordPress’ built-in Cron-schedule. Fully automatic!
Whenever you run an analysis of your website on Google Pagespeed Insights, Pingdom or GTMetrix, it’ll tell you to leverage browser cache when you’re using Google Analytics. Because Google has set the cache expiry time to 2 hours. This plugin will get you a higher score on Pagespeed and Pingdom and make your website load faster, because the user’s browser doesn’t have to make a roundtrip to download the file from Google’s external server.
Just install the plugin, enter your Tracking-ID and the plugin adds the necessary Tracking Code for Google Analytics to the header (or footer) of your theme, downloads and saves the analytics.js/ga.js/gtag.js-file to your website’s server and keeps it updated (automagically) using a scheduled script in wp_cron(). CAOS is a set and forget plugin.
Please keep in mind that, although I try to make the configuration of this plugin as easy as possible, the concept of locally hosting a file or optimizing Google Analytics for Pagespeed Insights or GT Metrix has proven to be confusing for some people. If you’re not sure of what your doing, please consult a SEO expert or Webdeveloper to help you with the configuration of this plugin. Or hire me to do it for you.
For more information: How to setup CAOS.
/wp-content/plugins/host-analyticsjs-localdirectory, or install the plugin through the WordPress plugins repository directly.
Maintaining three plugins besides my daily 9-to-5 job is a handful, so no. If you’re looking for a way to host Google Webfonts locally; please install OMGF.. To host other 3rd party scripts and styles locally, try HELL. For WordPress Speed Optimization, check out WoOSH!
This is due to server configuration. Probably a permissions issue. It might be that PHP/WordPress isn’t allowed to create files programmatically. If you can upload media files just fine, then this probably isn’t the issue. Is your cron running? Try clicking the ‘update analytics.js/gtag.js/ga.js’ option to update the file manually. Meanwhile, contact your hosting provider so they can help you figure out if your cron is running correctly.
No, it can’t. The gtm/js (or gtm.js) file is generated using a Client ID, which is unique for each visitor of your site. Saving this file locally would break your A/B tests.
This question has been asked on the support forum lots of times and in ALL cases it was caused by a Full Page Caching plugin, such as WP Fastest Cache or WP Super Cache, or another caching mechanism, such as Varnish. Possibly the page containing the snippet was cached in its entirety, and that cached version is still loading. Try flushing the plugin’s cache and empty your browser’s cache. Then reload the page.
CAOS adds a modified version of the Google Analytics tracking code to your header or footer, depending on your settings. If you’re getting this notification (or optimization suggestion) this means that besides the GA tracking code added by CAOS, you’re also loading a second tracking code somewhere else in your blog. Possibly in your theme’s options or by another Google Analytics plugin. Remove/disable this and you’re good to go.
Yes, it is! It is compatible with all WordPress Cookie Notice plugins which either set a cookie to allow tracking or set a certain value to a cookie to allow tracking. It’s completely customizable!
Yes, this is normal. This browser extensions looks for this exact string ‘www.google-analytics.com/analytics.js’. Because with CAOS you’re hosting it locally, Tag Assistant doesn’t find this string and returns an error. However, you can still use Tag Assistant to verify tracking works.
Yes, it is! CAOS is compatible with several Google Analytics plugins for WooCommerce.
This happens because analytics.js is saved within the ‘cache’-folder and for some reason the cache/minify plugin thinks it should be refreshed. Change the path where analytics.js is saved within CAOS to a path outside the /uploads/ folder (e.g. /uploads/caos/). This should resolve any issues you’re having.
This is perfectly normal, since this is the file that was updated by the built-in cronjob in older versions of CAOS. Update to the latest version and change the path where analytics.js is saved within CAOS to a path which is ignored by your security plugin (e.g. /uploads/ or /cache/). This should resolve any issues you’re having.
I have set it to twice daily, because Google updates the script very often. If you suspect you might’ve gotten behind (which I doubt) Run a manual update button within CAOS’ settings.
Try enabling the option called “Disable all display features functionality?” With this you can enforce the disabling of the DisplayFeatures plugin.
CAOS adds a local file called gtag.js/analytics.js/gtag.js (depending on your choice), which enables you to use Analytics, while hosting the necessary files locally. This doesn’t mean that it scans your entire plugins or themes directory for other manually/programatically added Analytics tracking-code. I.e. If analytics.js or ga.js is still showing up in the list of requests, this mean that something else (probably the theme you’re using or another plugin) is adding this tracking code to your WordPress Install. Find it. Remove it. And let CAOS take care of sending your needed data to Google Analytics.
Yes, you can! Simply add the URL of your CDN within the advanced options and analytics.js/gtag.js/ga.js will be served from your CDN.
Automagically download and update analytics.js/ga.js/gtag.js, bypass Ad Blockers with Stealth Mode, add the tracking code…View Cart
????? ??????? ?????????? ? ????????-???????? ?? Woocommerce. Adds Russian l...
Cookiebot is a cloud-driven solution that automatically controls cookies an...
This plugin inserts social share links at the top or bottom of each post.
WooCommerce AJAX Product Filters - Advanced product filtering ability for y...