How to fix duplicate tracking in GA4

Updated on 2024-06-03

Littledata's Shopify to Google Analytics 4 (GA4) connection automatically tracks user behavior including page views, shopping events, purchases and more. You do not need any further tags or scripts on your page for accurate data in Google Analytics.

Check for duplicate pageviews

If you had any tracking prior to adding Littledata's connection it's important to check whether your Google Analytics still receives duplicate pageviews.

Apart from doubling pageview count, duplicate pageviews will skew other GA4 metrics including bounce rate, engagement, views-per-session, key event rates etc.

To determine whether your property receives duplicate pageviews you should debug your website GA4 connection: a) Install the debugger plugin on your browser - one of the most popular is Google Analytics Debugger b) Go to Google Analytics Admin (Gear icon in bottom left corner) and open Debug View. It will be blank initially, because its not receiving any debug hits c) In a new tab of the same browser open your Shopify store, and turn on the debugger plugin by clicking on the plugin icon

how to turn on ga4 debugger

When the page loads, if you see 2 pageviews with no time interval in between, just like on the screenshot below, it's proof that your GA4 receives duplicate pageviews.

duplicate pageviews in ga4 debugger

Other signs that you are receiving duplicate pageviews can be increased Views-per-session or a very low bounce rate (less than 20%). However, it's always advised to confirm such doubts by debugging using this procedure.

Sources of duplicate tracking

To solve the problem of duplicate pageviews, you need to disable any other way of GA4 tracking on your website. These are the 3 most common ways that legacy GA4 installation lingers on:

  1. Google & YouTube Sales Channel in Shopify
  2. GA4 tag in Google Tag Manager
  3. gtag code directly in your store theme
  4. Custom web pixel

Disable Google Sales Channel in Shopify

During Littledata's installation process, you will be prompted to disable Shopify's Google Analytics tracker from the Google Sales Channel.

If our audit detects that the original Shopify tracking is still active, follow these steps to remove it.

  1. Go to your Shopify store admin and Sales Channels > Google & YouTube.

    Shopify sales channel

  2. Click Disconnect next to the 'Google Analytics' property.

    Disconnect duplicate tracking

If you don’t disconnect the Google Analytics 4 property from the Google Channel it will trigger double pageviews and ecommerce events in GA4.

Disable tags in Google Tag Manager (GTM)

If you use GTM you should check whether you have an active GA4 configuration tag and pause it.

pause ga4 configuration tag in gtm

Even if the GA4 Measurement ID does not match the one that Littledata is connected to, it could be a different data stream feeding into the same web property.

For a more detailed instruction, make sure to check our guide on how to disable pageviews in GTM.

gtag code directly in your store theme

Google's gtag script might have been added directly to the Shopify theme.liquid file.

For this particular scenario you need to check with your developer, this tutorial won't go into detail due to technical complexity.

Custom web pixel

Shopify allows you to add a 'web pixel' to your storefront, and this might include the gtag tracking - similar to above.

Here's how to remove custom web pixels