Sunday, December 15, 2019
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 https://analytics.google.com 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.

how-to-implement-google-analytics-using-google-tag-manager-step1

Step 2

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

how-to-implement-google-analytics-using-google-tag-manager-step2

Step 3

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

how-to-implement-google-analytics-using-google-tag-manager-step3

Step 4

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

how-to-implement-google-analytics-using-google-tag-manager-step4

Step 5

Login to your Google Tag Manager account by visiting https://tagmanager.google.com/. 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.

how-to-implement-google-analytics-using-google-tag-manager-step5

Step 6

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

how-to-implement-google-analytics-using-google-tag-manager-step6

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.

how-to-implement-google-analytics-using-google-tag-manager-step7

Step 8

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

how-to-implement-google-analytics-using-google-tag-manager-step8

Step 9

Under the Google Analytics Settings, click on the New Variable

how-to-implement-google-analytics-using-google-tag-manager-step9

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

how-to-implement-google-analytics-using-google-tag-manager-step10

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.

how-to-implement-google-analytics-using-google-tag-manager-step11
how-to-implement-google-analytics-using-google-tag-manager-step12

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.

how-to-implement-google-analytics-using-google-tag-manager-step12.1
how-to-implement-google-analytics-using-google-tag-manager-step12.2
how-to-implement-google-analytics-using-google-tag-manager-step12.3

About the Author