A user completed GA4 setup through Shopify’s Google Channel and is receiving data, but questions whether manual GTAG insertion in theme.liquid is still necessary.
Consensus from responses:
Manual GTAG insertion is not required when using Google Channel’s GA4 integration
The tracking code is automatically added to store pages
Users can verify implementation by checking page source code for “gtag.js” script
Additional considerations:
No modifications needed to theme.pagefly.liquid for PageFly users
If GTAG was previously added manually, it should be removed to prevent duplicate tracking
Google Tag Manager (GTM) is suggested as an alternative, though full checkout tracking requires Shopify Plus
Related issue raised:
One participant reports sales discrepancies in GA4 data (e.g., 5 sales tracked vs. 6 actual). Server-side tracking via GTM with first-party domain configuration is recommended for improved accuracy and consistency.
Summarized with AI on October 27.
AI used: claude-sonnet-4-5-20250929.
This is Richard from PageFly - Shopify Page Builder App
For your case, I suggest there’s no need to add the GTAG to the theme.liquid file. Furthermore, if you want to quickly and easily update tags on your website or mobile app from a web interface, you can use Google Tag Manager (it performs similar functions as GTAG) instead. This method is also recommended by Google.
Thanks for your reply! I’m also user of Pafegfly, and I saw there’s a theme.pagefly.liquid in my layout. I don’t need to do anything here for google analytics, right?
And for your advice on GTM, since I’m not using an advanced plan (which means I can’t install GTM on checkout). Do you still think GTM is a better solution for me?
Yes, indeed. There’s no need to edit that file for the Google Analytics
Since the Google tag doesn’t replace Google Analytics but enhances the process of how you work with Google Analytics. You can choose whether or not to add it to your theme.liquid file. Because GTM is for Shopify Plus plan, so I suggest the proper option here is to use the gtag.json file.
I hope this help. Feel free to contact me if you still have concerns.
If you have set up GA4 integration in Shopify’s Google Channel, you don’t need to manually insert the GTAG code in your theme.liquid file as it is automatically added to your website’s pages.
You can verify that the GA4 tracking code is present on your website by viewing the source code of your website’s pages and looking for the “gtag.js” script.
I am Gina from flareAI app helping Shopify merchants get $6Million+ in sales from Google Search, on autopilot.
If you have already set up GA4 in Shopify’s Google Channel and can see that data is being shared with Google Analytics, you do not need to insert the GTAG manually in the theme.liquid file.
The GA4 integration in Shopify’s Google Channel should automatically add the required tracking code to your store’s pages. This means that you should be able to track your store’s data in Google Analytics without having to manually insert any tracking code.
However, if you have previously inserted the GTAG manually in the theme.liquid file, it is recommended that you remove it to avoid duplicate tracking and ensure that your tracking data is accurate.
To remove the GTAG code, you can simply delete it from the theme.liquid file or comment it out by wrapping it in tags. Once you have removed the GTAG code, you should continue to receive data on GA side through the GA4 integration in Shopify’s Google Channel.
I have installed GA4 through the Google Sales channel, however the sales tracked in GA are not accurate. For example it will say 5 sales on a day when in fact it was 6.
Is there anything I can do to make it more accurate? A better way of installation?