Google Analytics Changes 2022/2023

Google is changing how Google Analytics works in summer 2023. Here’s how to make your CMS websites compatible.

About Google Analytics Changes

Google has announced that as of July 1st 2022 their Universal Analytics product will be deprecated. It will be replaced by GA4. If you haven’t migrated your account and your website on CMS, then as of July 1st 2023, you will no longer be collecting analytics data for your website.

Google has outlined the differences between UA and GA4. Additionally, Google has published documentation for migrating from analytics.js to gtag.js.

From the UBC CMS standpoint, you have 2 options.

Both options will allow you to continue collecting analytics data on your UBC CMS-hosted website. Both require you to make changes to your analytics account and your CMS website.

Option 1

Use the Google Tag Manager Plugin

We have installed the GTM4WP onto UBC CMS and made it available for you to activate on your site(s).

Fig 1. Google Tag Manager for WordPress plugin

Option 2

Use the embed code in an HTML Block/Widget in the Header Widget Area

Google have published documentation about the Google Tag Manager product. It’s highly recommended that you read through the documentation in order to understand how to use GTM. The author of the Google Tag Manager for WordPress plugin has also published how-to guides which you may find useful.

After you have migrated your UA account to be a GA4 compatible account, google will provide you with an embed code. Google has published instructions of how to find your embed code.

The embed code will begin with

<!-- Global site tag (gtag.js) - Google Analytics -->

and end with

</script>

Copy all of that code into your clipboard.

On your website add a HTML widget under Appearance > Widgets to the Header widget area (see fig. 2 below) if you don’t see a ‘Header’ widget area, then you need to enable it from Appearance > Theme Options > Layout, and then paste your embed code into this HTML widget. Once saved, you will now be sending data to GA4.

Screenshot of WordPress dashboard widgets screen with the Header widget area highlighted. The header widget area contains a HTML widget with example Google Analytics code.
Fig 2. HTML Widget in the Header Widget Area.