We are trying to setup GA4 analytics without removing (at the moment) the previously setup UA, a scenario which is described on the official documentation : [UA→GA4] Send events to both your UA and GA4 properties
Our problem is that specifically for the purchase
event which is a default tag, we see duplicated reports in GA4 Ecommerce Purchases.
I suppose that this might be expected since we push 2 purchase
events to the dataLayer
as described in the following 2 docs for each version respectively:
It seems like the GA4 report is picking up both purchase
events, despite the fact that we use a different model for each event push. So for example in the end we get :
purchase
event with revenue $10.00
on UA
reports,purchase
events with revenue $20.00 on
GA4` reports (which is wrong)Is there any way we can use both UA
and GA4
and be able to remove the duplicate purchase
events on our reports somehow? Tried removing one of the 2 dataLayer push events but then one of the 2 reports (GA4/UA) is missing information.
Well, just make a CJS variable that would parse the event's content and indicate whether this payload has UA or GA4 structure. Then utilize the var as a check right in the GA4 EEC trigger. Actually, I would update the GA3 UA EEC trigger too, just in case it suddenly is able to consume the GA4 object.
But your general approach is sub optimal. How analytics agencies do this kind of job is by reusing the old UA DL pushes and sending the EEC payloads manually rather than through automated DL EEC tracking. As benefits:
Cons:
I can't share my containers, unfortunately, but they look similar to this: https://github.com/gtm-templates-knowit-experience/ga-eec-to-ga4-ecom-converter/blob/main/template.tpl feel free to give it a shot and let us know if it does the trick.