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
How to Keep Your Business Alive in 2025: 10 Rules for Survival
By Veronica Jeans, Shopify Queen & Bestselling Author July 05, 2025
Have you ever considered starting your own business? Or do you have your own business?
You’re not alone. According to the latest U.S. Small Business Administration data, there are over 33 million small businesses in the United States today. With millions of entrepreneurs chasing their dreams, some will inevitably struggle or even fail.
I’ve worked alongside hundreds of small business owners, and I’ve seen it all—the wins, the setbacks, the pivots, and the burnout. But here’s what I believe: Failure doesn’t mean the end. It often sharpens your strategy, strengthens your resilience, and fuels future success. The key is learning how to move through it with clarity, support, and a plan.
According to the latest data from the U.S. Bureau of Labor Statistics, supported by industry insights, approximately 20% of small businesses fail within their first year, and about 33% close within two years. While these numbers have held steady over the past few years, new data specific to eCommerce reveals an even more sobering reality:
Over 80% of Shopify stores fail, most often due to a lack of strategic execution, technical overwhelm, and low conversions, rather than poor products.
Only 10% of Shopify stores reach six-figure annual revenue, highlighting the critical need for clarity, structure, and marketing expertise from the start.
For new business owners, especially in the eCommerce space, the key to success isn’t just having a great idea—it’s about building smart, launching confidently, and making data-driven decisions early on.
Continue reading
Email Marketing for Time-Strapped Store Owners: The Only 3 Automated Sequences You Actually Need
By Veronica Jeans, Bestselling Author June 27, 2025
If you're like most e-commerce store owners I work with, your relationship with email marketing is… complicated.
You know email delivers the highest ROI of any marketing channel—according to Campaign Monitor, email marketing generates 42forevery1 spent. You've probably heard success stories of stores driving 30-40% of their revenue from email.
Yet when you look at your own email marketing efforts, you might feel like you're barely scratching the surface of what's possible. Between running your store, managing inventory, handling customer service, and trying to have some semblance of a personal life, comprehensive email marketing feels like a luxury you don't have time for.
Here's the good news: you don't need 15 different email automations to see significant results.
After working with hundreds of e-commerce store owners, I've identified the three automated email sequences that deliver 80% of the results with just 20% of the effort. These are the non-negotiable sequences that even the busiest store owners can—and should—implement.
In this guide, I'll show you exactly how to set up these three essential sequences, what to include in each one, and how to measure their effectiveness—all without requiring you to become an email marketing expert or hire a dedicated team.
Continue reading
How to Use AI for Customer Segmentation: Identifying Your High-Value Shoppers Without a Data Science Degree
By Veronica Jeans, Bestselling Author June 20, 2025
Not all customers are created equal.
That's not controversial—you already know that some shoppers spend more, shop more frequently, or influence more people than others. The challenge has always been identifying exactly who these valuable customers are and understanding what makes them different.
Traditional customer segmentation (grouping by age, location, or basic purchase history) only tells part of the story. It's like trying to understand a person by knowing only their height and shoe size.
AI-powered segmentation, on the other hand, can analyze hundreds of behavior patterns and purchasing signals to identify your most valuable customer groups with remarkable precision—without requiring you to become a data scientist.
According to McKinsey & Company, businesses that excel at personalization generate 40% more revenue from targeted activities. The foundation of this personalization? Sophisticated customer segmentation.
In this guide, I'll walk you through how e-commerce store owners can leverage AI for customer segmentation in practical, actionable ways—even if terms like "neural networks" and "regression analysis" make your eyes glaze over.
Continue reading