Upgrade Matrix from Universal Analytics (UA) to Google Analytics 4
Google announced that its next-generation analytics platform, Google Analytics 4 (GA4), will replace the Universal Analytics (UA) properties on July 1, 2023.
After this date, Google will stop supporting the existing UA properties, and no further information will be passed through the property. If your Matrix instance is configured with UA properties, these properties must be transitioned to the new GA4 platform.
Watch this video to see this how-to guide in action.
Before you start
-
If you know that Google Analytics has transitioned your UA property to GA4, you can jump to the Get the GA4 data stream code snippet steps and start here.
-
The person performing these steps must be a GA Resource Administrator
Steps
Convert your UA property to a GA4 property
GA may have already transitioned your UA property to GA4. If this applies to you, skip this step and continue to Get the GA4 data stream code snippet. |
To convert your UA property:
-
Load the Google Analytics dashboard and sign in with the appropriate Google account credentials.
-
Select the analytics project you use to track your Content Mangement site.
-
Select to open the Admin options.
-
Select GA4 Setup Assistant.
-
From the panel, select Get started.
-
From the dialog box, select Create property.
-
After creating the property, select Go to your GA4 property.
-
On the Setup Assistant screen, select Data streams.
-
Expand the property and verify that the Stream details section is connected to the domain serving your Content Management site.
You have now migrated your UA property to a GA4 property.
Get the GA4 data stream code snippet
To get the GA4 <script>
snippet for your website:
-
Load the Google Analytics dashboard and sign in with the appropriate Google account credentials.
-
Select the GA4 project you set up in the previous section.
-
Select to open the Admin options.
-
Select
to load the settings page. -
From the Google tag section, select View tag instructions.
-
Copy the
<script>
code snippet to the clipboard.
You can now open the design parse file for your site and add the code snippet.
Locate the <head> nest content design customization
The way to include the GA4 code snippet into a Matrix site is to add the <script>
snippet into the <head>
of your Design Parse file.
The Design parse file is typically located in the following menu structure (with the asset type in brackets to help you with discovery).
.
<!DOCTYPE html>
<!--@@ =============== Frontend Design Start =============== @@-->
<html lang="en">
<head>
<mysource_area id_name="head" design_area="nest_content" cache="1"/> (1)
</head>
...
</html>
1 | If you see this declaration in your parse file, your Matrix site implementation uses a Design Customization asset with Nest Content Design Customisations. |
Before you proceed to Add the code snippet to your Matrix site, you need to locate the Nest Content Design Customization, which may differ based on how your site was implemented.
To locate the design customization that contains the head includes:
-
Navigate to the website you are tracking in GA4, and append
/_admin
to load the Matrix admin UI. -
Locate the main Design asset for your site.
-
Expand the Design asset structure in the asset tree to show the Design Customization.
-
From the Details screen of the Design Customization, scroll down to the Design areas section.
-
Look for a design area named "head" or "header" and click the asset name to load the design area.
-
In the "head" design area Details screen, scroll down to the Link section.
-
Use the to locate the nested asset in the asset tree.
Nested assets are usually a Standard Page asset that uses a Code component to hold the child elements of the <head>
element. -
Open the Content screen of the nested Standard Page asset, and check whether the code component contains the Google Analytics
<script>
tag.
Now that you have located the design area, you can now Add the code snippet to your Matrix site.
Add the code snippet to your Matrix site
Add the GA4 snippet into your site’s design so each page gets the tracking snippet added in its <head>
HTML tag.
-
Paste the GA4
<script>
code snippet you copied in the Get the GA4 data stream code snippet step into the<head>
area you located in the Locate the <head> nest content design customization step.If you already have a Google Analytics <script>
snippet in this area, you can delete the old code and paste the new code into the same area. -
Select Save
-
Verify that the asset is Published and not set to Draft status.