Installing Google Tag Manager on WordPress with GTM4WP Plugin
There are two main ways to add Google Tag Manager to your WordPress website:
- Manually inserting the GTM code into your theme
- Using a dedicated plugin
In this guide, we’ll use the plugin GTM4WP – Google Tag Manager for WordPress.
Installing the plugin
- Log in to your WordPress admin panel and go to Plugins > Add New.
- Search for: Google Tag Manager for WordPress in the top-right search bar.
The correct plugin looks like this:

- Click Install, then Activate the plugin.
- Once activated, go to Installed Plugins and click Settings under the plugin name.

Configuring the GTM Container ID
- Enter your Google Tag Manager Container ID in the field provided.
- The ID follows the format
GTM-XXXXXXX, available in your GTM account.
Option A

Option B

- Make sure the “Container mode ON/OFF” option is set to ON.

- Click Save Changes to finalize your configuration.
- Ensure that Container mode is still ON to enable proper data collection.
Once the GTM code is in place, you’ll be able to use Google Tag Manager to connect Google Analytics and other tools to your WordPress site.