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
From Retail Challenges to Opportunities: Adapting Your Business for Success in 2025
By Veronica Jeans, Shopify Queen March 29, 2025
Navigating the ever-changing landscape of retail in the USA can feel like steering a ship through a storm, but with the right strategies, your e-commerce business can not only survive but thrive.
As economic challenges loom—marked by looming tariffs, a fluctuating stock market, and the aftermath of federal job cuts—it's crucial to adapt and seize opportunities amidst uncertainty.
Remember the resilience businesses showed during COVID? Those lessons are more relevant than ever. In this guide, we'll explore practical ecommerce strategies that can help you weather the storm and turn potential setbacks into opportunities for growth.
Whether you're running a boutique, a skincare line, or a budding online bakery, it's time to embrace digital transformation and craft a plan for success. Ready to transform retail challenges into opportunities? Let's dive in!
Table of Contents
Understanding Current Retail Challenges
As we navigate the complex landscape of retail in the USA, it's crucial to understand the key challenges that are shaping our industry. From tariffs to economic shifts, let's break down the factors that are influencing the way we do business.
Navigating Tariffs and Regulations
Tariffs and regulations have become a significant hurdle for e-commerce businesses in recent years. The landscape is constantly shifting, requiring retailers to stay vigilant and adaptable.
For many businesses, these changes have led to increased costs and supply chain disruptions. It's not just about absorbing higher prices; it's about rethinking entire business strategies.
However, with challenges come opportunities. Some savvy entrepreneurs are finding ways to diversify their supply chains or even pivot to domestic production. The key is to stay informed and be ready to act swiftly when new policies are announced.
Economic Downturn and Consumer Behavior
The current economic climate has significantly altered consumer behavior, presenting both challenges and opportunities for e-commerce businesses.
During economic downturns, consumers tend to be more price-sensitive and selective in their purchases. This shift can lead to decreased sales volumes for some retailers, particularly those in non-essential product categories.
However, e-commerce has shown resilience in tough times. Many consumers are turning to online shopping for better deals and convenience, creating new opportunities for businesses that can adapt to these changing preferences.
Impact of Job Market Shifts
The recent wave of federal job cuts and broader employment market changes have created a ripple effect across the retail sector.
With job insecurity on the rise, many consumers are tightening their belts, leading to more cautious spending habits. This shift can particularly impact discretionary purchases, forcing retailers to rethink their product offerings and marketing strategies.
On the flip side, these changes are also creating a pool of skilled workers looking for new opportunities. For e-commerce businesses, this could mean access to talent that can help drive innovation and growth in challenging times.
Learning from Past Crises
History often provides valuable lessons, especially when it comes to navigating business challenges. Let's explore what we can learn from past crises and how those insights can guide our strategies today.
COVID Lessons for Business Resilience
The COVID-19 pandemic was a crash course in business resilience for e-commerce companies. It taught us the importance of adaptability and quick decision-making in the face of unprecedented challenges.
One of the key lessons was the critical role of digital transformation. Businesses that had already invested in robust online platforms and digital marketing strategies were better positioned to weather the storm.
Another crucial takeaway was the importance of supply chain diversification. Companies that relied heavily on a single supplier or region faced significant disruptions, while those with diverse supply networks showed greater resilience.
Comparing Market Changes: Then and Now
While every economic crisis is unique, comparing past market changes with current conditions can provide valuable insights for e-commerce businesses.
Understanding these differences can help businesses tailor their strategies to the current environment while applying lessons learned from past crises.
E-commerce Growth Strategies Post-Crisis
Post-crisis growth strategies for e-commerce often involve a mix of innovation, efficiency, and customer-centric approaches.
Many successful businesses focused on enhancing their customer experience, recognizing that loyalty becomes even more crucial during tough times. This involved improving website usability, personalizing marketing efforts, and streamlining customer service.
Data-driven decision making also emerged as a key strategy. Companies that effectively leveraged their data to understand changing customer needs and market trends were able to adapt more quickly and effectively.
Practical Strategies for E-commerce Success
Now that we've examined the challenges and lessons from the past, let's dive into practical strategies that can help your e-commerce business thrive in the current economic climate.
Adapting Your Business Model
In times of economic uncertainty, flexibility in your business model can be a game-changer. It's about finding new ways to deliver value to your customers while maintaining profitability.
Consider diversifying your product range to include more affordable options or essential items. This can help you capture a wider market and maintain sales volume even as consumer spending habits change.
Another strategy is to explore new revenue streams. This could involve adding services related to your products, creating subscription models, or even partnering with complementary businesses to offer bundled solutions.
Marketing During a Recession
Marketing during a recession requires a delicate balance between maintaining visibility and respecting your customers' financial constraints.
Focus on value-based messaging that emphasizes the quality and longevity of your products. Consumers are more likely to make purchases if they perceive them as smart investments rather than frivolous spending.
Leverage cost-effective digital marketing channels, such as social media and email marketing. These platforms allow for highly targeted campaigns, ensuring your marketing budget is spent efficiently.
Consider offering loyalty programs or special promotions to retain existing customers. It's often more cost-effective to keep current customers than to acquire new ones.
Exploring Digital Transformation
Digital transformation is no longer optional for e-commerce businesses; it's a necessity for survival and growth in today's market.
Start by evaluating your current tech stack. Are your systems integrated and efficient? Consider investing in tools that can automate routine tasks, freeing up your team to focus on strategic initiatives.
Enhance your online presence by optimizing your website for mobile users and improving your site's loading speed. These factors not only improve user experience but also contribute to better search engine rankings.
Explore emerging technologies like AI and machine learning. These can be used to personalize customer experiences, optimize pricing strategies, and predict market trends.
Embracing Opportunities in Uncertain Times
While economic challenges can be daunting, they also present unique opportunities for innovative e-commerce businesses. Let's explore how you can turn uncertainty into a catalyst for growth.
Innovating Product Lines and Services
Innovation in your product lines and services can set you apart from competitors and attract new customers, even in a challenging market.
Listen closely to your customers' changing needs and preferences. Use surveys, social media engagement, and sales data to identify gaps in the market that you could fill with new or modified offerings.
Consider developing products or services that address the specific challenges your customers are facing in the current economic climate. This could involve creating more affordable versions of popular items or introducing products that help customers save money in the long run.
Don't be afraid to experiment with limited edition or seasonal offerings. These can create a sense of urgency and exclusivity, driving sales even when consumers are generally more cautious about spending.
Leveraging Technology for Business Growth
Technology can be a powerful driver of growth, helping you streamline operations, enhance customer experiences, and open new revenue streams.
Invest in robust analytics tools to gain deeper insights into your customers' behavior and preferences. This data can inform everything from product development to marketing strategies.
Explore the potential of augmented reality (AR) or virtual reality (VR) technologies. These can provide immersive product experiences, potentially increasing conversion rates for certain types of products.
Consider implementing chatbots or AI-powered customer service tools. These can provide 24/7 support to customers, improving satisfaction while reducing operational costs.
Building a Resilient Business Mindset
A resilient business mindset is crucial for navigating uncertain times and seizing opportunities when they arise.
Cultivate a culture of agility within your organization. Encourage your team to stay informed about market trends and be ready to pivot strategies quickly when needed.
Focus on building strong relationships with your customers, suppliers, and partners. These connections can provide valuable support and opportunities during challenging times.
Invest in ongoing learning and skill development for yourself and your team. The ability to quickly acquire new skills and knowledge can be a significant competitive advantage in a rapidly changing business landscape.
Connecting with the Right Resources
In challenging times, having the right support and resources can make all the difference. Let's explore how you can tap into valuable networks and create a solid plan for success.
Seeking Guidance from Experienced Mentors
Experienced mentors can provide invaluable insights and guidance as you navigate economic challenges.
Look for mentors who have successfully steered businesses through previous economic downturns. Their firsthand experience can help you avoid common pitfalls and identify opportunities you might otherwise miss.
Consider joining industry associations or business groups that offer mentorship programs. These organizations often connect you with seasoned professionals who understand the specific challenges of your industry.
Remember, mentorship is a two-way street. Be prepared to offer value in return, whether through your own unique insights or by helping with specific projects or initiatives.
Networking with Fellow Entrepreneurs
Networking with other entrepreneurs can provide support, inspiration, and potential collaboration opportunities.
Attend industry events, both virtual and in-person, to connect with peers facing similar challenges. These connections can lead to valuable partnerships or simply provide a sounding board for ideas.
Join online communities or forums dedicated to e-commerce or your specific niche. These platforms can be great sources of real-time information and advice from fellow business owners.
Consider forming or joining a mastermind group with other e-commerce entrepreneurs. Regular meetings with a small group of peers can provide accountability and collective problem-solving.
Creating an Actionable Plan for Success
An actionable plan is crucial for turning insights and strategies into tangible results for your business.
Start by setting clear, measurable goals for the next 6-12 months. These should be ambitious yet achievable, taking into account the current economic climate.
Break down these goals into specific action steps, assigning responsibilities and deadlines to each. This ensures that progress is steady and measurable.
Regularly review and adjust your plan as needed. The ability to pivot quickly based on new information or changing circumstances is key to success in uncertain times.
Remember, the path to success in challenging times is rarely straightforward. By staying informed, adaptable, and connected to the right resources, your e-commerce business can not only survive but thrive in the face of economic uncertainty.
This quote perfectly encapsulates the mindset needed to navigate the current retail landscape. By viewing challenges as opportunities for innovation and growth, you position your business to emerge stronger and more resilient.
As you implement these strategies, remember that you're not alone in this journey. Connect with fellow entrepreneurs, seek guidance from mentors, and don't hesitate to reach out for professional support when needed. Together, we can turn retail challenges into opportunities for success.
Ready to create your personalized action plan? Let's connect and chart a course for your e-commerce success in these challenging times.
Continue reading
AI Agents: The Future Workforce Revolution Reshaping Business
By Veronica Jeans, Bestselling Author March 23, 2025
The Untold Impact of AI in Everyday Workplaces
Continue reading
Creating SEO Magic: Your Ultimate Guide to Product Page Optimization in 2025
By Veronica Jeans, Bestselling Author February 23, 2025
Pure SEO Magic!
Continue reading