Bobcares

Adding GTM to WordPress | Effective tactics

by | Aug 8, 2022

Adding GTM to WordPress enables the deployment and updating of various code snippets, or “tags,” on the website. All questions, no matter how small, are answered by Bobcares as part of our WordPress Support Service.

Adding GTM to WordPress

With the help of Google Tag Manager, a free tool for managing tags on websites, we can deploy and modify various tags on our website.

It takes a few lines of JavaScript or HTML code to integrate various tracking services like Google Analytics, Adobe Analytics, Facebook Pixel, LinkedIn Insight, and advertising tools like Google Ads.

adding gtm to wordpress

Without changing the code of our website, we can quickly add and manage all these codes using Google Tag Manager.

Configuring Google Tag Manager

Use the same Google account we used to sign up for Google Analytics on the Google Tag Manager website. We will arrive at the add new account page after logging in. Just enter a name for our account, then press the continue button.

We must now include a container in our account. A website or an app for iOS or Android could serve as a container. We will use the web in this instance. The domain of our website can be used as the container name. For each account, we can add a number of containers. Click the Create button to continue once we’re finished.

Now that Google Tag Manager has created our account with the container, we can access the dashboard for the container. The appearance would be similar to this:

adding gtm to wordpress

Adding new Tag

As soon as our Google Tag Manager account is prepared, adding a new tag is the next step.

  1. Firstly, select “create new tag.”
  2. Then the next step is to select a tagged product.
  3. For now, we’ll go with Google Analytics. However, we can always add more tags and pick various products based on our requirements. To add any additional custom code snippets, we can even click on custom HTML.
  4. After selecting Google Analytics, we will be given the option to choose between Classic Analytics and Universal Analytics. When we select universal analytics, we are prompted for our analytics tracking ID.
  5. This tracking ID is a unique code that identifies the website for Google. By logging into our Google Analytics account and going to the Admin tab, we can get this ID.
  6. Then choose the property and account for our website, and then click the tracking info link to expand it. The tracking code link will appear.
  7. When we click on the tracking code, the tracking code page and our UA tracking ID are both displayed.
  8. Then in Google Tag Manager, copy the UA tracking ID and paste it. Click the continue button after selecting Page View under track type.
  9. Then tag configuration wizard will now ask us when we want this tag to be fired. Select all pages, then press the create button.
  10. Google Tag Manager will now display a tracking code that we must insert into our WordPress site. This code must be copied.

Tag Manager Code in WordPress Addition

  1. Firstly, we must install and activate the Insert Headers and Footers plugin.
  2. Then we must go to Settings after activation.
  3. Then add the headers and footers.
  4. Finally to save the settings, paste the tag manager code in the header section and press the save button.

We can also include the Google Tag Manager code in our WordPress theme or child theme if we don’t want to install a plugin. Simply add the code after the body> tag in the header.php template.

Publish the Container

Google Tag Manager tags won’t go live until the container is published. Go to the Google Tag Manager dashboard and press the publish button after that.

Additionally, Google Tag Manager will display the tags that were fired with each page view when we preview our website.

That’s it; Google Tag Manager has been successfully installed and configured on our WordPress website.

[Looking for a solution to another query? We are just a click away.]

Conclusion

In conclusion, we can deploy and modify a variety of tags on our website with the aid of Google Tag Manager, a free tool for managing tags on websites.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.