There are two solutions depending on the situation.
Situation 1
If you have Enhanced E-commerce set up in Universal Analytics (GA3), which is transmitted through the Data Layer and configured in GTM, and you do not want to re-write the TOR for programmers for a separate data transfer to the DataLayer, then all you what you need is to adapt the parameters from Data Layer GA3 to the structure of Google Analytics 4 (GA4).
There are quite a few instructions on this topic, just type a typical query into Google, and the search engine will give you useful articles and videos.
The only recommendation from us. Since GA4 contains more events and parameters for e-commerce (for example, the add_to_wishlist event), we advise you to study them further and separately add those that are not in GA3 (if necessary).
Situation 2
- You have a non-enhanced ecommerce set up in Universal Analytics (GA3) that is passed through the Data Layer and set up in Google Tag Manager.
- You have Enhanced Ecommerce set up in Universal Analytics (GA3), which is passed through the Data Layer and set up in GTM, but not completely (let's say not all parameters are passed).
- You want to set up a new Datalayer for GA4 and do everything more correctly without a crutch method by adapting the parameters from the GA3 Data Layer to the GA structure.
Problem
When you try to set up new GA4 events through the Datalayer, you will have a collision, because GA3 and GA4 e-commerce events have the same timings, but different structure. When you try to set everything up according to the documentation from sites or Google, you will have duplicate events, and with the wrong structure for both GA3 and GA4.
An example of this problem in the Google documentation:
https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm
Event in GA3:

Event in GA4:

As we can see, the names of the events are the same, but the structure of the DataLayer is different.
Solution
The solution is quite simple, but it will allow you to correctly use the DataLayer in the desired structure for GA3 and for GA4.
1. It is assumed that the events in the new Datalayer structure will be configured for GA4, since GA3 is already configured. Therefore, when creating a DataLayer at the end of a new event under GA4, describe {eventname}_ga4. This condition must be specified for all events in the terms of reference for setting up e-commerce under GA4.
Example: at the Purchase event
Instead of:
dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
dataLayer.push({
event: "purchase",
ecommerce: {
…………..
We do:
dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
dataLayer.push({
event: "purchase_ga4",
ecommerce: {
…………..
2. In the trigger in GTM, set up a new custom event for {eventname}_ga4. Below is a screenshot using the purchase_ga4 event as an example.

3. In the tag settings, we specify our trigger, but in the event name for GA4 we already write the correct name from the documentation (that is, eventname without _ga4).
Below is a screenshot using the purchase_ga4 event as an example.

4. We do this with every event. As a result, our DataLayer for GA4 will be formed with the correct structure and our eventname, which will not fall into Universal Analytics. At the tag level, we leave the event we need, extract the necessary variables from it, and then pass the correct eventname to GA4. Thus, we avoid conflict between Universal Analytics and GA4.
In conclusion, we recommend that everyone switch to e-commerce on Google Analytics 4 as soon as possible, because:
- Google until the end of 2022 Google will stop supporting GA3 and you will lose analytics and optimization for ad campaigns.
- GA4 is the next generation cross-platform Google counter, which has a better tracking option, advanced functionality (although not yet in the usual reports).
If you have any questions - write, we will always help. Successful setup and high conversions!
GIX Web Analyst Vadim Smolkin