How to Install & Set up Google Tag Manager WordPress Integration? 3 Easy Steps

By: Published: December 10, 2021

Google Tag Manager WordPress - Featured Image

Today apart from your On-Premise business setup, selling your products and services online has become the new normal owing to several advantages such as Global Audience, Cost Effectiveness, Anytime Product Availability, etc. WordPress is an immensely popular Website Creation platform that simplifies the process of hosting, creating, and managing your website. Fueling more than 42% of the Web, WordPress has assisted small businesses, eCommerce Stores, bloggers, etc., allowing them to effortlessly design and manage their Website with just a few clicks.

Often when want to track conversions of your Facebook Ad Campaigns or analyse your marketing efforts on Google Analytics, you have to manually insert code snippets onto every page of your website. Google Tag Manager WordPress Integration can make this a seamless process by allowing you to easily add and manage all of these scripts from a single dashboard. With the Google Tag Manager WordPress Integration, you can independently manage all your tags allowing your developers to focus on their core objectives rather than performing mundane code updates.

In this article, you will learn how to effectively set up Google Tag Manager WordPress Integration for your website. You will also learn how to add a Google Analytics Tag via the Google Tag Manager WordPress Integration.

Table of Contents

What is WordPress?

Google Tag Manager WordPress - WordPress Logo
Image Source

WordPress is a Free, Open-Source Content Management System(CMS) for seamlessly creating, publishing, and managing websites. Evolving from being a Blogging platform, WordPress offers various WordPress Themes and Plugins allowing you to build business websites, eCommerce stores, forums, portfolios, membership sites, etc. From a technical point of view, WordPress is written in PHP that uses a MySQL Database and is licensed under GPLv2, so you can use or modify your website for free. 

WordPress eliminates the need for knowledge of technical programming languages ​​for designing and building websites according to your specifications. Using the drag and drop functionality, you can effortlessly create your Website from scratch in no time. A broad range of WordPress Themes is available to change the look and feel of your website with just a few clicks. To improve your website visibility, WordPress is already SEO-enabled allowing users to create content that appeals to both visitors and search engines. Well-written Documentation for Developers and a growing WordPress Community can always assist you with solving all your queries effectively.

What is Google Tag Manager?

Google Tag Manager WordPress - Google Tag Manager Logo
Image Source

Google Tag Manager is an effective Tag Management Solution that allows you to manage and deploy Marketing Tags (code snippets or tracking pixels) for Analytics, Marketing and Testing without manually changing the code. Google Tag Manager includes a piece of container Javascript code that is placed in the source code’s head and body sections of your website pages. The code in the body section act as a backup for the head tag by assisting in tracking users visiting the website via browsers or devices that do not support Javascript. 

Google Tag Manager is a simple and free tool that eliminates the hassle of code manipulation of website tags and JavaScript code snippets. For instance, the Google Tag Manager WordPress Integration easily allows you to track Leads, Website Traffic, etc., and all your marketing efforts from a centralised location.

Why do you need a Google Tag Manager WordPress Integration?

The Google Tag Manager WordPress Integration can be extremely useful in the following scenarios:

  • The repetitive process of getting a tracking code, getting it inserted into your pages, and implementing your actions is a time-consuming job. Google Tag Manager(GTM) makes it super easy to add, remove and manage tags.
  • Testing your Tags manually is an important and challenging step before deploying them into the real world. GTM provides you with a Preview and Debug mode that displays information regarding triggers and data that is there within tags allowing you to easily troubleshoot errors.
  • Whenever you need to add or update code snippets on your website, it can get messy as you have to ensure that everything is in the right place to avoid breaking your site.
  • Without GTM you always have to burden your Developers with installing the tags every time you need to some modifications.

Simplify WordPress ETL and Analysis Using Hevo’s No-code Data Pipeline

Hevo Data is a No-code Data Pipeline that offers a fully managed solution to set up Data Integration for 100+ Data Sources (Including 40+ Free sources such as Google Analytics, WordPress) and will let you directly load data from WordPress to a Data Warehouse or the Destination of your choice for free. It will automate your data flow in minutes without writing any line of code. Its fault-tolerant architecture makes sure that your data is secure and consistent. Hevo provides you with a truly efficient and fully automated solution to manage data in real-time and always have analysis-ready data. 

