Skip to Content
LLM Decode learn.llmdecode.com
Back to all resources
SOP-067

How to add Google Analytics to a Shopify Store

Add Google Analytics to a Shopify store or verify that it is working properly. Understand how your visitors are behaving inside your website

Type SOPs · PDF
Execution time 15-30 minutes
Last updated 16 October 2024
Who does this The person responsible for website management, or analytics
Length 11 pages

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

Why it matters

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

Before you start

If you haven’t created your Google Analytics account, follow SOP 163 (web version) before following this SOP

Key steps 23 steps

What is inside 27 headings

1 Retrieve Google Analytics 4 tracking code 6

  1. Login to your Google Analytics account .
  2. Click “Admin”.
  3. Make sure you’ve selected the correct property (website) and select “Data Streams”.
  4. Select your website that you want to implement Google Analytics 4.
  5. Click on the “Global site tag” to view the Google Analytics 4 tracking code.
  6. Click the copy icon to copy the Google Analytics 4 tracking code.

2 Adding the Google Analytics 4 tracking code to your Shopify Store 5

  1. Login to your Shopify store.
  2. On your Shopify Admin Panel, click 'Online Store' followed by 'Themes'. Then, click on the three dots or kebab menu to reveal the options. Proceed to click 'Edit code'.
  3. Click 'theme.liquid', and paste your Google Analytics 4 tracking code (that you copied earlier) right after '<head>'.
  4. This is what it looks like after you’ve pasted the code. Then, click 'Save'.
  5. Next, go back to your shopify store dashboard and click ‘Preferences’ under ‘Online Store’. Paste your code again in the description box of ‘Google Analytics account’. For existing users, remove your old code and replace it with the new code.

3 Connecting Google Analytics 4 to your Shopify Store 7

  1. Look for ‘Apps’ on the sidebar and click it:
  2. Next, search for google and look for ‘Google channel’.
  3. Click on it to add the app into your shopify store.
  4. Click ‘Add sales channel’ followed by ‘Connect Google account’.
  5. Choose the corresponding email address or account that you have used for your Google Analytics 4 account.
  6. Locate the illustrated box below and click ‘Get started’.
  7. Select a Google Analytics 4 property that you have set up previously, click ‘Connect’ and you‘re done!

4 Verify your setup inside Google Analytics 4 5

  1. To test if the tracking code works, login to your Google Analytics 4 account .
  2. You will be taken to your account dashboard.
  3. Head to the real-time report under Report Real-time
  4. You should see (at least) 1 active user on the website.
  5. Verify the country where the user is from (it should be where you are currently located).

The document 11 pages

The file is locked

It comes with the SOP Library.

Bought from LLM Decode before? Sign in to pay ₹ 1,999.00.

Up next · SOP-068 How to Add Facebook Pixel to a Shopify Store Add the Facebook pixel to your Shopify Store in order to create remarketing audiences and set up conversions for your campaigns that better optimize your ads Unlock to read