Shopify Google Analytics Set Up
|
Step 1: Exclude IP of anyone who works at the store or on the site! Best Practice: |
Step 1: Exclude IP of anyone who works at the store or on the site.It distorts data. Google search “IP address” to discover your IP address. Inside your Google Analytics, go to “Admin”, and click “Filters”. Create a new filter. Name the filter “Exclude My IP Address”. Select “Custom”, “Exclude”, “IP Address from the drop down, and type your IP address in the “Filter Pattern” field. Save it. Make sure this is not for the original view as you want that untouched.
|
Step 2: Implement Google Analytics tracking pixel in Shopifyi. Login to Google Analytics then click “Admin” at the top and go to “Tracking Info” > “Tracking Code”:
ii. Copy your code that will look something like the below, but with your unique UA ID
iii.Login to your Shopify store and go to “Online Store” > “Preferences”. You’ll see a Google Analytics section:
Paste the Google tracking code you obtained from step 2 of this “Standard Google Analytics Setup” guide, into the “Google Analytics account” field in Shopify. Click “Save”. |
Step 3: Setup Google Analytics Enhanced Ecommerce in ShopifyThe enhanced eCommerce plug-in for analytics.js enables the measurement of user interactions with products on eCommerce websites across the user’s shopping experience, including; product impressions, product clicks, viewing product details, adding a product to a shopping cart, initiating the checkout process, transactions, and refund. https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce i. In Shopify go to “Online Store” > “Preferences”. Click the checkbox for “Use Enhanced eCommerce” then click “Save”:
ii. Go to your Google Analytics account, click “Admin” then “Ecommerce Settings”:
iii. Enable ecommerce and enable related products then click “Next step”:
iv. Enable “Enhanced Ecommerce Reporting” then click “Done”:
v. This last step ensures one analytics session happens across subdomains like a blog, your primary domain, and payment gateway. In the “Admin” section of analytics, click “Tracking Info” then “Referral Exclusion List”. Create new referral exclusions for:
|
Step 4: Create Content GroupsContent groups break your sites content down into collections, pages, blog, check and and homepage to help understand conversion rates, performance and user journey. Login to your analytics then go to “Admin”. Click “Content Grouping” then “+ New Content Grouping”. Go create up to five content groups now for the columns you created in step four. My standard recommendation uses “Group using extraction” with these regular expression rules suited for Shopify:
Create Shopify’s ideal content groups report automatically using this report. Save it (it will be available under customisation > saved reports) |
Step 5: Create Filters to Group Social Referral TrafficInside your Google Analytics, go to “Admin”, and click “Filters”. Create a new filter. Name the filter “Combine Facebook Source URL”. Select “Custom”, “Search and Replace”, “Campaign Source”, and type the following as below: ^.*facebook\.com$
Create 2 new filters for Instagram and Pinterest as below: Search String: ^.*pinterest\.com$ Search String: ^.*instagram\.com$ |
Step 6: Track SearchGo to: Admin > View > View Setting > Scroll down to Site Search Setting
|
Step 7: Track Demographicsi. Go to your Google Analytics account, click “Admin” then “Property Settings”. Ii. Turn on “Enable Demographics and Interest Reports” then save. iii. 3. The last step in analytics is in “Reporting” > “Audience” > “Demographics” > “Overview”. Click “Enable”. See automated custom report for you to save here.
|
Step 8: Create GoalsAt the bare minimum, you should implement a Checkout Complete goal in only a few quick steps: Go to: View > Goals > Goal setup, choose “Custom” > Goal description (Name it: Checkout Complete) > Choose type “Destination” > Click “Continue”.
In ‘Goal details’ choose ‘Regular expressions’ (yes, that’s Regex again because the full URL is different for each visitor but it’s still following a pattern) > Enter the URL of the visitor’s final page visit after making a purchase (leave ‘case sensitive’ unchecked). For your Shopify store it’s the following: \/checkout\/thank_you You can just copy this URL, even if you are not on Shopify Plus. Turn on the ‘funnel’ switch > Add these steps (just copy them too as all Shopify stores have the same URL structure unless you do some customization): Homepage: ^/$
You can check if you entered the destination URL correctly by clicking “Verify this Goal”. If all is good, click “Save”. You can view these as funnel graphs under "Conversions > Goals > Funnel Visualisation":
And also "Conversions > Goals > Goal Flow":
|
Step 9: Exclude BotsGo to admin then “View Settings”. Click to check “Exclude all hits from known bots and spiders” then save:
|
Step 10: Track Logged In UsersWhen someone abandons checkout on their mobile phone and completes their order on desktop, the mobile session should be acknowledged for its assistance to optimize sales. The User ID in Google Analytics unifies any number of sessions for a logged in user. 1. Go to admin, then “Tracking Code” for the property. Click on “User-ID”. 2. Read and comply with Google’s User ID privacy policy and your laws. Google has strict privacy policies in place for the feature to obey laws so follow them. Don’t be ignorant and get your ass bit. Respect people’s privacy and what you may not know about it. Go to the next step. 3. Turn on “Session Unification”. If you have guest checkout in Shopify, this will bring a user’s session data into the User ID when it is created upon account registration. Go to the next step. 4. Create the User ID View:
5. You will be asked to setup a new view. Name it something like “www.yourstore.com – User ID View”. Select your time zone then create. 6. Mimic the settings from your “Filtered View” covered throughout this guide into your “User ID View”. The primary things you want is the enhanced ecommerce tracking, view filters, and view settings. Google Analytics is ready to go. You just need to configure your Shopify. Login to Shopify and add this line of code in the “Additional Google Analytics Javascript” section (below where you added you GA UA tag): if(__st["cid"]) ga('set', '&uid', __st["cid"]); You can view the various cross-device reports under the “Audience” section of analytics. |
Step 11: Identify Organic Search KeywordsSee organic performance leveraging Google Webmaster Tools for Shopify, integrated in analytics. 1. Go to Google Webmaster Tools. Login or signup for an account. 2. Verify your store with Google Webmaster Tools by following Shopify’s documentation. I prefer to verify a store with a file upload to minimize code in the head of pages. You need to setup a redirect when using this method. Remove the query string from the end location of the redirect, which is the file you uploaded, in order for Google to verify. 3. Go to Google Analytics. On the left-side, go to “Acquisition” > “Search Console”. 4. Follow the directions to enable Webmaster Tools in your analytics account. Google may have up to 90 days of data on your store if you just setup Google Search Console. In the queries report, you will see all queries, their impressions, clicks, average position, and click-through rate. Here is a screenshot of an example sites organic performance from a Shopify business:
|



