Get Started with Hevo for Free

Let’s look at some of the salient features of Hevo:

  • Fully Managed: It requires no management and maintenance as Hevo is a fully automated platform.
  • Data Transformation: It provides a simple interface to perfect, modify, and enrich the data you want to transfer. 
  • Real-Time: Hevo offers real-time data migration. So, your data is always ready for analysis.
  • Schema Management: Hevo can automatically detect the schema of the incoming data and map it to the destination schema.
  • Connectors: Hevo supports 100+ Integrations to SaaS platforms such as WordPress, FTP/SFTP, Files, Databases, BI tools, and Native REST API & Webhooks Connectors. It supports various destinations including Google BigQuery, Amazon Redshift, Snowflake, Firebolt, Data Warehouses; Amazon S3 Data Lakes; Databricks; and MySQL, SQL Server, TokuDB, DynamoDB, PostgreSQL Databases to name a few.  
  • Secure: Hevo has a fault-tolerant architecture that ensures that the data is handled in a secure, consistent manner with zero data loss.
  • Hevo Is Built To Scale: As the number of sources and the volume of your data grows, Hevo scales horizontally, handling millions of records per minute with very little latency.
  • Live Monitoring: Advanced monitoring gives you a one-stop view to watch all the activities that occur within Data Pipelines.
  • Live Support: Hevo team is available round the clock to extend exceptional support to its customers through chat, email, and support calls.
Sign up here for a 14-Day Free Trial!


  • An active WordPress account.
  • Working knowledge of WordPress.

How to set up Google Tag Manager WordPress Integration?

With the Google Tag Manager WordPress Integration, you get a nice & easy dashboard where you can effectively add, remove, and manage all your tags. To set up your Google Tag Manager WordPress Integration, let’s go through the following path:

A) Creating your Google Tag Manager Account

In the first phase of Google Tag Manager WordPress Integration, follow these simple steps to create your free Google Tag Manager Account:

  • Step 1: To start your Google Tag Manager WordPress Integration journey, open the Google Tag Manager website and sign in using your Google account by clicking on the Signup button.
  • Step 2: Now, the Google Tag Manager’s Create Account page will be displayed. Click on the Create Account button.
Google Tag Manager WordPress - Create Account Button
Image Source
  • Step 3: In the next “Add a New Account” screen, enter your Account Name(e.g. your company’s name). Select your country from the Country drop-down menu.
  • Step 4: Now you have to set up your container that represents the collection of tags, triggers, and all configurations installed on a website. You can type in your website name as the Container Name. 
Google Tag Manager WordPress - Add a New Account Screen
Image Source
  • Step 5: Click on the Web button under the Where to use Container option. Finally, click on the Create button to create your Google Tag Manager Free account for the Google Tag Manager WordPress Integration.
Google Tag Manager WordPress - Container Setup Web Button
Image Source
  • Step 6: A Google Tag Manager Terms of Service Agreement window will appear. Accept the terms by clicking on the box next to ‘I accept the Data Processing Terms as required by GDPR.’ typically at the bottom, and then click on the ‘Yes’ button present on the top right corner of your screen.

Upon completion of the first phase of your Google Tag Manager WordPress Integration, the Install Google Tag Manager window will pop up on your screen containing the code snippets for the head and body sections of your WordPress website.

Google Tag Manager WordPress - Install Google Tag Manager Pop-up Window
Image Source

You can always access these code snippets by clicking on your Google Tag manager ID present on the top of your screen next to the preview option. 

Google Tag Manager WordPress - Tag Manager Container ID
Image Source

B) Adding Google Tag Manager to WordPress

To install the Google Tag Manager on WordPress, follow these easy steps:

  • Step 1: Log in to your WordPress Dashboard and search for the Insert Header and Footers plugin. Install this free plugin and activate it.
  • Step 2: Navigate to Settings > Insert Headers and Footers page and paste the Header Code Snippet from Google Tag Manager in the Scripts in Header field and the Body Code Snippet in the Scripts in Footer field respectively.
Google Tag Manager WordPress - WordPress Insert Headers and Footers Plugin option
Image Source
  • Step 3: Click on the Save button to complete the Google Tag Manager WordPress Integration process. 
