It's been a long while since I'm trying to set up Google Analytics in my store.
FIRST, there's no tracking code in analytics and that's very annoying because they changed everything and there's no way to use enhanced ecommerce.
SECOND, I added the global site tag to the theme.liquid file and it's working fine, even though there's a lot of gap between Shopify analytics and google analytics.
For example, sometimes people enter and in shopify it says US, and in GA nothing. And concerning countries too there's a lot of countries in Shopify analytics that there isn't on GA.
And I don't know which one to trust.
If anyone knows how to fix this, or a way to use GA using GTM because I tried to install GTM too but I have no clue how to do that.
I figured that out. You create a new account and you create a universal analytics account.
But to get the best out of GA and GA4 you can create both and then create a new data stream for the GA4 property and link that using the global site tag.
Once it's done you need to link your GAUA to your Shopify by copying your Tracking ID.
Admin > Tracking Info > Tracking Code
You can add your GTM code snippet there.
Now I can get a lot of data from GAUA and GA4 and it's awesome