Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, Google tag assistant has detected multiple gtag codes on my Shopify store. I have been getting incorrect bounce rate data on GA so I need to fix this. Can anyone guide me onn how I can find the code? I found one code on theme.liquid but not sure where else to look at for the other duplicate code.
Hey @Aliasgar,
I can understand why you're concerned about having multiple gtag.js codes on your Shopify store. Having multiple instances of this code can cause issues with tracking and reporting in Google Analytics, including incorrect bounce rate data.
To fix this issue, you'll need to find and remove all duplicate instances of the gtag.js code from your website. The first place to look is in your theme's theme.liquid
file, which is the main template file for your Shopify store. You can access this file by going to the "Themes" section of your Shopify admin and clicking on the "Edit code" button for your active theme.
Once you're in the theme.liquid
file, use the search function (usually accessed by pressing "CTRL" + "F" on a PC or "Command" + "F" on a Mac) to search for the gtag.js
code. When you find it, make note of its location and then search for it again to see if it appears anywhere else in the file. If you find multiple instances of the code, you'll need to remove all but one of them.
In addition to the theme.liquid
file, you'll also want to check any other template files that are used on your website, such as the header.liquid
and footer.liquid
files. You can access these files in the same way you accessed the theme.liquid
file, by going to the "Themes" section of your Shopify admin and clicking on the "Edit code" button for your active theme.
Once you've checked all of the template files and removed any duplicate instances of the gtag.js
code, you'll want to test your website to make sure that the code is working properly. You can do this by going to your website and using the Google Tag Assistant Chrome extension to verify that the code is present and functioning correctly.
If you're looking to become more confident with investing in Google Ads to grow your business, I recommend checking out this Shopify Learn course where you’ll learn the step-by-step process to launch three different Google Ads campaigns. Shopify Learn provides you with webinars and courses on things like store design, marketing and more. It's 100% free for everyone and new content is being added all the time. This program will help you drive more traffic into your store and also convert that traffic into sales.
I hope this helps! Let me know if you have any other questions.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025