Troubleshooting Shopify Google Analytics 4 Integration [Lesson 4]
The fourth lesson of our Shopify GA4 Crash Course is now available!
In this part of the crash course, we will focus on troubleshooting and debugging your Shopify GA4 integration to ensure smooth operations and reliable data analysis.
Most merchants are unaware of the existing problems within their tracking setup. Simply relying on Google Analytics data and assuming everything is functioning optimally can have detrimental consequences. Both minor and major issues can hinder data accuracy, thus impeding effective decision-making.
?In this post, our primary focus will be on thoroughly examining your GA4 tracking setup. We will evaluate the following crucial aspects:
Before going into the details about the topics we will talk about above, if you think that you do not have enough knowledge about Google Analytics 4, we recommend that you take a look at our Shopify GA4 Guidebook.
Troubleshooting with Google Tag Assistant Legacy
Alright, let's dive into troubleshooting your Google Analytics setup. Remember, it's important to test this on your existing store to know exactly what's happening. So, we'll use a handy Chrome extension called Google Tag Assistant Legacy. Here's what you need to do:
2. After you add the extension, you'll see that it becomes hidden in your browser.
3. To enable it, click on the puzzle piece icon on the top right corner of your browser (extensions area).
4. Great! Now you have the extension enabled, and you'll see a small tag icon.
Even though it's called "Legacy", this extension is still a straightforward and simple solution to debug any store. Let's move on to the next step and start troubleshooting your Google Analytics setup.
Analysing Tags with Google Tag Assistant Legacy
Now, let's move on to the next step. We'll open a random Shopify store to demonstrate how to use Google Tag Assistant Legacy for tag analysis. Please note that we have no connection with these stores; we just simply Googled some Shopify stores for demonstration purposes.
Here's what you need to do:
Let's break down what the tags mean:
They are Google Ads remarketing tags. However, not all Google Ads remarketing tags start with "AW," so don't worry if you don't see them. Remarketing might still be working fine for you even without the "AW" tags. Some remarketing tags start with "G" instead.
They are GA4 tags. In this store, we can see two different GA4 tags being triggered. Having multiple GA4 properties on your store can have specific use cases, but if you're not aware of this and don't have a specific need for it, we recommend removing one of them. Having two integrations can negatively impact page speed, which is not ideal.
They refer to Universal Analytics, the old script for Google Analytics.
The focus here is on the presence of a GA4 property that sends data to Google Analytics 4. That's the key point we want to check.
Check Ecommerce Events & Parameter
As a Shopify merchant, it is crucial to ensure that your Google Analytics tracking is set up correctly and accurately captures essential events. In this part, we will walk you through a step-by-step process of testing and verifying various Google Analytics 4 e-commerce events using different extensions and tools available in Google Chrome.
By following these steps, you can identify any tracking issues and ensure the proper functioning of your tracking setup. Let's get started!
1) Install the Analytics Debugger Extension
To begin, we need to install the Analytics Debugger extension, which allows us to inspect and debug the tags triggered on your website. Search for "Analytics Debugger" in the Chrome Web Store and install it similarly to how you installed the Google Tag Assistant Legacy extension.
2) Access the Analytics Debugger in the Google Developer Console
Once the Analytics Debugger extension is installed, open the Google Developer Console by clicking "View<<Developer<<JavaScript Console"
3) Check the Triggered Tags
Now that the Analytics Debugger is active, we can examine the tags being triggered on your website and ensure that the desired events are firing correctly. 0pen the Google Developer Console by clicking "View<<Developer<<JavaScript Console” again.
Then your console automatically comes at right column. Then open Analytic Debugger by clicking on the arrows.
4) Verify Specific E-commerce Events
To ensure that the essential e-commerce events are being properly tracked, we'll examine a few specific events and their associated data.
a. View Item List Event (Collection Pages)
Navigate to a collection page on your website and check if the "View Item List" event is being triggered. This event indicates when a user views a list of results, such as on collection pages.
领英推荐
b. Select Item Event
Click on a specific item from the collection page and verify if the "Select Item" event is triggered. This event signifies the user's selection of an item from a list.
c. Add to Cart Event
Select a product and click on the "Add to Cart" button. Verify if the "Add to Cart" event fires correctly and includes the relevant product details. Pay attention to the accuracy of the product's item ID, price, and other associated data.
d. Begin Checkout Event
Proceed to the checkout process and check if the "Begin Checkout" event is triggered. This event represents the initiation of the checkout process.
Validate Product-Level Data
Ensure that the product-level data associated with the triggered events is accurate. Check if the item ID, name, price, category, and brand are correctly captured. In cases where variants are involved, verify if the data reflects the correct variant information.
Testing the Purchase Event
Now, let's move on to the final phase, where we will test the purchase event. Testing the purchase event is crucial as it is the most important event that you want to ensure is accurately tracked in GA4.
For this test, we have created a test store, but you can perform a similar test on your own store.
2. Testing the View Item Event
To begin, let's click on a product on your website and verify if the view item event is triggered correctly. If you click on a product and check the data layer, you should see the item's variant information.
If the product has multiple variants, you can choose one to ensure the correct data is captured.
3. Testing the Add to Cart Event
Next, let's test the add to cart event. Click on the "Add to Cart" button for a product and verify if the event is triggered successfully. Check if the value and currency of the cart event are captured accurately.
4. Testing the View Cart Event
In the native integration using the Google Sales Channel app, the view cart event may not be triggered. Therefore, if you click on the cart or view cart button, you may not see the event being captured. This limitation is specific to the native integration.
In order to track this event, you need more professional solution like Analyzify.
5. Testing the Begin Checkout Event
Proceed to the checkout process and verify if the begin checkout event is triggered. Inspect the checkout card data to ensure that it is being tracked correctly.
6. Testing the Purchase Event
Continue with the checkout process, filling in the required information. When prompted to enter the credit card details, since this is a test store, you can enter any information. Once the order is completed, the purchase event should be triggered and recorded.
Inspect the data layer associated with the purchase event to ensure that the necessary information is captured accurately.
Note that some important metrics, such as SKU, coupon code, and checkout ID or order ID, may not be included in the native integration. However, other essential data, such as the product ID and order transaction ID, should be present.
Verify in GA4 Real-Time Report
To confirm that the events are being tracked in GA4, log in to your GA4 account and navigate to the "Reports" section.
Go to "Real-Time" and check if the purchase event and other relevant events are being triggered.
You should see the events, including "View Item," "Add to Cart," "Begin Checkout," and "Purchase."
However, note that the "Form Submit" event may be erroneously displayed due to a setting in Google's enhanced measurement feature. It is recommended to disable this setting as it often creates unnecessary noise in your data.
Congratulations on completing the fourth part of our course! This marks the end of this lesson. If you did not watch the previous lessons of the Shopify GA4 Crash Course, you should check them out!
Inn summary, in this lesson, we covered the following topics:
We're also thrilled to announce that our Complete Shopify GA4 Course is on its way and will be released soon. Stay tuned for more details and updates.
To ensure you receive all the latest information and updates, sign up for our upcoming complete GA4 course using this link.
Technical Account Manager
1 年Excellent ????