if both GA & GTM are related to tagging what is the difference between them and why do we have two different products by google.
You can implement Google Analytics tracking on your website in two different ways
gtm.js - Google Tag Manager
GTM is mainly just a platform that you send data to.
As you said, installing GTM requires tagging; it involves code changes on your website, yes. However, if you do choose to use GTM, you only need to install GTM, forget about installing GA. Once it is installed, you shouldn't have to do any more coding unless you have custom things to track such as interactions that involve more than just a click or two. For instance, tracking all of the filters used to perform a search on your website.
With GTM, you send it a payload of data through an array called dataLayer
, and then you go into the GTM user interface and choose what to do with that data. You can send it to Google Analytics, perform custom scripts, execute marketing tags, interact with plugins that can change the look and feel of the web pages, and so much more. In other words, you are not limited to where you can send the data when it is received by GTM.
A lot of this data is sent automatically, like the Page Title, the Click URL, the Form ID, Page URL. There is a long list of automatically collected data points when you have GTM installed.
For example, you can have GTM automatically track form submissions and send custom event data to GA so you can measure your pages marketing performance easier. You can also use that same data to execute a Facebook pixel.
gtag() - Google Analytics
If you choose this option, there is no interface available for you. Yes, you can log into GA's user interface and generate reports, but it does not mean you can just choose from a dropdown what you want to track with GA. Instead, your developer must be with you every step of the way or you will not accomplish a proper and accurate analytics setup.
For instance, if you needed to track clicks on a specific button (or CTA) of your landing page, your developer will have to write code that listens for that click and then send the data directly to GA.
Two Products
To sum this up, yes, there are these two Google products (GA & GTM). However, these products do two completely different things. The difference depends upon how easy you want to track things. Do you want to click some buttons in a user interface, fill out some forms, and be done with it? Or, do you want to hardcode it all yourself (or with a developer)?