The Simple Way To Track Website Traffic in Analytics Through GTM (Step By Step)

by Gaurav Chatwani
Google Tag Manager Website Tracking Guide Wih Analytics

Hey Everyone!

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:

  1. Create an account on Google Tag Manager
  2. Copy code and place on website header and body
  3. Create Analytics account
  4. Create a Tag
  5. Check with Preview Mode
  6. Check Google Analytics
  7. 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
  • Country
  • Container Setup

For example, I am using my website: for tracking process.

Create Account on tag manager

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.

Copy tag manager code

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.

Code tagmanager copy

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.

Plugin for tag manager

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.

paste tag manager code plugin

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:

Create tag tag manager

After click on the new button, Click on tag configuration and click on Google Analytics:

Google tag analytics setup

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
Tag setup analytics tag

To get Google analytics id, go to your google analytics admin column—-> Property settings and copy it from there.

analytics id setup

After that, Click on triggering below the tag option:

Trigger setup tag manager

Select “all pages” option in the trigger:

Trigger all pages setup

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.

Click on preview button

After that, Go to your website and reload it. After reloading the website, you will see the tag manager debugger.

Tag fired analytics

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.

analytics real time view

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.

last submit button

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.

Happy Reading!

Sharing is Caring

Related Posts

Leave a Comment