I took over a shop that already had a value in the Google Analytics Tracking ID field. I don't have access to that account so I created a new one but it looks it's not as easy as just copying the new Measurement ID from Google Analytics over to the field in Shopify.
I was repeatedly getting an error message telling me my Google ID was not the right format and had to have an UA at the beginning (this is the OLD version of Universal Analytics which it seems that the NEW Google doesn't reference anywhere.)
So, I'm not sure if it's going to work but after some clicking here and there and reading a bunch of help file threads (the ones from Shopify are outdated and the ones from Google don't reference Shopify), I figured out that this is how you can get it to connect (although I don't know if it actually works, I'll let you know in 24 hours if I actually get any data to pass over).
1) Create a Google Analytics (GA) Account
2) (In GA) Create new property (shop name)
3) Create a new stream (I did a web so I could use my shop URL)
4) On the Web Stream Details page (in GA) scroll down to where it says Additional Settings>Connected Site Tags
5) On the Connected Site Tags page, copy your existing (OLD UA-XXXXX code), add a nickname if you want and choose connect This will then LINK your Shopify account with the UA code on it to the new Google Analytics dashboard (I think)
6) Go back to the Web Stream Details page and click add new on-page tag>Global Site Tag (gtag.js) and copy this code to your clipboard
7) Go to Shopify>Online Store Sales Channel>Preferences (I kept looking in the Settings but apparently that's not where this code lives)
9) SAVE YOUR CHANGES
After all of those steps, I finally stopped getting error messages on the Shopify page at least. I honestly don't have enough traffic to my site to know if this worked (until the day time at least).
If anyone wants to try these steps and let me know if there are any changes or updates needed, please feel free.
That solution should work but not with ecommece features. Google Analytics 4 has amazing reports for ecommerce stores. You need to set up the purchase tag in your checkout page for this to work.
I have announced a free tool & tutorial on this thread if your issue still exists > https://community.shopify.com/c/Ecommerce-Marketing/Introducing-a-Free-Tool-amp-Tutorial-to-Setup-Go...
Here are some of the steps to setup the google analytics 4 for your website:-
Step 1: Log in to Google account and then go to https://analytics.google.com/
Step 2: After completing this click on “Start Measuring” Button.
Step 3: Provide the name of your account here and then click “Next” after providing the name of the company.
Step 4: Provide a “Property Name” in the next stage and select “Reporting Time Zone” and “Currency”.
Step 5: To make a Universal Analytics Property along with GA4 analytics property click on the “Show Advanced Options” in the next step.
Step 6: Switch the toggle from Off to On.
Step 7: Now provide a website URL in the next step and select the option to create either GA4 and Universal Analytics Property or only a Universal Analytics Property. Click “Next” after selecting the appropriate option given in this step.
Step 8: Provide the details “About Your Business” by selecting the option relevant to your business, such as Industry Category, business size, and how you intend to use Google Analytics with your business. Click on the “Create” option after selecting all the interested options to create GA4 and Universal Analytics Property under the new Google Analytics account.
Step 9: Check the relevant boxes to accept the Data Processing Terms as required by GDPR and the Measurement Controller–Controller Data Protection Terms of the data. Now Click “I Accept”.
Step 10: Accepting all the terms will land you on the “Web Stream Details” screen, and here you can find the Measurement ID in the top right corner.