The Er.Silent Boy!

How to Add Google Tag Manager in my WordPress Website

how to add google tag manager in my WordPress website

Intro:- How to Add Google Tag Manager in my WordPress Website? Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app.

how to add google tag manager in my WordPress website1

Initial release date: October 1, 2012

Developer: Google

About:- How to Add Google Tag Manager in my WordPress Website? Tag Manager gives you the ability to add and update your own tags for conversion tracking, site analytics, remarketing, and more. There are nearly endless ways to track activity across your sites and apps and the intuitive want.

How to Add Google Tag Manager in my WordPress Website? If you are reading this article that means you want to know how to add a google tag manager in my wordpress website, right? But, you don’t have any idea how or where to start. If you are looking for an easy guide on how to add google tag manager in my WordPress website then you are at the right place. Just you have to read this article properly. In this article, I will share the proper guide on how to add a google tag manager in my WordPress website. Even if you are a beginner is no worry about it. The steps below guide are for both Beginners & Experts.

But before beginning to start an article, there are some major points that should know, like(FAQs)

  1. What is Google Tag Manager?
  2. Is Google Tag Manager free to use?
  3. What is the difference between Google Analytics and Google Tag Manager?
  4. Is Google Tag Manager good for SEO?
  5. What can be tracked with Google Tag Manager?

Let's Find Out. ...

1. What is Google Tag Manager?

Google Tag Manager gives you the ability to add and update your own tags for conversion tracking, site analytics, remarketing, and more. There are nearly endless ways to track activity across your sites and apps, and the intuitive design lets you change tags whenever you want.

2. Is Google Tag Manager free to use?

Google Tag Manager delivers simple, reliable, easily integrated tag management solutions— for free.

3. What is the difference between Google Analytics and Google Tag Manager?

Google Analytics is an analytics tool that helps you track and analyze how users interact with your website and app. Google Tag Manager is a tag management system that makes it easy for teams to add and edit tags for granular user event insights.

4. Is Google Tag Manager good for SEO?

Google Tag Manager is a fantastic tool to give SEOs the flexibility to test SEO modifications to stuff like meta descriptions, structured data, and canonicals. Bear in mind that these should be temporary changes that will at some point be implemented by the development team.

5. What can be tracked with Google Tag Manager?

Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app.

Let's Explore. ...

How to Add Google Tag Manager in my WordPress Website?

Video Tutorial!

How to Install and Set Up Google Tag Manager in WordPress Manually?

There are two methods to install Google Tag Manager in WordPress — Manually and with a plugin. While using a plugin might be easier, the manual method gives you more customization options over the code. For this reason, we recommend opting for the manual method for advanced users.

1. Create a Google Tag Manager Account

First, you need to set up a Google Tag Manager account. Follow these steps:

  1. Open the Google Tag Manager homepage. Click Start for free and log in with your Google account.
  2. Click Create Account, either on the top right or the icon on the page center.
  3. On Account Setup, you will need to fill in your account name. We recommend using your company’s name if it’s your business.
how to add google tag manager in my WordPress site

4. Fill in your domain name and choose Web as your target platform on Container Setup.

5. Once you’ve filled in all of the information, click Create.

how to add google tag manager in my WordPress website

6. Then, the terms of service agreement window will show. Read the information carefully, and tick “I also accept the Data Processing Terms as required by GDPR.”

how to add google tag manager in my WordPress website1

7. Click “Yes” to create your account.

8. Finally, you will see a pop-up window with two Google Tag Manager code snippets for your website. The first one is for the header, and the second code snippet is for the body section of your website. To copy these code snippets, simply click on the copy icon.

how to add google tag manager in my WordPress website2

2. Add the Tracking Code to WordPress

The next step is adding the code to your WordPress site. To do so, follow the steps below:

1. Log in to your WordPress account and navigate to Appearance -> Theme File Editor on your sidebar.

how to add google tag manager in my WordPress website3

2. On the right side, check the Theme Files.

how to add google tag manager in my WordPress website4

As WordPress themes vary in terms of design and functionality, they may have different types of files. Some typical files include functions.php, footer.php, and header.php., but they may have different names. The file for the heading, usually named header.php, is where you will make changes with the Google Tag Manager’s code snippets. If you can’t find header.php in your WordPress theme files, contact the theme developer for more information.

3. After copying the Google Tag Manager code snippet, click header.php and locate the <head> and </head> tags to change the header section. Usually, you can also customize the opening <body> tag in the same file. However, other themes may have the body section in another template file.

4. Paste the first code for the header section as high in the <head> of the page as possible.

5. Also, paste the second code after the opening <body> tag.

6. Click Update File at the bottom of the page to save changes.

7. Once you’re finished with adding snippets to your WordPress website, go back to your Google Tag Manager dashboard and click Preview.

how to add google tag manager in my WordPress website5

8. It will direct you to a new window to connect Tag Assistant to your website. Enter your site URL and click Connect.

how to add google tag manager in my WordPress website6

9. A new window to your site will open, and Tag Assistant will notify you of the successful Google Tag Manager connection. Click Finish, navigate to the preview window, and click Continue.

how to add google tag manager in my WordPress website7

10. You will see the “Google container found” notification along with your Google Tag Manager container ID, meaning the installation of Google Tag Manager on your WordPress website is complete.

how to add google tag manager in my WordPress website8

11. Close the preview window, and click Submit.

how to add google tag manager in my WordPress website9

12. After that, enter the version name. For example, you can name it “GTM on WordPress”. Then, click Publish.

how to add google tag manager in my WordPress website10

3. Publish a New Tag

You will need to create a tag to start using Google Tag Manager for tracking user behavior. To accomplish this, follow the steps below:

1. Navigate to your Google Tag Manager dashboard and click Add a new tag, where you can choose from more than 50 tags supported by Google Tag Manager.

how to add google tag manager in my WordPress website11

2. Click on the icon to choose a tag type.

how to add google tag manager in my WordPress website12

3. Then, you will see many featured tag types on the list, including several Google Analytics tags. You can choose the Universal Analytics tag if you have a Google Universal Analytics account.

how to add google tag manager in my WordPress website13

4. For Track Type, select which element you want to track on your WordPress website from the list. Also, choose New Variable for the Google Analytics settings.

how to add google tag manager in my WordPress website14

5. Then, a variable configuration window will show. Enter your Google Universal Analytics tracking ID, rename the variable, and click Save. You can find your tracking ID in the Admin tab under Property -> Tracking Info.

how to add google tag manager in my WordPress website15

6. After that, move on to the next section to choose a trigger.

how to add google tag manager in my WordPress website16

7. Tick the triggers you want to use, and click Add.

how to add google tag manager in my WordPress website17

8. Then, rename the tag and click Save. Before publishing your tag, use the Preview mode to check if the tag works on your website. 

That is it — you have successfully created a Google Analytics tag.

how to add google tag manager in my WordPress website18

Unlike Universal Analytics, you will have to enter your measurement ID in the tag configuration. To get it, set up a data stream on your Analytics’ Property tab first.

how to add google tag manager in my WordPress website19

Click Save, and you can continue with the steps we’ve explained to set up a trigger for the Universal Analytics tag. Now that you’ve set up a Google Analytics tag, the steps to manually installing Google Tag Manager on your WordPress site are complete.

  • Leave a comment below! 🙂
The Er.Pramod Adhikari!

Authored By The Er. Pramod Adhikari!

The Blogger, Author & CEO’s The Infinity Company! B.Tech in CSE (Computer Science & Engineering) From Sambhram College, Bengaluru-560097, Working Worldwide as Software(Web/App) Developer!