Google Analytics is the most valuable free online tool you can have; there’s no doubt about that.
Most of our new clients usually don’t have their Google Analytics set up correctly, or they are completely missing it. Especially since July 2023, when Universal Analytics stopped processing data after more than 10 years of loyal service, we’ve seen more broken accounts than ever.
In fact, as an agency, we’ve identified that over 90% of Google Analytics accounts are set up incorrectly.
And even though Google Analytics 4 (GA4) has become the only version available, only around 13% of current live Shopify sites are using GA4.
Were you ready for the transition, or are you still struggling to get back your data?
Maybe you’re a new Shopify store owner who needs to set up everything right from the beginning.
Either way, we’re here to share everything you need to know.
What is Google Analytics 4 and Why You Need it
Google Analytics 4 (GA4), as we just shared above, is the latest version of Google’s analytics platform that allows you to measure your traffic both across websites and mobile applications.
Thanks to AI and machine learning, it’s designed to provide more advanced tracking and insights. When compared to Universal Analytics, it’s more accurate and customizable, while it is simpler to use.
When Google Analytics 4 is correctly set up for your Shopify store, it can help you:
- learn which channels are driving the most sales,
- understand who your customers are and track their path,
- track your ROI, and avoid spending money in the wrong places, and
- track your marketing campaigns’ results.
This means it can provide all the information you need to plan your future marketing efforts and get the most out of your campaigns and money. Because when you don’t have Google Analytics set up correctly, you don’t know your results, what’s working, or what channels are bringing in customers and revenue.
Which simply means you’re wasting your efforts and money on strategies that won’t be worth it.
This is why we built this guide to help you set up your Google Analytics 4 properly step by step and improve your strategies.
How To Set Up Your Google Analytics 4 On Shopify
Completing the basic implementation settings for a new GA4 account is not that hard, and it’s even easier for Shopify stores as it provides an integration for automatic tracking.
Here are the 10 steps you need to follow:
- Create a Google Analytics account and property
- Set up a data stream
- Add the GA tracking code to Shopify
- Set up Google signals & device data collection
- Define internal traffic
- List unwanted referrals
- Define data retention
- Adjust session timeout and timer for engaged sessions
- Configure attribution settings
- Verify GA implementation with real-time reporting
Step 1: Create a Google Analytics Account and Property
If you don’t already have an account, you’ll need to create a new one. To do this, you need to:
- Visit the Analytics homepage and click “Start measuring.”
- Add an account name, review the Account Data Sharing settings, and click “Next” to add the first property to your account.
- Add a Property Name and select the timezone and currency.
- Continue and follow the steps required to add all the necessary information for your business.
- Don’t forget to accept the data processing terms!
- The last step is selecting a platform to start data collection. Select Web (since we’re setting this for your Shopify store) and continue to Step 2.
If you already have an account and just need to add a property, then:
- Visit the Analytics homepage and sign in with your Google Account.
- Click on “Admin” ( bottom-left corner ) → Click “Create” with the + icon (top of the menu) → Select “Property.”
- Add a property name and select the timezone and currency.
- Continue and add the business details and objectives, and don’t forget to accept the data processing terms!
- Now, go back and find the “Data collection and modification” (under the property settings) and click “Data Streams” → Add stream → Select Web.
Step 2. Set Up a Data Stream
To set up the data stream for your Shopify store, you should:
- Enter the URL of your website (e.g., zimamedia.com) and a Stream name (e.g., Zima Media).
- Enable enhanced measurement for now and later disable the enhanced measurement events you don’t want to collect if you set up custom ones.
- Click “Create Stream
Keep in mind that you can create more than one data streams when you have more platforms that you want to track separately while still keeping the data under one GA4 property (e.g., iOS and Android app).
Step 3. Add The GA Tracking Code to Shopify
Now, it’s time to add the tag to your site so you can start collecting data. Open your Shopify store and go to your Google & Youtube app.
In case you don’t have this already, you first need to install it. Then,
- go to Preferences (under Online Store), and click “Manage Pixel here”
- click “Connect your Google Account,” and
- from the drop-down menu, select your GA 4 property and connect it.
If your Google account was already connected, then:
- click “Get Started” (under the “Optimize Your Business with Google Analytics” tab in the Overview,
- and select your Google Analytics 4 property.
By connecting your GA4 property to this app, you’re automatically installing tracking on your Shopify store and start seeing events on your reports like purchases, add to cart, begin checkout, and more.
However, not all standard eCommerce events will be automatically tracked, meaning there will be missing opportunities. Plus, with Shopify, you can’t always be safe. It took them almost a year to prepare for the GA4 switch, and there’s still no transparency regarding their official app (which can sometimes bug, too) and if they’re using the latest features.
That’s why we highly recommend setting up advanced tracking with Google Tag Manager (GTM) for non-standard ecommerce or custom events or advance tracking along with the Google Channel App and using it as a backup.
With GTM, you can send and collect data from multiple destinations (like GA4, Google Ads, Facebook, and more) and get access to all the latest features like enhanced conversions and dynamic audiences, new v.s. returning customers, profit on ad spend, and many more.
And if you want to get everything properly set up and don’t miss anything, you shouldn’t forget about offline conversions. This is the only way to avoid tracking blockage because of all the latest changes like cookie blockers, cookie deletion, new EU and Californian laws, and iOS 17 with URL removal.
If you are looking for support in setting up your Google Analytics 4 with Google Tag Manager, then check out our service here.
Step 4. Set Up Google Signals & Device Data Collection
Setting up Google signals and device data collection in GA4 allows you to track additional insightful data about your users’ behavior across different devices (for example, you can record sales from people who started from their mobile but bought from their computers). This will allow you to understand how they interact with your website or app so you can improve your strategies, like using them for future remarketing campaigns. So here’s what you need to do:
- Open Admin and find the “Data collection and modification” (under the property settings),
- click “Data Collection,”
- click “Get Started,”
- click “Activate,”
- click “Continue”.
- Don’t forget to acknowledge the User Data Collection!
For more information about Google Signals & Device Data Collection, you can visit the Google Analytics Help Center.
Step 5. Define Internal Traffic
In order to prevent data from internal users appearing in your reports, you can create some rules and define internal traffic to filter out their activity. To do this, follow these steps:
- Open Admin and click “Data Streams” (under the “Data collection and modification” in the property settings),
- select your data stream,
- click “Configure tag settings” (under the Google Tag section),
- under the Settings section, click “Show all,”
- click “Define internal traffic,”
- click “Create a rule,”
- add a rule name (e.g., Zima Media), select a match type (e.g., IP address equals), and add the IP address,
- click “Add condition” to add more IP addresses, and
- click “Save.”
For more information about filtering out internal traffic, you can visit the Google Analytics Help Center.
Step 6. List Unwanted Referrals
This configuration allows you to exclude the domains you don’t want to attribute as referrals, which gives you more accurate reports. To add it, you need to:
- Open Admin and click “Data Streams” (under the “Data collection and modification” in the property settings),
- select your data stream,
- click “Configure tag settings” (under the Google Tag section),
- under the Settings section, click “Show all,”
- click “List unwanted referrals,”
- choose a match type (e.g., referral domain contains) and enter the domain (e.g., zimamedia.com),
- click “Add condition” to add another domain and
- click “Save.”
You should always exclude:
- your website
- shopify.com, pay.shopify.com and checkout.shopify.com
- shop.app (Shopify’s native mobile app, Shop)
- any external payment gateways you may have (like paypal.com)
You can visit the Google Analytics Help Center for more information on identifying unwanted referrals.
Step 7. Define Data Retention
The data retention period allows you to choose how long GA4 will store your data for the exploration reports before they are automatically deleted.
According to Google, “The data retention applies to user-level and event-level data associated with cookies, user-identifiers (e.g., User-ID), and advertising identifiers (e.g., DoubleClick cookies, Android’s Advertising ID [AAID or AdID], Apple’s Identifier for Advertisers [IDFA]).”
By default, it is set up to 2 months, but we recommend setting it up to 14 months. To do that, you need to follow these steps:
- Open Admin and find the “Data collection and modification” (under the property settings),
- click “Data Retention”,
- select 14 months, and
- click “Save.”
Visit the Google Analytics Help Center for more information about data retention.
Step 8. Adjust Session Timeout And Timer For Engaged Sessions
Adjusting these settings can impact the accuracy of your data as they describe how long it takes before sessions expire due to inactivity or become engaged sessions. So, let’s quickly review them both.
Session Timeout
By default, this is set to 30 minutes, which means that a new session will start if the user stays inactive for 30 minutes or more.
You can adjust this from a minimum of 5 minutes to a maximum of 7 hours and 55 minutes, depending on your site/app and what usually describes your user’s behavior.
Timer For Engaged Sessions
By default, this is set to 10 seconds, meaning that it takes 10 seconds for a session to be considered an engaged session. Don’t forget that engaged sessions are those that lasted at least 10 seconds or had at least 2 page views or at least 1 conversion recorded.
You can set the timer for engaged sessions up to 60 seconds maximum.
So, in order to change these settings in your Google Analytics account and adjust them based on your business, you should:
- Open Admin and click “Data Streams” (under the “Data collection and modification” in the property settings),
- select your data stream,
- click “Configure tag settings” (under the Google Tag section),
- under the Settings section, click “Show all,”
- click “Adjust session timeout,”
- choose your preferred session timeout and timer for engaged sessions and
- click “Save.”
For more information about session timeout, you can check out the Google Analytics Help Center.
Step 9. Configure Attribution Settings (model, channels & conversion window)
This will allow you to assign credit to various touchpoints in the customer’s journey to completing a conversion. Here’s how to do it:
- Open Admin and find the “Data display” (under the property settings),
- click “Attribution Settings,”
- set the Reporting attribution model to data-driven,
- select paid and organic channels to receive credit,
- configure the conversion window by setting:
- Acquisition conversion events to 30 days, and
- All other conversion events to 90 days,
- click “Save.”
Step 10. Verify GA Implementation With Real-Time Reporting
Inside your Google Analytics account, on the left main menu, click on “Reports” and select “Realtime.” Then, open your Shopify store from an Incognito window and see if there is an active user from your location.
If yes, you’re done; your tag is installed! 🎉
You can continue to navigate to different pages and proceed to various actions, like submitting forms, viewing pages and products, and adding items to the cart. Monitor and see if the events you’re triggering are recorded, and verify that the data you receive are accurate.
And that was it—Zima Media’s complete course on how to set up Google Analytics for your Shopify store. Don’t forget to check our video with all the steps here.
But our guide doesn’t end here. We have collected more tips and insights that will help you understand more about measuring your website’s data using Analytics.
Google Analytics Insights
There are a lot of reports in Google Analytics 4. We’ve listed below some of the most important ones:
- Traffic Acquisition – shows the volume of users coming to your website (total users, sessions) and breaks down the traffic by channels.
- User Acquisition – shows the volume only of new users coming to your website and breaks down the traffic by channels.
- Real-Time – shows live users, events, and conversions happening right now on your site.
- Engagement Overview – shows how users interact with your site (visit duration, page views, and more).
- Conversions (Engagement) – shows the number of completed goals (conversion rate, completions, value), including Ecommerce and other conversion events.
- Ecommerce – an overview that summarizes your revenue data (number of purchases, total revenue, items purchased, and more)
- User Attributes Overview – answers queries related to users (location, age/gender, interest, devices, etc.)
Bonus: Google Analytics 4 Best Practices
- Never share your parent Google Account with others (marketers, developers, etc.)
- Set up custom reports and dashboards to view all the necessary information in one place.
- Link your Google Ads and Search Console accounts to help you measure your campaigns’ performance.
- Set Up Audiences and User Properties to segment your visitors based on specific attributes (behavior, demographics, etc.) and tailor your marketing strategies to specific groups.
- Regularly review and analyze data at least once daily to make the most out of your real-time report.
- Use different UTMs in your URLs to filter your efforts correctly.
- Stay updated with Google Analytics changes, updates, and new features.
Well, there you have it! You’ve set up Google Analytics 4 correctly and are ready to take on the world of Ecommerce with actionable insights and data that will help you push your sales and conversions.
Don’t forget to request your free marketing audit from our experts to help you identify missing opportunities and gain professional recommendations to improve your online strategies.
Cheers to smarter marketing!