Google Tag Manager WordPress - Insert Headers and Footers Scripts Box
Image Source

C) Add your Tag and Publish it: Google Analytics Example

After successfully setting up your Google Tag Manager WordPress Integration, you can create a Tag and publish it. Follow the steps to create a tag for Google Analytics via the Google Tag Manager WordPress Integration in this example:

  • Step 1: In your Google Tag Manager Workspace, click on the New Tag icon.
Google Tag Manager WordPress - New Tag Option
Image Source
  • Step 2: Rename your tag by clicking on the Untitled Tag heading.
  • Step 3: Click on the choose a tag type to begin setup icon and click on the Universal Analytics option.
  • Step 4: In the Track Type field, choose the Page View Option. From the Google Analytics Settings drop-down menu, click on the New Variable Option and name it accordingly.  
Google Tag Manager WordPress - New Variable option
Image Source
  • Step 5: Type in your Google Analytics tracking ID in the tracking Field. You can get this ID from your Google Analytics account’s Admin Tab. Navigate to Tracking Info > Tracking Code and UA tracking ID will be displayed. 
Google Tag Manager WordPress - Google Analytics Tracking ID
Image Source
  • Step 6: Click on the Save button when you are done. 
  • Step 7: Next, click on the choose a trigger to make this tag fire icon and select the All Pages option for the Basic Analytics. Finally, click on the Save button is present on the top right corner.
Google Tag Manager WordPress - Triggering Option
Image Source
  • Step 8: Now, click on the Tags option from the left side menu on the Workspace Tab.  Then, click on your Google Analytics Tag and click on the Submit button. After a few hours, you can directly view your website’s reports on Google Analytics. This completes your Google Analytics Tag creation and publishing process via the Google Tag Manager WordPress Integration. 
Google Tag Manager WordPress - Google Tag Manager Submit Button
Image Source

For a more detailed process, you can check out the Google Tag Manager GA4 Integration article.


In this article, you have learned how to set up your Google Tag Manager WordPress Integration for your WordPress Website. You have also learned how to easily implement a Google Analytics Tag via the Google Tag Manager WordPress Integration. Using Google Tag Manager, you directly manage your Tags without the need for any programming knowledge. This is a Robust and Powerful Tag Management platform that allows you to eliminate the Manual Code Updation process and manage multiple Tags from a single source of truth.

In addition to WordPress, you would be using a wide variety of applications across your business for Marketing, Accounting, Customer Relationship Management, Human Resources, etc. To better understand the health and performance of your company, you need to integrate data from all these applications and do a thorough business analysis. To efficiently process this astronomical amount of data, you need to invest a portion of your engineering bandwidth to Integrate, Cleanse, Transform, and Load your data into your data warehouse or a destination of your choice. All of these challenges can be effectively solved with a Cloud-Based ETL tool like Hevo Data.

Visit our Website to Explore Hevo

Hevo Data, a No-code Data Pipeline can help you transfer and integrate your data from a vast sea of Data Sources such as WordPress & Google Analytics into a Data Warehouse or a Destination of your choice for free. It is a fully automated and secure platform that doesn’t require you to write any code!

If you are using E-Commerce platforms such as WooCommerce, WordPress, REST APIs, etc in your business and searching for a Stree-Free alternative to Manual Data Integration, then Hevo can comfortably automate this for you. Hevo with its strong integration with 100+ sources & BI tools (Including 40+ Free Sources such as WordPress, Google Analytics) allows you to not only export data from your desired data sources & load it to the destination of your choice, but also transform & enrich your data to make it analysis-ready so that you can focus on your key business needs and perform insightful analysis using BI tools. 

Want to take Hevo for a ride? Sign Up for a free 14 day Trial! and simplify your Data Integration process. You can check out the Pricing Details to select a plan according to your business needs. 

Share with us your experience of setting up the Google Tag Manager WordPress Integration. Let us know in the comments section below!

Former Research Analyst, Hevo Data

Sanchit Agarwal is a data analyst at heart with a passion for data, software architecture, and writing technical content. He has experience writing more than 200 articles on data integration and infrastructure.

No-code Data Pipeline For WordPress