Google Tag Manager is a powerful measurement tool. Collect every movement of visitors on your websites. Experiments with Google Analytics, Google Ads, and many more third-party integrations.
With Google Tag Manager, easily can be tracked Click, Custom Event, Form Submission, and Page Views, etc.
So, you want to learn the proper way to install Google Tag Manager (GTM) on a website, then dive deeper with us.
Create Google Tag Manager Account
You need a Google Account for creating Google Tag Manager Account. So, you need to log in first on Google Account then open https://tagmanager.google.com/ for creating a new tag account.
You need to fill out all details like Account Name, Container Name, and targeted parameters, you see an example on the below.
Create New Account of Google Analytic
After creating an account and container on Google Tag Manager now need to create an account on Google Analytics. So, we can integrate the Google Analytics and Tag Manager.
How we can create a Google Analytics account? you can see an example below in the image. The procedure is very similar to the Google Tag Manager.
You need to log in to your Google Account and then create a new account and fill out the all details. Like Account Name, Website Name and URL, Category and Reporting Location, etc.
Note* Accept all terms of services.
Creating New Tags for Integration of Google Analytics
Now reopen your new Google Tag Manager dashboard so you can create new tags and we will integrate the Google Analytics Tracking code or Id with this new Tag.
So, you need to click Tags and then New for creating new tags. When you will click the new then Google Tag Manager prompt to add New Tag Name, then Tag configuration and Triggering.
So, we will add Google Analytics Universal on Tag Configuration and then the Google Analytics Tracking ID. In the section of Triggering we need to select All Page Views.
You can see the details of the implementation of Google Analytics in the Gifs image below.
Install Google Tag Manager Script on Website
After the integration of Google Tag Manager and Google Analytics, now we need to install the script of Google Tag Manager on our website. Google Tag Manager will provide two script code one is for <head> section and second one is for <body> section.
If your website is running on WordPress CMS then the Google Tag Manager Script installation would be very easy.
First of all, go to the plugin manager and then click add new plugin and search “Google Tag Manager for WordPress.” Install the plugin and activate it.
After activation, you need to go to the Google Tag Manager Plugin’s setting to integrate the Google Tag Manager ID (GTM-XXXXXXX). You can see the tutorial below in the Gif image.
Preview or Debug Google Tag Integration
After everything, reopen your Google Tag Manager Dashboard, (If you have closed) the click on Preview Button for debugging the Integration of Google Tag Manager Script and Google Analytics.
Now open your website on the same browser and check the result. If not working then you need to add a chrome extension “Google Tag Assistant” from the chrome web store.
After adding the extension simply refresh the website and see the result, you can also check the implementation going on Google Analytics Dashboard. If they’re showing any active visitor that means your installation is correct. You can see above in the Gif image for tutorial.
If you have any questions and thought please do comments.
Read More Article Like This:
How to Solve “Many Redirects” Error?