Sunday, May 31, 2020
How to Implement Google Analytics Using Google Tag Manager

How to Implement Google Analytics Using Google Tag Manager

It is highly recommended that you use Google Tag Manager to install all of your tracking tags including Google Analytics tag. As both are Google products hence there is a native connection between these two platforms and you can implement the Google Analytics advance tracking code without getting into webpage code.

Follow a step-by-step guide with screenshots below to implement Google Analytics code using Google Tag Manager. If you haven’t implemented Google Tag Manager in your website yet then follow this blog How to Implement Google Tag Manager in WordPress

Step 1

First, login to your Google Analytics account by visiting to copy the tracking code. If you do not have a Google Analytics Account yet then follow
How to Setup Google Analytics blog to create one for you.


Step 2

Click on the Admin link from the bottom-left menu bar.


Step 3

Click on Tracking Info link under the Property section and then click on Tracking Code.


Step 4

Copy the Tracking ID which will always be starting from UA- in Google Analytics.


Step 5

Login to your Google Tag Manager account by visiting If you do not have a Google Tag Manager account, then follow How to Setup Google Tag Manager blog.

Once logged in, click on your Google Tag Manager Container Name.


Step 6

Click on the Tags and then click on the New button in the top right corner.


Step 7

Give a logical name to your tag so you can easily identify this in future and click anywhere in the Tag Configuration box.


Step 8

Click on the Google Analytics – Universal Analytics link under the Choose tag type section


Step 9

Under the Google Analytics Settings, click on the New Variable


Step 10

Give an easy to understand name to your variable, enter your Google Analytics Tracking ID in the text box and hit the Save button in the top right corner


Step 11

Now, click anywhere in the Triggering box to set the trigger. You can set a trigger based on a specific page view, an action on the webpage or fire on all pages. We want Google Analytics to track our entire website hence we will select All Pages Page View.


Step 12

Finally, Hit the Save button in the top right corner.

As a final step, if you want to test your tag before publishing, you can do that by putting your Google Tag Manager in a preview mode or directly press the Submit button to put this tag live. On the next screen, Google Tag Manager will ask you to enter the information related to the changes you have made and click on Publish.

Once tag will be published, open your website in a new tab and then go back to the Google Analytics and select Real-Time and then click on Overview from home.

If you see a traffic stat then congratulation, you did it 🙂

If you are stuck, comment here or get in touch with me and I will help you fix it.


About the Author