In particular, the freshly released Google Analytics 4 has several fantastic features for online retailers. However, there isn't yet a direct interface between Shopify and Google Analytics 4 (GA4).
Everything concerning the connection of Shopify with Google Analytics 4 is covered on this page. In addition to being a new version of Google Analytics, GA4 offers incredible new capabilities for Shopify retailers.
In order to get the most value out of your GA4 and Shopify connection, follow the instructions on the page.
How to set up Shopify on Google Analytics 4
By June 2023, Universal Analytics, a beloved version of Google Analytics that we have used for many years, will be discontinued.
As a result, Google Analytics 4, often known as GA4, will be the only choice going forward and will supersede UA. What's even worse, you ask? Unfortunately, you won't be able to transfer your data from Universal Analytics to Google Analytics 4 (GA4).
Simply put, that implies that you must use GA4 right once to begin gathering information about your new home.
Free method with tracing code
1. Add your theme’s tracking code
Edit the theme.liquid file by selecting "Online Store," "Themes," and so on. The tracking code must then be pasted in between the head tags. The measurement ID from your GA4 data stream has to be substituted for the two instances of G-Sample in the following code example (important).
2. Add the tracking code to the page that confirms your order
Add a customized tracking code to the "Additional Scripts" area (under "Order Status Page") by going to "Settings," then "Checkout." You may use the following example, but you must change the two occurrences of G-EXAMPLE with the measurement ID from your GA4 data stream (important).
3. Remove Shopify from GA4 as a referral
You must stop the Shopify checkout pages from appearing as referrals in your reporting to guarantee that your sales are credited to the proper marketing channels. Open your data stream in Google Analytics, pick "More Tagging Settings," and then select "List Unwanted Referrals" to do this. Then you must add myshopify.com as an exclusion.
4. Sign in with your universal analytics property ID
I advise adding Universal Analytics to your Shopify site because you won't be able to observe how customers go through the checkout pages in GA4. Go to "Online Store," then "Preferences," and enter your property ID under "Google Analytics" to accomplish this.
Shopify GA4 Kit Using Analyzify
Using Google Tag Manager (GTM) and data layers, we will configure GA4 and e-commerce functionality. You may use the same GTM configuration for additional tags, such as conversions from Google Ads, making this the optimal setup technique for you.
From setting up GA4 through GTM on Shopify to creating a GTM account, we will provide you with everything you need. Just keep going!
1. Embedding GTM on Shopify
You may skip this step if Google Tag Manager is already set up on your Shopify store. If not, learn how to set up Google Tag Manager. GTM will be our setup's primary operator, so please ensure that everything is configured appropriately. To complete the setup and verify GTM installation on Shopify, go to our particular lesson on this subject. Once you've configured and verified GTM on your Shopify store, go to the next step. To finish our GA4 configuration, we'll use GTM. Thus, it is a necessary step.
2. Obtain the Shopify Purchase data layer (inc. product-level data)
You may get free, open-source purchase and product view data layers for Shopify from Analyzify. This data layer is the updated version that now includes data at the product level.
For the latest recent code block, visit the following link to Analyzify’s Shopify Purchase Data layer page. Keep the tab open after copying the code block since we'll be using it again. Also, make sure you accurately replicate the data layer code.
Once you have the code right, move on to the next step.
3. The checkout with a data layer
Visit Shopify Admin > Settings > Checkout > Order Status Page > Additional Scripts, then put the code just beneath your GTM container code.
The GTM container should have been introduced in Step 1 already. In case you can't find your code here, kindly return to that stage.
If you add another purchase data layer, you can maintain both because their names are distinct. Additionally, if you are utilizing your old data layer for GA4, feel free to delete it, as you have access to the most modern one right now.
You may go back to the last page we opened and do Step 2 there if you aren't acquainted with inserting codes into your "Checkout Additional Scripts" page.
If your Shopify purchase data layer and Google Tag Manager container code are present on your Additional scripts, go to the next stage.
4. On the product page, provide a data layer
The code block may be found in the same page's Shopify Product Data layer section. Additionally, you will see the actions you must include on your product pages.
Up to the GTM actions, follow Steps 1 through 4. Do not continue with GTM activities; we will complete them in the following stage.
You have now successfully added the required data layers, including the GA4 e-commerce reports, to your Shopify store for GA4 setup.
Data layers alone are insufficient. Thus we must now complete the GTM processes. If you correctly performed the instructions above, go to the next stage.
5. The GTM Container download
Google Tag Manager will be used for the following actions. First, GA4 tags, triggers, and variables must be created for product view and buy events.
It takes a lot of time and effort to do this. However, Analyzify has a Shopify GA4 & GTM container that is prepped and ready to use. It will require downloading, importing, and adding your measurement ID to your GTM account.
If you want to download the Analyzify GA4 & GTM Set for Shopify go to this link, step 5. Then, they will send you an email automatically with the GTM container and the accompanying information.
6. GTM Container import
The GTM container you downloaded should now be imported.
Step 6.1: Access your GTM and select Admin from the top menu. Customs Container
Choose the JSON file you obtained via our email in step 6.2.
Apply the following settings in step 6.3. The Current Workspace > Conflicting tags: Merge > Rename
Step 6.4: Verify
7. Insert your GA4 measurement ID
You will only alter the GTM container in this way.
7.1: Click on the variable “update me” GA4 measurement ID (G-). The Google Tag Manager > Variables (Left-Menu) > User-Defined Variables menu.
7.2 Insert your GA4 measurement ID
7.3 Save
If you need assistance with, check out these tutorials:
8. Pause additional GA4 tags
To avoid problems with double-tracking, you should suspend any additional GA4 tags you have added to your GTM.
9. Check your GA4 configuration
Using GTM's Preview Mode, we will now test the data and the configuration. You can obtain assistance from the screencast if you are unfamiliar with Google Tag Manager Preview Mode & Tag Assistant.
9.1 On the GTM page's upper right corner, click Preview.
9.2 Enter the URL of your store and press Connect. The shop should start up and display "Tag Assistant Connected" in the bottom right corner.
9.3 Visit a product page and return to "Preview Mode: Tag Assistant"
9.4 On the left, you should notice the "analyzify productDetail" event. Just click it.
9.5 The "GA4.02 - Event - View Item" tag should have triggered at this point. Just click it.
9.6 In the upper right corner, choose "Display Variables as Values."
9.7 Verify once more the: Product Name, Product Price, Product ID, and Measurement ID.
For Google Analytics 4, If a process is not operating as intended:
Check that you successfully completed the preceding stages by going back and reviewing them.
10. Finish your testing, then publish
The purchase event may be tested in the same manner. You are highly encouraged to watch our YouTube video for further testing and information.
Now that the updates have been published, you may enjoy your GA4 E-commerce setup. In Google Tag Manager, click SUBMIT in the top right corner, enter a container name, then click PUBLISH.
How to set up a GA4 account
Contrary to what the title says, you cannot establish a Google Analytics 4 account. Let's be clear about that right away. However, a Google Analytics account with Google Analytics 4 property may be easily created.
Since Google Analytics 4 (GA4) is the most recent version and the default, when you wish to establish a new account, Google Analytics automatically generates a GA4 property for you.
As an alternative, you may use GA4 Setup Assistant to convert your current Universal Analytics property into a GA4 property. You may use this to connect the accounts and exchange some settings between the properties.
Also, learn how to exclude bot traffic from Google Analytics to ensure accurate statistics.
New GA4 & UA Properties creation
1. New Google Analytics Account Creation
The version of Google Analytics by default is Google Analytics 4. As a result, GA4 is included by default when you establish a new Google Analytics account.
Name the account, please. Utilizing your company's name is the finest course of action.
2. Pick a Property Name, Time Zone, and Currency.
You will be given choices for data sharing. Please feel free to check the options for "Demographics" and "Interest Reports" since these might provide valuable insight. When finished, select "Next."
Give the property's name now (it may match with the account name). Choose your "Currency" and "Reporting Time Zone." To proceed, choose "Advanced Options" and click "Next."
3. Activate Universal Analytics
In the step before, make sure you choose "Show Advanced Options." Then, activate "Create Universal Analytics" and input the URL of your website. After that, select "Next."
4. Last Settings
To give information about your company and your plans to use GA, follow the following. As required by GDPR, accept the "Data Processing Terms" and the "Measurement Controller-Controller Data Protection Terms." You're ready to go after you click "Create"!
New GA4 Account Creation through UA
1. Run the GA4 Setup Assistant to begin
Click "GA4 Setup Assistant" in the "Property" column by going to "Admin."
2. New GA4 Property Creation
In the pop-up box, click "Get Started" and then "Create Property."
3. All done!
Your brand-new GA4 home is prepared! It is located in the top part, close to the Google Analytics logo.
What is the difference between Universal Analytics and Google Analytics 4
Various data models
The core is where the largest change is made. While UA uses a hit-based data collecting technique, GA4 uses an event-based one. For those who are not technically savvy, here is what it means:
There are several hit types in Universal Analytics, including PageView, Social, Transaction, etc. In contrast, they are all Events for GA4 with unique names and parameters. With this improvement, we can combine all reports and capabilities thoroughly.
Powered by AI and machine learning
Intelligent business insights are provided by GA4 and are supplemented by AI & ML. Because Google needs to gather a sizable quantity of data to generate better predictions, we will come to appreciate the benefits of this over time. In the near future, audiences and predictive metrics will probably be discussed and used more frequently.
More Reporting across devices
With regard to cross-device reporting, UA is somewhat constrained. However, with its new data stream methodology and event-based data collecting strategy, GA4 is fully prepared for this. Different streams make it simple to track various devices on a single GA4 property, and sessions and reports may be combined across devices.
Google Signals Booster
You can leverage Google Signals much more deeply, thanks to GA4. For example, with your Analytics property, Google contributes its own user data, which aids in cross-device monitoring and sophisticated tailoring.
Tracking Events Automatically
Events like user interaction, session start, page view, and first visit are automatically tracked by GA4. Additionally, there is the Enhanced Measurement function, which automatically records file downloads, video engagement, site searches, outbound clicks, and scrolling.
Other advantages of GA4 abound, and as Google continues to invest extensively in this version, there will be many more updates in the future.
GA4 FAQ
May I obtain Universal Analytics alone? Why am I in need of GA4?
The foundation of Analyzify is Google Analytics 4. (GA4). In order to benefit from the new and default version of Google Analytics, we strongly advise utilizing GA4 with Analyzify.
Remember that you should combine GA4 with Universal Analytics (UA) (aka. parallel tracking). But if you don't want to utilize them simultaneously for a particular reason, you may halt the GA4 tags on Google Tag Manager.
Should I establish a new GA4 property or upgrade my Universal Analytics to GA4?
There is not much of a difference technically. Only a few settings are carried over when moving from UA to GA4, which is advised.
Is GA4 superior to UA?
The most recent and standard version of Google Analytics is called GA4. It already has many capabilities that Universal Analytics (UA) lacked, and as time goes on, it will only become better.
However, compared to UA, GA4 lacks some reports and functionalities. You ought to employ them both for that reason.
Because GA4 is the foundation of Analyzify, we strongly advise utilizing it with Analyzify so that you may benefit from the brand-new and standard version of Google Analytics.
Do I need to migrate entirely to Google Analytics 4?
No. Google Analytics 4 (GA4) and Universal Analytics (UA) should be used in tandem. Both Google and we advise parallel tracking.
Because GA4 is the foundation of Analyzify, we strongly advise utilizing it with Analyzify so that you may benefit from the brand-new and standard version of Google Analytics.
What distinguishes Universal Analytics from Google Analytics 4?
The current and standard version of Google Analytics is Google Analytics 4 (GA4), while the previous version is Universal Analytics (UA).
Conclusion
Now that you know how to set up Shopify conversions on Google Analytics 4 in 2022, you can start getting more detailed statistics. In addition, you can now use some of the fantastic features Google Analytics 4 has to offer. Next, learn about 8 deadly Shopify mistakes.