Complete Analytics Optimization Suite (CAOS)

Complete Analytics Optimization Suite (CAOS)

The Complete Analytics Optimization Suite (CAOS, Formerly Known As “Host Analytics.js Local”) is a cool plugin for WordPress. It allows you to fine-tune your websites’ performance by enabling you to self-host Google’s Analytics Javascript file. Optimize analytics by simply entering your tracking ID and let the plugin do the rest! It places the necessary code in your theme’s header (or footer) and downloads the analytics.js file to your server. Then the file is updated automagically using WordPress’ integrated wp_cron() function.

Since version 1.3 the plugin allows you to optionally load the Analytics tracking-code in the footer of your theme. And to optimize your sites’ usage of Google Analytics even further, you can enter an adjusted bounce rate from 0 – 60 seconds.

Since version 1.35 the plugin covers German data-protection laws with the option of adding Anonymize IP-addresses of your visitors. It also adds the default enqueue order of ‘0’, to make sure that it always loads first within the chosen section of the page (header or footer). This option can also be changed in the plugins’ options panel.

How to Optimize Analytics in WordPress?

I get a lot of questions regarding the optimization of WordPress websites. Especially when people use Google’s own Pagespeed Insights they never seem to be able to get a perfect score. How do you leverage browser cache when Google’s very own Analytics.js has it’s expiry time set to 2 hours? How do you minimize DNS requests when Google advices you to copy their tracking code, linking to an externally hosted Javascript file?

If that isn’t bad enough already, Google’s advice is to avoid hosting the JavaScript file locally. And why? To ensure you get access to new features and product updates.

Why should I host analytics.js locally?

The Complete Analytics Optimization Suite for WordPress gives you the best of both worlds. After activation it automagically downloads the latest version of analytics.js from Google’s servers, places the necessary tracking code in your WordPress theme’s header and keeps the local Javascript file up-to-date using an adjusted version of Matthew Horne’s update analytics script and wp_cron(). This way you can minimize DNS requests, leverage browser cache, track your visitors and still follow Google’s recommendation to use the latest features and product updates.

Since version 1.3 the plugin supports more ways to optimize Analytics in WordPress. By loading your tracking code in the footer of your theme, you can eliminate render-blocking Javascript and CSS in above-the-fold content. The usage of adjusted bounce rate allows you to fine-tune your bounce rate for more realistic results.

Click the image below to go to the WordPress Repository and download Complete Analytics Optimization Suite or buy me a beer!