The first thing you need to add Google Analytics in Shopify is a separate Google Analytics account. If you don't have an account, you'll need to sign up, otherwise, sign-in on the Google Analytics page with the account you'd like to use.
You’ll be prompted to enter the website(s) you want to track. Google will then generate a tracking ID, but you’ll have to select your country first. That’s because they need to pull up the appropriate terms of service for you to agree to electronically.
Once you have your Google ID, go back to the Shopify Admin page. Then go to Online Store and Preferences. Here there will be a box for your Google Analytics ID code. Copy/paste the code into this box, and you’ve added Google Analytics to your store!
You will still need to set up the kinds of eCommerce tracking you’d like to see.