A banana being pulled into a computer screen

Universal Analytics will be Dropped in 2 weeks. ⏲️ Here’s what you need to know

A quick update for those of you who are wondering what’s going to happen to CAOS and CAOS Pro on July 1st, when Universal Analytics (Google Analytics 3) will be dropped, and irreversibly replaced with Google Analytics 4.

The releases mentioned in this post have been released today (June 30th). If you get an “undefined constant” error after updating CAOS, make sure you update CAOS Pro right afterwards. If an update isn’t available in your admin screen, read this.

I had a lot of exciting new improvements planned for this release, but they’ll have to move as my time has been limited lately for several reasons:

  • By the end of April, our host parent was taken into the hospital with what later appeared to be cancer. Since she couldn’t take of our daughters anymore for the 4 days we hired her, I was left to take over, while we searched for a new host parent.
  • By the end of May, we found one! 🎉 She only had room for my oldest daughter, Emma. So, we figured that my mother would watch our youngest, Julia, for 2 days a week. So I could work.
  • But, a week ago, my mother was taken into the hospital, due to failing heart valves. Fortunately, she’s in good care, and she’s doing well.

As you can understand, all this has been taking up quite a lot of my time. Which explains the complete lack of updates, plugin- and blogwise.

So, what’s on the menu for CAOS and CAOS Pro before July 1st? Let’s see…

Reduced Database Reads

Before we head into the Google Analytics-specific changes, I want to share an improvement with you that I’m very excited about.

I’ve been making changes to how CAOS and CAOS Pro fetch settings from the database. Before, each option was stored in its own separate row in the wp_options table.

Now, all options are stored in one database row and are cached in the frontend upon pageload. Meaning, that all options only have to be fetched from the database once! Resulting in 99% less database reads on each pageload!

This is a massive performance increase.

Stealth Mode now always uses the WordPress API

Till now, CAOS Pro has always had two Stealth Modes; Default (WordPress API) and Super Stealth, which was faster, because it used a custom built PHP library and was executed outside of WordPress.

I built that custom PHP library, called Super Stealth, to work around the fact that the WordPress API can be terifyingly slow if you have a lot of plugins installed.

But, Super Stealth appeared to have some drawbacks as well, the biggest one being that some hosts don’t allow direct PHP execution from the /uploads/-folder. Resulting in a lot of support tickets and this troubleshooting guide.

Recently, thanks to a very helpful Twitter-friend — I’m unable to find the Tweet, sorry about that — I was able to find a very suitable solution to this issue.

Since the WordPress API is more reliable, what needed to be done is speed it up. And my Twitter-friend came up with a way to disable all active plugins only when our WordPress API endpoint is requested!

Granted, it’s a bit slower compared to Super Stealth (100-200ms as opposed to 50-100ms), but it’s a lot more reliable.

So, as of v2.4.0, CAOS Pro’s Stealth Mode option will be reduced to a checkbox and will always use the WordPress API.

Now, on to the matters at hand…

R.I.P. Universal Analytics

As of July 1st, Universal Analytics is no more. Depending on your beliefs: it’ll move on to greener pastures, become one with the wind, or it’s simply in a better place now.

For CAOS this means that its codebase is going to shrink quite a bit! Here’s a list of features, currently available in CAOS, that’ll either change, or disappear of the face of the earth… forever:

  • Google Analytics Tracking ID will become Google Analytics Measurement ID,
  • Enable Dual Tracking will be dropped, because, well, duh
  • Allow Tracking will undergo some changes. Since Google Analytics 4 uses consent_mode and I’m expecting Cookie Banner plugins to all support that, I’m guessing only the When Consent mode’s analytics_storage is updated to “granted” by 3rd party plugin option will remain. But if you have any other ideas about this, feel free to leave a comment!
  • Adjusted Bounce Rate will be removed as it is now a native option in GA4 known as Adjusted Time for Engaged Sessions. It can be found in your GA Dashboard > Admin > (select property) > Data Streams > (select stream) > Configure Tag Settings > Show All.
  • Default and Minimal Analytics will be dropped from the Tracking Code option. Asynchronous will be the new default.
  • Download File will disappear, and gtag.js will always be used.
  • Cookieless Analytics might undergo a name change, since GA4 only uses first-party cookies and there’s no cookieless alternative. Its functioning for GA4 will remain the same: generate a random UUID for each visitor of your website to ensure that tracking across different websites/platforms is no longer possible.
  • Session expiry period will be removed, because this is now a native feature in GA4. Modify it by going to your GA Dashboard > Admin > (select property) > Data Streams > (select stream) > Configure Tag Settings > Show All > Adjust Session Timeout.
  • Site Speed Sample Rate will be removed, because this is no longer supported in GA4. Read this if you want to get your speed metrics back in GA4.
  • All extensions, installed by default will be removed, since they are no longer supported in GA4:
    • Capture Outbound Links: this is now a native option in GA4, and can be enabled by going to your GA Dashboard > Admin > (select property) > Data Streams > (select stream) > activate Enhanced Measurement > Gear icon > Enable Outbound Clicks.
    • Track Ad Blockers
    • Enhanced Link Attribution

One more feature that’ll be removed is the Plausible Analytics integration. I’ve been hired by the Plausible Analytics team to work on their plugin, so to prevent duplicate work for me, I decided to remove it from CAOS and focus it fully on Google Analytics 4.

Rounding Up

As you can see, there’s quite a lot of change on the horizon!

I’ll try to release an intermediate update this week, or early next week, which will clearly mark all the above mentioned options as deprecated and remind you to change your settings. Then, on June 30th, I’ll release the definite update containing all the changes.

Also, I’ll make sure it’ll clean up nicely and no old settings will be lingering in your database.

As they used to say when I was a boy scout:

A good dev always cleans up after himself.

Or, I don’t know, I’ve never been a boy scout.

❤️ it? Share it!

1 thought on “Universal Analytics will be Dropped in 2 weeks. ⏲️ Here’s what you need to know”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Shopping Cart
  • Your cart is empty.