I'm making some custom code based on the aforementioned EC Analytics plugin. The idea is the same (observer for the shopping cart/checkout/etc. notifications), however the event names and parameters are different.
Also I'm sending the events to GA server-side, through the Measurement Protocol API available on GA4 (it's still in Alpha, but I haven't experienced any issues so far). This is quite handy because there's no need to "translate" the events to js and then send them through js (especially useful also because I'm making several ajax calls in my ZC store), instead you can send them right away in the same observer class.
You can still use the js approach of course, like the plugin does.



Reply With Quote
