Troubleshooting Shopify Google Analytics 4 Integration [Lesson 4]

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:

  1. ?Pixel Implementation Verification: We will double-check if the pixel is correctly implemented on your store.
  2. Identifying Double Tracking Issues: We will analyse if the tracking events are being duplicated, as this can skew data insights and create confusion in understanding user behaviour.
  3. Validating E-commerce Event Tracking: We will specifically review events such as product views, add to cart, and view item lists.
  4. In-depth Data Analysis: Going beyond surface-level examination, we will delve into data analysis to uncover deeper insights. Our focus will be on three levels of data:

  • Product Level Data: We will examine if the product level data is being successfully transmitted alongside product view, add to cart, and view item list events.
  • Cart Level Data: Similarly, we will assess the cart level data associated with view cart and begin checkout events.
  • Order Level Data: Lastly, we will verify the order level data by examining the accuracy of purchase events.

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:

  1. Search for "Google Tag Assistant Legacy" in the Chrome Web Store and click on the "Add to Chrome" button to install it.

No alt text provided for this image

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).

No alt text provided for this image

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:

  1. Open your Shopify store in the browser.
  2. If you have an ad blocker enabled, make sure to disable it for this process.
  3. Next, click on the Google Tag Assistant Legacy extension icon and enable it if it's not already enabled.
  4. To allow the extension to listen to the page, reload the store's page.
  5. Once the page is reloaded, you will see a list of all the tags that were triggered during the page load. In this specific example, there are seven tags that appear.

No alt text provided for this image

Let's break down what the tags mean:

  • Tags starting with "AW"

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.

  • Tags starting with "G-"

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.

  • Tags starting with "UA"

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"

No alt text provided for this image

  • In the console, locate the Analytics Debugger plugin, which should now appear in the right column. Click on it to activate the debugging process.

No alt text provided for this image

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.

No alt text provided for this image

  • Visit your e-commerce store's homepage and start the debugging process by clicking "Start Debugging" in the Analytics Debugger.

No alt text provided for this image

  • The Analytics Debugger will display a list of triggered tags. Look for the GA4 (Google Analytics 4) tags, as these are the ones, we are primarily interested in.

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.

  1. Testing Method: In this test, we will use Google's online tag assistant, which is the new version of the tag assistant tool. Unlike the legacy extension, the new tag assistant is an online source. Follow these steps:

  • Open the Google Tag Assistant tool and click on "Add Domain."

No alt text provided for this image

  • Add your domain to connect it with the tag assistant tool.

No alt text provided for this image

  • Once the connection is established, you will be able to see the data and properties associated with your website on the tool's interface.

No alt text provided for this image

  • On the left-hand side, you can view the events that are being tracked.

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.

No alt text provided for this image

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.

No alt text provided for this image

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.

No alt text provided for this image

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.

No alt text provided for this image

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.

No alt text provided for this image

Go to "Real-Time" and check if the purchase event and other relevant events are being triggered.

No alt text provided for this image

You should see the events, including "View Item," "Add to Cart," "Begin Checkout," and "Purchase."

No alt text provided for this image

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:

  • Checking the tags that are being triggered on your store
  • Verifying the presence of any double tracking issues
  • Ensuring the proper sending of e-commerce events
  • Validating the accuracy of product level data, cart level data, and order level data transmission.

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.

Fatma Atasoy

Technical Account Manager

1 年

Excellent ????

要查看或添加评论,请登录

Analyzify的更多文章

社区洞察

其他会员也浏览了