What to do with the Data Layer now that UA has stopped collecting data?

Written by Sam Dunkley - 22 Aug 2023

Analytics and Data | 3 MIN READ

Do you need clarification about what to do with the data layer now that Universal Analytics no longer exists? You are not alone. Read on and discover what you need to do.

The Data Layer vs dataLayer

Let's clarify the proper term for the data layer and its significance. The data layer is the name for the JavaScript object used by Google Tag Manager to pass information from your website to your Tag Manager container. It plays a crucial role in capturing and transmitting data for analysis.

The 'dataLayer' is the default name given to your data layer by Google. Google Tag Manager assigns the name 'dataLayer' to your data layer.

The Google Tag Manager container snippet specifies the name within the line of code.


You don't have to stick to Google's default name of 'dataLayer,' but there is no compelling reason to change it in most cases.

The Data Layer is not UA, and UA is not the Data Layer

Let's clarify that the data layer and Universal Analytics (UA) serve distinct purposes. We use the data layer to pass information from your website to your Tag Manager container, not straight into UA. This process remains independent of the sunsetting of UA or any other analytics platforms.

Why are we talking about the Data Layer?

Although there is no immediate urgency, there are specific cases where data layer actions might be necessary now UA has sunsetted.

Do you need help optimising Google Tag Manager?

GA4 ecommerce structure

In the context of GA4, the ecommerce structure of the data layer differs from UA. To know if you should act, you should assess whether you already use the data layer to transmit ecommerce information to UA through GTM.

Thankfully, both Google and members of the Analytics community have provided tools and resources to transform a UA data layer into the structure required for GA4. This feature isn't something new with UA sunsetting, and nothing will break now that it has. So immediate action is not required.

However, the new GA4 structure introduces new ecommerce events and parameters that can enhance your reporting capabilities, which were unavailable in UA. It's an excellent opportunity to review your data collection and optimise your reporting setup with GA4 while it is still in its infancy.

Data Layer events built for UA

You may have requested that your data layer be built explicitly for UA for the event category, action, and label reporting structure. However, GA4 has moved away from this structure.

If this applies to your setup, reviewing your data layer is recommended.

GA4 supports the collection of more than three tiers of information for your events, providing better handling and analysis capabilities. You might be missing a trick trying to stick to an event category, action, or label, and instead, you could use your data layer to collect much more valuable data.

If these situations don't apply, relax. There is no action for you to take.

But if you don't use the data layer to collect custom data, you're missing an excellent opportunity to enhance your data collection drastically.

How GA4 Conversion Attribution Really Works

15 Nov 2023

Sam Dunkley

Written by
Sam Dunkley

Time travel in BigQuery and undelete tables

16 Aug 2023

Lace Rogers

Written by
Lace Rogers

What to do with GTM now that UA has stopped collecting data

8 Aug 2023

Sam Dunkley

Written by
Sam Dunkley

Join our email list like thousands of other marketing professionals to get updates on key industry changes, early access to free resources and exclusive invitations to Fresh Egg events in your inbox.