Today, I am going to show you how to track website traffic in analytics through a google tag manager.
It is a simple step by step guide with screenshots & Examples to do this. I assure you that if I teach this to the 8th class boy, then, they will also do this task easily.
So, without taking much more time, Let’s Get started——>
7 Steps to Do this:
- Create an account on Google Tag Manager
- Copy code and place on website header and body
- Create Analytics account
- Create a Tag
- Check with Preview Mode
- Check Google Analytics
- Submit And Done
Create an account on Google Tag Manager
First of all, you need to create an account on google tag manager. In the creation of the account, the Google tag manager will ask you the following details:
- Account Name
- Container Setup
For example, I am using my website: gauravchatwani.com for tracking process.
So, I filled the details and clicked on the submit button.
Copy the code and place it on your Website Header
To copy the code, go the admin then click on the install google tag manager.
After click on it, you will find two scripts. The first script should be placed in the website header’s and the second script should be set in the website’s body.
After copied the code, I will place it into the website. For this, I opened my website’s WordPress panel.
Now, you have two options to place the code:
- Place the code manually in the Editor
- Download plugin
I prefer to download the Metronet tag manager plugin. If you are new, then choose the plugin option to set up the code in the website.
After activating the plugin, go to the plugin settings and paste both scripts in the boxes — the first script in the first box, and the second script in the second box.
Now the code is set up on the website.
Create a Google Analytics Account
Now you need to create google analytics account (Which is very simple). Google Analytics (GA) ID is required to set up the tag in google tag.
The next step is to set up the tag, but first, you need to create a google analytics account. It is not mandatory to first create a google analytics account, but you will not get confused when you do this first.
Create a Tag in Google Tag Manager
To create a tag, click on the new button:
After click on the new button, Click on tag configuration and click on Google Analytics:
Now, you have some options to create a tag, You need to do an edit on these options:
- Track Type: Pageview
- Select: Enable Overriding
- Paste the Google analytics id
To get Google analytics id, go to your google analytics admin column—-> Property settings and copy it from there.
After that, Click on triggering below the tag option:
Select “all pages” option in the trigger:
Now your tag is ready, name your tag and click on the save button.
Check with Preview Mode
Now go back to the tag manager homepage and click on the preview button.
After that, Go to your website and reload it. After reloading the website, you will see the tag manager debugger.
You can see that the view tag is fired when open the page. This tag will always fire when you open or reload the page.
Check Google Analytics (Real-time View)
With the help of this tag, you can send traffic data to google analytics.
Now, you can check in the real-time view. There is 1.
It means website traffic tracking in analytics through Google tag manager mission is successful.
Submit and Done
Now back to the Google tag manager homepage, and click on the submit button. Now your tag and its version submitted.
Make sure you click on the button “Leave preview mode” after successful tracking.
The website traffic tracking through the tag manager mission is now completed.
In the End
Well, there are many ways to track website traffic through google analytics and tag manager.
But as I said earlier, I want to make this very simple. So, I choose the simple way to guide you with the help of examples and screenshots.
I will make more guides on different types of tracking in Google tag manager like button tracking, scroll tracking, video tracking, form tracking, google ads remarketing tag, facebook pixel and many more!
I will work harder to make the other tracking guides very simple. So, stay tuned and subscribe to my blog. You will get notified once I publish the guide.
Let me know the comments if you faced any confusion while understanding this guide, I will reply to your all comments.