Both Tag Manager and gtag.js perform similar functions:
- Tag Manager is a tag management system that allows you to quickly and easily update tags on your website or mobile app from a web interface.
- gtag.js is the JavaScript framework that is used to add Google tags directly to web pages.
Both solutions are built on the same core Google infrastructure, and are interoperable. You are free to choose the solution that best suits your needs.
Consider Tag Manager if you need:
- The ability to deploy and modify both Google and 3rd party tags
- The ability to deploy and modify tags for both web and mobile apps
- The ability to deploy and modify tags on the fly from a web interface
- Collaboration and versioning capabilities
Consider gtag.js if you are unable to use Google Tag Manager, or the following capabilities are important to you:
- The ability to install tags directly on your web page, without the ramp-up time of setting up a tag management system
- The ability to work with your tags directly in JavaScript without being required to work with a separate interface
https://support.google.com/tagmanager/answer/7582054?hl=en
Answer from Michele Pisani on Stack OverflowSwitching from GA4 tag to GTM tag
GTM vs GTAG.js
Gtag.js vs Google tag Manager
What's the difference between GoogleTagManager and GTag ?
Videos
I have a web design agency and on all my clients websites I have Google analytic property and GA4 via gtag.js script. I recently learned more about GTM and realizing it makes more sense to add the GTM tag and then add GA4 via GTM. How do I go about doing this?
I have setup a GTM account and working on 1st website right now and created an Account and container for that website and added container tag code to the website. I also added a 'Google Tag.' Should I now remove the gtag.js script from the site and add another tag via GTM for google analytics?