Skip to contentSkip to main navigation Skip to footer

How to Install Google Tag Manager WordPress? (3 Easy Steps)

Finding it difficult to install Google Tag Manager on your WordPress website?

Google Tag Manager is a centralized tool for all the tags you have for your website. It lets you control all the tags from a single dashboard. You can manage all your scripts from a single dashboard. Setting up Google Tag Manager can be tricky in the beginning, but its user-friendly interface makes it a lot easier to use, even for a beginner.

This is a simplified guide on how to install Google Tag Manager on your WordPress. But first, letā€™s see what is Google Tag Manager and how it can be useful to you. 

What Is Google Tag Manager? 

Google Tag Manager is a tag management system that allows you to add multiple code snippets to track the conversation, traffic, and other analytical data. With google tag manager you can manage all your tags from just a single dashboard. There are built-in tag templates for Google Analytics, DoubleClick, Adwords, Google Consumer Survey, and many other third-party analytics and tracking platforms. 

Google Tag Manager is mainly used to see how a campaign or a particular advertisement is doing. The tag lets you know if a website visitor who clicked your advertisement eventually completed a valuable action such as signing up for a subscription plan or making a purchase of your product

With this tool, users can deploy tags on their website without having to edit any code, a great relief for beginners and non-technical users. But if you are an advanced user or have knowledge of coding, you can also add your tracking codes with custom HTML. 

So basically, Google Tag Manager is a centralized tool that maintains all the siteā€™s tags. If you want to update the tag for any particular campaign, then you might need to adjust and edit some code snippets, which are not beginner-friendly. Even for the advanced user, it is not preferable as updating tags usually has a big chance of making an error. So, Google Tag Manager makes it easy to update as you donā€™t have to manually add code blocks to web pages. 

Google Tag Manager also ensures that the site runs properly and with a user-friendly error-checking process, it handles critical data more safely. It also ensures that your site runs properly even when there is more traffic. 

create_sandbox_for_free

How to Install Google Tag Manager in WordPress?

To set up Google Tag Manager in WordPress there are 3 simple steps you need to follow. 

Step 1: Sign Up for the Google Tag Manager Account

The very first step to installing Google Tag Manager to your WordPress website is to have a Google Tag Manager account. To do so:

google tag manager - Add a new account - gtm for wordpress
  1. Go to the Google Tag Manager website and click on ā€œStart for freeā€. The free version has a lot of features but if you want more advanced features and 24/7 support, you can opt for Premium Version.
  2. Sign in with your Google account. 
  3. Once done with signing in, you will have to create an account. For that, click on the icon provided or the ā€˜Create Accountā€ button. 
  4. You will land on an ā€œAdd a New Accountā€ page. Enter the account name and select your country from the respective fields. If you are using your companyā€™s account, then write your companyā€™s name as the account name. 
  5. Next, you will see a Container Setup. It is a collection of all configurations installed on a website, which include tags and triggers. Here, write your WordPress website name. 
  6. In the ā€œTarget Platformā€, check the web. 
  7. After completing all the requirements, hit the ā€œCreateā€ button to create an account. 
  8. Next, a pop-up for Terms and Conditions will appear. Accept that by checking the box and continuing the process by hitting the ā€œYesā€ button on the top-right corner of the interface. 
  9. Now, two codes will appear and you will need them to add Google Tag Manager to the website. 
google tag manager - Add a new account - gtm for wordpress

Step 2: Copy-paste the Tracking Codes

Now, that your Google Tag Manager code snippets, the next step to installing Google Tag Manager is to add code snippets to your WordPress website. You will need to add the tracking code to the websiteā€™s header and body via its theme. To copy and add the tracking code to your WordPress website, follow the below-mentioned steps:

  1. Open your WordPress admin dashboard.
  2. Go to ā€œAppearancesā€ from the sidebar and click on ā€œTheme Editorā€. 
  3. In the ā€œTheme Filesā€ navigation panel, search for header.php. 
  4. Now, go back to the Google Tag Manager tab and copy the Google Tag Manager code. Find <head> tag and paste the tag manager code just next to it. 
  5. Now, copy the second part of the code snippet from the Google Tag Manager and paste it just after the <body> tag. 
  6. Finally, click on ā€œUpdate Fileā€ to save all the changes. 

And now, your Google Tag Manager can be used to install any tracking codes. 

Step 3: Publish a New Tag

Google Tag Manager provides more than 50 tag types from Google products to other third-party services. If you are good at coding then you can also add custom HTML and JavaScript tags using its interface. To add a new tag, follow the below-mentioned steps:

google tag manager - Add a new tag - wordpress google tag manager - add google tag manager to wordpress
  1. In the Google Tag Manager, navigate to the ā€œWorkspaceā€ tab and then click on ā€œNew Tagā€, to add a new tag. 
  2. Name the tag from the ā€œUntilted Tagā€ in the top-left corner. Name it according to your requirements. 
  3. Next, you will have to select the tag type. In the ā€œTag Configuration, click on Choose a tag type to begin setup. There, select the tag type you want to set up.
  4. Select the tracking type, under the ā€œTrack Typeā€ dropdown. 
  5. To enter a new variable, expand the dropdown menu of variable configurations and select ā€œNew Variableā€. Here, you will have to enter the id of your tag type. 

For example, if you are creating a tag type for Google Analytics, then you will have to enter your Google Analytics tracking id. Name the variable so it can be identified easily. Save it by clicking on the ā€œSaveā€ button in the top-right corner of the interface. 

  1. Now, when you choose to trigger, a pop-up will appear, which will have several other existing triggers. You can add a new trigger by clicking on the (+) icon in the top-right corner. 
  2. Finally, after all the changes, you will have to click on the ā€œSubmitā€ button. 

Wrapping Up

And thatā€™s it for this blog. We hope this blog has helped you to add Google Tag Manager to your website, but if you still canā€™t figure out how to do it, then you can hire WordPress engineers from JustHyre. Google Tag Manager is an amazing tag management system that helps you manage, track, and move tags without editing each code snippet. It is a great tool that can help you to improve your marketing strategies and design new campaigns for your business. 

If you like reading this blog, you can also read our step-by-step guide on How to create a Gravatar for WordPress ā€“ A Simplified Guide and How to Test WordPress Security? 

icons icons icons icons icons icons icons

Stuck Somewhere?
Connect With JustHyre

Hire WordPress Engineers for custom jobs like Website Customization, SEO Optimization, Clearing a Hacked Website, Installation & Configuration & more.

Connnect with JustHyre
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *