How To Set Up & Add Google G4 Tag For A Shopify Store
How To Set up Google Pixels and IDs for Shopify
I hate to give the bad news, but Google Analytics is retiring on July 1, 2023, and getting replaced by a new version called GA4 (Google Analytics 4).
All Shopify stores must move to GA4; otherwise, they will lose important customer analytics data.
In today's digital age, data is crucial for business success. You need to know what's working and what's not so that you can make informed decisions about your digital marketing strategy. That's why setting up and using the right tools to track your website's performance is essential.
This article will cover how to set up and use pixels and IDs, analytics, and Google Search Console (GSC), and Google Merchant Account.
Pixels and IDs are tracking codes that allow you to collect data on user behavior on your website. With this information, you can create targeted advertising campaigns and optimize your website for better performance.
GOOGLE ANALYTICS G4 TAG
Your Google Analytics Tag is a tracking code in Shopify. Google Analytics lets you measure your advertising ROI as well as track your Flash, video, and social networking sites and applications.
A Google Tag you will create in Google Analytics to track your website traffic and so much more.
Why do we need Google Analytics?
1. It is free. (I love saying that)
2. You can see how people are finding you.
3. You need to understand:
4. What visitors are doing on your website.
5. Why visitors are bouncing off your site.
6. Where they are clicking once on your site.
7. Understand who your customer is - gender, demographic, interest, age, location.
8. See what social platforms they are engaging from.
9. Understanding what type of content and information your visitors need.
Step 1. Create or Connect To Google Account
To start, you have to create a Google Account. This will also give you access to all Google services, like Google Ads, Google Search Console, Google Local, Google My Business, etc.
If you don’t have a Google Account, start by creating an account with either a Gmail address or your business email address. If you have a Google account already, log in with your account. Your Gmail account will connect with all your Google services.
[3.7.1]
Step 2. Connect to Google Search Console
The first action is Google Search Console - https://search.google.com/search-console/about. Or just search on Google, and it will pop up.
This is to verify your site, create a sitemap for Google to index all your pages, and keep indexing in the future. Then we will connect this to Google Analytics account.
Once in Google Search Console, you will create a property and follow the prompts. Name your account (I always use the domain name) and add your website.
Alternatively, if you already have a Google Search Console account, click on your website URL in the top left-hand corner and select ADD A PROPERTY.
You need to add all 4 variations of your website:
[3.7.6]
Copy the string of code as shown in the following image.
[3.7.7]
This string of text needs to be added to your DNS setting in your domain hosting account whether it is Shopify or a third-part domain host like Godaddy. I will show you how to do it when you have a domain registered with Shopify.
DO NOT CLOSE THE WINDOW. We will be back to verify your domain.
Next, in your Shopify dashboard, navigate to ‘Settings’ and ‘Domains’.
[3.7.7a]
Click on the main domain you registered with Shopify, then click on ‘Domain settings’ in the top right corner of the ‘Settings’ dashboard.
[3.7.7b]
Now, click on ‘Edit DNS settings’ and a whole range of information will pop up.
Click on ‘Add custom record’ and choose to the ’TXT record’.
[3.7.7c]
The ‘Add a TXT record’ box will pop up, and now you can add the string of text you copied from the Google Search Console prompt.
First, add an ‘@‘sign in the first box under ‘Name’, then add the string of text in the second box under ’TXT value’. The information. will be added to the right place and confirm.
[3.7.7d]
Wait for about 30 minutes and then navigate back to Google Search Console and verify your information.
Step 3. Register your site map.
Shopify says: "All Shopify stores automatically generate a sitemap.xml file that contains links to all your products, product images, pages, collections, and blog posts. This file is used by search engines like Google and Bing to index your site so that your store's pages appear in search results. Submitting your sitemap files to Google Search Console helps Google find and index pages on your site."
In Google Search Console, click on 'Sitemaps' and add your full URL - https://domainname.com/ and add 'sitemap.xml'.
So it will look like this: https://domainname.com/sitemap.xml
[3.7.7e]
Crawling and indexing your site can take time, and Google doesn't guarantee how long it will take.
Step 4. Create a Google Analytics Account
The first step in setting up a Google G4 tag is to create a Google Analytics account. If you already have one, you can skip this step. To create an account, go to the Google Analytics homepage and sign in with your Google account. Once you're signed in, click on the "Start for free" button and follow the prompts to create your account.
You are already logged into your Google accounts so you will either automatically be transferred to a Google Analytics dashboard or you will need to confirm you Google account.
Now you can create a Google Tag for your website.
Again, follow the prompts.
In Account settings, once you have added the information for your name and website, accept the terms (otherwise you get a big red ‘action’ sticker).
[3.15.1]
New Account Name = Add your domain name
[3.15.2]
1. Set up a Property
Once you have created your Google Analytics account, you need to set up a property for your Shopify store. To do this, click on the "Admin" button at the bottom left-hand side of the screen. Under the "Property" section, click on the "Create Property" button and follow the prompts to create your property.
Property Name = Add your domain name
2. Choose the correct time zone for your location.
[3.15.3]
3. Choose the category of your business from the dropdown selection and your business size.
4. Choose what type of reports you want.
[3.15.4]
Google Analytics Terms of Service = Accept.
Now you start collecting data.
This will be for your website/store, so choose ‘Website’.
[3.15.5]
5. Add your domain name as indicated in the text box and also name your data stream. I always add the website name for each different website.
Installation instructions for your Google tag will be shown in this window. For Shopify, you will choose the ‘Install manually’ option. Copy your tracking code.
[3.15.6]
This will track your basic Ecommerce tracking, which is transactions and revenue data.
If you cannot find your tracking code, navigate to ‘Web stream details’, and Google will give you a prompt to find it as shown in the following image.
[3.7.12]
6. Now, navigate back to your Shopify store admin dashboard, to ‘Online store’ and ‘Preferences’. In the ‘Google Analytics’ section, if you have a Google ID (UA-XXXXXX), paste the Google tracking code to the ‘Additional Google Analytics JavaScript’ text box as shown in the next image.
[3.7.16]
7. Now, you have to wait for the data to stream.
This can take 24 to 48 hours/
8. Test the Google G4 Tag
After you have installed the Google G4 tag on your Shopify store, it is essential to test it to ensure it works correctly. To do this, go to your Google Analytics account and navigate to the "Real-time" section. Visit your Shopify store, and you should see data start to appear in your Google Analytics account.
If this is your first time installing a Google G4 Tag or ID, then navigate back to your Shopify store admin dashboard to ‘Online store’ and ‘Preferences’. In the ‘Google Analytics’ section, click the ‘Manage pixel here’.
[3.7.3]
Step 5. Connect Google App to Google Analytics
Remember to have your Shopify Google App installed already.
Now, connect your Google account.
And you will also connect with your Google Analytics property. The Google G4 tag is automatically created so you can connect with it. If it is unavailable, you have not set up the Google G4 tag properly. Go back through the steps to confirm the setup in Google Analytics.
[3..15.7]
The next prompt is the Google Merchant Center account setup. This is not necessary to create for marketing, but it is important to sell more products on Google.
[3..15.8]
The next step is to create the Google Merchant Account. Check out Google steps here.
One more thing!
Check the ‘Use Enhanced Ecommerce’ option in your Shopify Preferences section if it is visible.
[3.7.17]
So now you are done with this part, and once you start getting people to pop into your store, the fun starts, and you can track actions.
There is more detailed information about 'Enhanced Ecommerce' in Google Analytics and 'Custom Conversions' but this is out of the scope of this article.
Tips:
- Use Google Tag Assistant to troubleshoot any issues with your Google G4 tag.
- Set up goals in Google Analytics to track specific actions on your Shopify store, such as completing a purchase or signing up for a newsletter.
- Make sure to keep your Google G4 tag code current and in line with any changes to your Shopify store's design or functionality.
We have created a special package for moving the Shopify store to GA4. We will also give you beautiful automated analytics reports built on GA4.
Leave a comment
Also in eCommerce Success Blog
6 Ways How To Improve Your Ecommerce Store in 2025
By Veronica Jeans, Bestselling Author September 16, 2024
Continue reading
5 Practical Ideas for Achieving Your Goals Daily
By Veronica Jeans, Bestselling Author September 10, 2024
Continue reading
How to Stay Motivated When Business Growth Seems Slow
By Veronica Jeans, Bestselling Author September 10, 2024
Continue reading