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.
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.
Prerequisites
- An active WordPress account.
- Working knowledge of WordPress.
How to set up Google Tag Manager WordPress Integration?
To set up your Google Tag Manager WordPress Integration, let’s go through the following path:
A) Creating your 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.
- 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.
- 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.
- 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.
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.
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.
- Step 3: Click on the Save button to complete the Google Tag Manager WordPress Integration process.
C) Add your Tag and Publish it: Google Analytics Example
- Step 1: In your Google Tag Manager Workspace, click on the New Tag icon.
- 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.
- 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.
- 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.
- 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.
For a more detailed process, you can check out the Google Tag Manager GA4 Integration article.
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.
Conclusion
- 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
Share with us your experience of setting up the Google Tag Manager WordPress Integration. Let us know in the comments section below!
Sanchit Agarwal is an Engineer turned Data Analyst with a passion for data, software architecture and AI. He leverages his diverse technical background and 2+ years of experience to write content. He has penned over 200 articles on data integration and infrastructures, driven by a desire to empower data practitioners with practical solutions for their everyday challenges.