To connect Google Analytics to Shopify, first you need to create a Google Analytics account. Once your account is created, copy your unique "global site tag" that Google Analytics generates and plug it in to your Shopify settings page. Each of these steps is explained in detail below.
Step 1: Create your Google Analytics account
- Go to the Google Analytics website.
- Create a new account by clicking Sign Up
- Fill out the sign up form. Make sure to choose to track a website and fill in the website URL with the exact URL of your Shopify store. Then click Get Tracking ID to finish the account creation.
Step 2: Connect Google Analytics to Shopify
- In your Google Analytics dashboard navigate to Admin > Property > Tracking Info > Tracking Code
- On the tracking code page you will see a text box that contains the Global Site Tag . Copy all of the text in the textbox to your clipboard.
- Go to the Shopify Admin website. Then navigate to Online Store > Preferences
- In the Google Analytics section, paste your global site tag in the Google Analytics account field:
- Click Save to save this change.
Step 3: Enable E-Commerce tracking
- In your Google Analytics dashboard navigate to Admin > View > Ecommerce Settings
- Click the Enable Ecommerce button to toggle it from OFF to ON.
- Click the Enable Enhanced Ecommerce Reporting button to toggle it from OFF to ON.
- Go to the Shopify Admin website. Then navigate to Online Store > Preferences
- In the Google Analytics section, click the Use Enhanced Ecommerce checkbox
Step 4: Test that your connection worked
- Go to the Google Analytics website.
- Go to the Real Time > Overview page and notice that right now there should be 0 active users on your site. (If you see more than zero users, then congrats your set up is working and you can skip the rest of the steps!)
- In a new browser window, load up the homepage of your Shopify store.
- In the Google Analytics realtime window you should now see 1 active user on your site (you!).
Getting the most out of Google Analytics
Exclude your own IP address
- Run a google search for Whats my ip , and copy that number down.
- In your Google Analytics dashboard navigate to Admin > View > Filters
- Click Add Filter and make a new filter that excludes traffic from your IP address
Exclude certain Referrer domains
There are some sources that you don't want included in your referral traffic reports. If a customer enters the checkout and then returns to your online store to continue shopping, then the checkout page might be listed as a source.
To filter this traffic out follow the steps below.
- In your Google Analytics dashboard navigate to Admin > Property > Tracking Info > Referral Exclusion List
- Click the Add Referral Exclusion button to add an exclusion for each of the following domains
- The domain name of your store (MikesFlowers.com)
- The checkout domain (checkout.shopify.com)
- Any external payment providers domains (such as paypal.com)