Last Updated / Reviewed: February 1st, 2021
Execution Time:Â ~15-30 minutes
Goal: To add Google Analytics to a Shopify store and verify that it is working properly.
Ideal Outcome:Â Google Analytics is properly added without any technical issues.
Prerequisites or requirements: None.
Why this is important: Google Analytics is the most popular tool to measure website data to gather visitor insights. With it, you will be able to know the amount of traffic you are getting, and how your visitors are behaving inside your
website.
Where this is done: In Shopifyâs Admin Panel and Google Analytics.
When this is done:Â Only onceâthe first time you install Google Analytics.
Who does this: The person responsible for website management, or analytics.
Â
𤿠SOP Update: Google Analytics 4 #
đĄ Note: Google has released a new version of Google Analytics in October 2020, this new version can be set as a property alongside standard version âUniversal Analyticsâ.
The âUniversal Analyticsâ properties will likely be supported by Google for years to come, by setting up a Universal Analytics property alongside a Google Analytics 4 property you can take advantage of the stable and documented features of Universal
Analytics while still future-proofing yourself with a Google Analytics 4 property. This is the scope of this SOP.
To make sure you can follow this step-by-step SOP make sure you have selected the Universal Analytics property once your
Google Analytics account has been created.
- 1. On the top left corner click on the Account Dropdown and select a view within your Universal Analytics property (Not the GA4 property):
đĄ Note: You can identify your Universal Analytics property by noticing the âUA-â prefix in the Property ID below its name:
𤿠Create and set up a Google Analytics Account #
- 1. Go to https://analytics.google.com/
- 2. If you are not logged in to your Google account you will be prompted to log in:
- 3. If you are already logged in to your Google Account but you donât yet have a Google Analytics account, you will want to create one now by pressing âSign Upâ:
- a. Note: Your Google Account can be used for multiple Google services (e.g. Gmail, Adwords, Analytics, etc) but you still have to sign up individually for each service.
- 4. You will now be prompted to fill-in information about your website:
- a. Account Name:
- i. If you want to manage multiple websites under this account you might want to have a name here that applies to all websites.
- ii. If you only have one website you might want to type the name of your website, or your business
- b. Account Data Sharing Settings: Optional data-sharing settings that you can opt-in or out of.
- a. Account Name:
- 5. Click âNextâ
- a. Property Name: Write a name that will easily identify the exact website youâll be tracking. You can even enter the URL of your website If you wish.
- b. Reporting Time Zone: Select the Time Zone that you would like to see being used in your reporting. Usually, this will be the time zone where most of your visitors are located.
- c. Currency: If your website handles transactions, this is where you should select the currency your website uses.
- 6. Click âShow advanced optionsâ (â ď¸ Important Step)
- 7. Click âCreate a Universal Analytics propertyâ and enter the following options:
- a. Website URL: Select the right protocol for your website (http:// or https://):
- i. f you donât know what your websiteâs protocol is type your website URL in Google Chrome starting with âhttps://â (e.g. âhttps://clickminded.comâ)
- 1. If you see a green padlock before the URL appearing, it means you should select âhttps://â
- 2. If instead you see a red padlock and a âNot Secureâ message appearing, you will want to select âhttp://â
- 1. If you see a green padlock before the URL appearing, it means you should select âhttps://â
- i. f you donât know what your websiteâs protocol is type your website URL in Google Chrome starting with âhttps://â (e.g. âhttps://clickminded.comâ)
- b. Create both a Google Analytics 4 and a Universal Analytics property: Select this option.
- i. Enable enhanced measurement for Google Analytics property: Yes
- c. Industry Category / Business Size / How do you intend to use Google Analytics: Select the ones that apply. Donât worry, this will not have a direct impact on your tracking and is an optional field. It is used by Google
to help them improve Google Analytics and compile industry averages.
- a. Website URL: Select the right protocol for your website (http:// or https://):
- 8. Scroll down to the bottom and click on: âCreateâ:
- 9. Read and accept the Terms & Conditions:
- 10. You will be sent to the Google Analytics account youâve just created. On the top left corner select your Universal Analytics property (Not the GA4 property):
đĄ Note: In addition to the âGA4â at the end of the Property name
(indicating the Google Analytics 4 property), you can also identify your Universal Analytics property by noticing the âUA-â prefix in the Property ID below itâs name: - 11. Take note of your Google Universal Analytics tracking ID, you will need it for the next steps. This ID will be a code that starts with âUA-â.
𤿠Adding your first views #
Note: If you have just created your Google Analytics account you will notice you now have one view named âAll Web Site Dataâ. This is alright if you are sure you will not be doing any customizations on your Google Analytics properties.
However, we recommend that you create 3 additional views:
- – Main View: This is your go-to view. This is where you will be doing all your analysis and should be working flawlessly. All customizations to Google Analytics should have already been properly tested in the Staging View as not to affect this viewâs data.
- – Staging View: This is your Google Analytics sandbox. If you want to test something new but are unsure how it will affect your data (e.g: creating a new filter) you will want to do it here and give it a few days before migrating the changes to the Master View.
- – Unfiltered View: This view will be left untouched no matter what. No customizations whatsoever will be done to this view.
With this structure, you will always have a way to recover lost data in case something goes wrong. The unfiltered view will always have all your data. And the âMain Viewâ will have all your filters properly applied.
- 1. Go to your Google Analytics Admin page by clicking here.
- 2. If you have multiple Analytics accounts make sure the right account and property is selected:
- 3. Under âViewâ click on the dropdown box and select âCreate a new viewâ:
- 4. Insert the view details:
- a. Note: Make sure you select the same âReporting Time Zoneâ you have selected for the other views.
- a. Note: Make sure you select the same âReporting Time Zoneâ you have selected for the other views.
- 5. Weâre now going to create the Staging View. To do that, select the âAll Web Site Dataâ from the dropdown. And click on âView Settingsâ:
- 6. Click âCopy Viewâ
- 7. In the âNew view nameâ field type âStaging Viewâ, and click âCopy Viewâ:
- 8. You should now have these 3 views:
- 9. All we need now is to rename the original view and weâll be done. To do it, select the âAll Web Site Dataâ view.
- 10. Click on âView Settingsâ:
- 11. Click on âView Settingsâ and rename the view name that will now be your âMain Viewâ and hit âSaveâ:
- 12. You should now be able to see your first three views:
𤿠Enable E-commerce and Enhanced E-commerce tracking
- 1. Inside your Google Analytics account, on the sidebar, click âAdminâ
- 2. Make sure youâve selected the right Account, Property, and View on the top â Click âE-commerce Settingsâ.
- a. Note: If youâve followed the previous chapters of this SOP you should have now 1 Account, 1 Property, and 3 Views. Remember to first add the new settings to your Staging View. After youâve confirmed everything
is working great, youâll replicate those on your Main View.
- a. Note: If youâve followed the previous chapters of this SOP you should have now 1 Account, 1 Property, and 3 Views. Remember to first add the new settings to your Staging View. After youâve confirmed everything
- 3. Toggle âEnable E-commerceâ and âEnable Enhanced E-commerce Reportingâ:
- 4. Click âSaveâ:
- 5. Thatâs it! Youâll see a âSuccessâ message on the top and your Google Analytics View will now have E-commerce data once you add the Google Analytics code to Shopify.
𤿠Adding the Google Analytics tracking script to your Shopify Store #
- 1. On your Shopify Admin Panel, click âOnline Storeâ â âPreferencesâ â You will find an input box to enter your Google Analytics code:
- 2. Paste your Google Analytics tracking code there, and click âSaveâ;
- a. Note: If you donât know where to find your Google Analytics tracking code, you can find it inside your Google Analytics account by clicking âAdminâ and then âTracking Codeâ.
- 3. Tick âUse Enhanced Ecommerceâ, and click âSaveâ again.
- 4. Thatâs it! Youâre now tracking your Shopify Store with Google Analytics.