A Guide to How to Add Google Tag Manager to WordPress
Google Tag Manager (GTM) is a free, powerful tag management tool by Google. It helps to manage analytics and marketing tags on your website. To take advantage of this popular tool, it is essential to be installed on the website in the right way. It helps to update and add different tracking codes on a website efficiently.
Tracking services such as Google Analytics, Adobe Analytics, Facebook Pixel, LinkedIn Insight, and other advertising tools require HTML or JavaScript code to your website to integrate their services. With Google Tag Manager, you can control and add these codes from a single interface without editing the website code.
When it comes to WordPress, most business owners are concerned about where and how to add google tag manager to WordPress. This tool has a great learning curve, and you have to spend time learning the need of this tool. If you’re planning to set up google tag manager to WordPress, this article has got you covered.
Setting Up Google Tag Manager to WordPress
To add google tag manager to WordPress, follow these simple steps to get started.
Step 1: Create a Google Tag Manager Account
Visit the Google Tag Manager Website to set up an account. Click the sign-up button if you don’t have an account. In the next step, you need to ‘sign in’ with your Google account. After that, you will see the Google Tag Manager’s create account page. Click on the ‘create account’ button to get started.
You can add a new account on the next screen. Enter your name and select a country in the Account Setup box. If you run a business website, you can use the company name as the account name.
Now, you have to set up your container. A container is a sum of multiple tags and triggers along with configurations installed on a website. The website name can also be a container name. Select ‘web’ under the container option, and then click on create button.
Accept the Google Tag Manager Terms and conditions to proceed further. Check the box ‘I accept the Data Processing Terms as required by GDPR’, and click the ‘Yes’ button on the top right corner. After that, a popup window will appear with code snippets to install GTM on the website.
Step 2: Add Google Tag Manager Code to WordPress
Login to the WordPress dashboard and install the ‘insert header and footers’ plugin. For activation, go to setting and then insert headers and footers page. There are boxes for adding header and footer code. Now, go back to your Google Tag Manager account to copy the code. Paste the code into the ‘Scripts in Header’ box. Likewise, copy the other code from Tag Manager Account and insert it into the ‘Scripts in Footer’ box. After that, don’t forget to save changes.
Step 3: Verifying GTM Installation
There are different ways to verify GTM installation on your website. The best method is to verify with Google Tag Assistant. It is a browser extension used for testing and debugging Google tracking codes. After installing this extension, open the website in a new tab. Now, click the tag assistant icon to enable it and reload the page.
Tag Assistant will show all the tracking codes added on site. When it shows your GTM tracking id, the installation is completed. A GTM tag will be displayed in yellow color, showing up an error. It isn’t an error and disappears automatically.
Step 4: Connecting GA with GTM
When you add Google Tag Manager code on the website, GTM is used to set up analytics. If you are using Google Analytics and moving to GTM, make sure to follow the GTM migration steps to secure your data.
Follow these steps to add a Google Analytics account to your website:
- Create a new Google Analytics account if you don’t have any
- After setting up an account, navigate to admin, and click property settings
- Copy the tracking ID
- Go to the tag manager account to create a new tag
- Enter the tag name ‘GA Page view – All Pages’
- Click tag configuration, and choose universal analytics
- Click the Google Analytics Settings and choose ‘new variable’
- Enter the variable name as ‘GA Tracking ID’ on the popup window, and paste the tracking ID you copied earlier
- Click the ‘triggering’ option and select the ‘All Pages’ default variable.
Once you have created a variable for GA tracking ID, you can use it for all GA tags in the future. There is no need to copy and paste the GA ID every time.
Eliminating WordPress Admins
Google Analytics helps to track the number of people who visit your website. Therefore, it is necessary to omit your website visits or internal traffic.
GTM Successfully Added
Google Tag Manager and Google Analytics have successfully added to your website. Now, it’s time to use GTM to track visitor actions, get analytics data to understand user behavior on your website, and drive more traffic to meet business goals.
GTM – An Essential Tool in Digital Marketing
Google Tag Manager allows you to easily combine and push marketing tools’ scripts securely with a friendly user interface. This tool helps to set a range of tags including Google Analytics and Google AdWords. Numerous reasons make Google Tag Manager an important tool in digital marketing. The major one is combining all scripts at a place without any hassle.
- If you’re a small business website owner, you may have sufficient resources to push tracking code to the WordPress website.
- If you’re working for an established business, pushing a simple script to production can affect your budget.
This step-by-step guide states how to add google tag manager to WordPress. You should be ready to start using Google Tag Manager to deploy your tags. It joins all your tracking scripts into a single script that’s easy to add and manage. Considering the fact that Google has offered an official plugin to make the integration easier than ever, the whole process can be done in a matter of minutes.