Popular, but HFCM works and is feature rich.
https://wordpress.org/plugins/insert-headers-and-footers/
Use this to add scripts site wide....this supposedly can handle ecom + google analytics...need to check.
Enable setting in Woocommerce.
https://gtm4wp.com/how-to-articles/how-to-setup-enhanced-ecommerce-tracking
Ideally the below plugin is all you need (HFCM).
https://gtm4wp.com/how-to-articles/how-to-setup-enhanced-ecommerce-tracking
insert-headers-and-footers