- Active installs
- 20k+
- 8 ratings
- 4.8
- Last updated
- 7 months ago
- Version
- 1.6.0
- Tested up to
- WP 7.0.9
About this plugin
Integrate Google Tag Manager into your website.
The great thing about Google Tag Manager (GTM) is that you are able to gather most of your tracking scripts in one place. You can then fire these scripts whenever you want, specified by the rules you set up. This sounds great, right? Well it is. The only problem is that sometimes it takes a bit of implementing to set these rules up. This implementation can either be setting a dataLayer variable in the dataLayer before the tag manager script is loaded, or pushing a HTML event handler with the variable “event” to the dataLayer when a button is clicked. The problem is that this isn’t always that easy to do when you don’t have the ability/access to add the code to your site.
This is where the Metronet Tag Manager plugin shines. It really unlocks the power of the dataLayer so you can easily set macros and firing rules on almost any element.
This plugin lets you:
- Easily add as many dataLayer variables on a per-post and per-page basis as you need.
- The plugin already gives you six predefined dataLayer variables that you can change/remove or test the system with. These will be loaded on all pages and posts.
- Set up separate dataLayer variables for pages that aren’t posts or pages (like archives etc).
- Lets you easily add a HTML event handler to any content link with the GTM TinyMCE button in the WYSIWYG.
- Lets you add your own unique ID or a class to each content link with the GTM TinyMCE button in the WYSIWYG.
Please note that for this plugin to work there is a slight customization that is needed. WordPress doesn’t let you load scripts straight after the opening tag which is where the GTM script needs to be placed to work correctly. To fix this you need to add <?php do_action( 'body_open' ); ?> just after the <body> tag and that’s it.
Note, if you are using WordPress 5.2. and up, contact your theme developer and ask them to insert
<?php wp_body_open(); ?>just after the opening body tag of their theme. Here is some code to show the theme developer to make it compatible with Metronet Tag Manager.
Please let us know if you have any feature requests or if you have any issues with this plugin.
Below are a couple of resources you might find valuable if you are new to Google Tag Manager
Official Google Tag Manager website
https://developers.google.com/tag-manager/
Tracking Google Analytics Events with Google Tag Manager
http://moz.com/ugc/tracking-google-analytics-events-with-google-tag-manager
Make Analytics Better with Tag Management and a Data Layer
http://cutroni.com/blog/2012/05/14/make-analytics-better-with-tag-management-and-a-data-layer/
Filtering Variables
If you choose to place variable values inside percentage signs (e.g., %replace_test%), you can filter these as necessary.
Here’s an example:
add_filter( 'gtm_replace_test', 'gtm_replace_test', 10, 3 );
function gtm_replace_test( $total_match, $match, $post_id ) {
return "replaced with content";
}
The filter name is gtm_ with the suffix of replace_test, since that content is inbetween the percentage signs.
Screenshots
Analytics
Live from WordPress.org, refreshed daily. Last refresh Nov 30, 2026.
- #14 by installs among 52 tracked plugins tagged "Google".
- Passes 3 of 4 health checks below.
Health checks
What a careful site owner looks at before installing.
- Actively maintained Last release 7 months ago
- Tested with current WordPress Tested up to 7.0.9
- Support questions answered Nothing open in the last two months
- Well rated 4.8 stars from 8 ratings
- Latest week
- 482
- Typical week
- 431
- Peak
- 4,722 Week of Apr 20
View as table
| Week | Downloads |
|---|---|
| Week of Nov 23 | 482 |
| Week of Nov 16 | 479 |
| Week of Nov 9 | 451 |
| Week of Nov 2 | 472 |
| Week of Oct 26 | 504 |
| Week of Oct 19 | 584 |
| Week of Oct 12 | 429 |
| Week of Oct 5 | 492 |
| Week of Sep 28 | 421 |
| Week of Sep 21 | 466 |
| Week of Sep 14 | 432 |
| Week of Sep 7 | 416 |
| Week of Aug 31 | 421 |
| Week of Aug 24 | 439 |
| Week of Aug 17 | 433 |
| Week of Aug 10 | 421 |
| Week of Aug 3 | 465 |
| Week of Jul 27 | 461 |
| Week of Jul 20 | 488 |
| Week of Jul 13 | 414 |
| Week of Jul 6 | 467 |
| Week of Jun 29 | 445 |
| Week of Jun 22 | 478 |
| Week of Jun 15 | 545 |
| Week of Jun 8 | 589 |
| Week of Jun 1 | 573 |
| Week of May 25 | 715 |
| Week of May 18 | 1,455 |
| Week of May 11 | 853 |
| Week of May 4 | 1,196 |
| Week of Apr 27 | 1,776 |
| Week of Apr 20 | 4,722 |
| Week of Apr 13 | 184 |
| Week of Apr 6 | 207 |
| Week of Mar 30 | 165 |
| Week of Mar 23 | 169 |
| Week of Mar 16 | 162 |
| Week of Mar 9 | 171 |
| Week of Mar 2 | 159 |
| Week of Feb 23 | 166 |
| Week of Feb 16 | 177 |
| Week of Feb 9 | 175 |
| Week of Feb 2 | 163 |
| Week of Jan 26 | 162 |
| Week of Jan 19 | 192 |
| Week of Jan 12 | 171 |
| Week of Jan 5 | 144 |
| Week of Dec 29, 2025 | 124 |
| Week of Dec 22, 2025 | 105 |
| Week of Dec 15, 2025 | 118 |
| Week of Dec 8, 2025 | 132 |
| Week of Dec 1, 2025 | 157 |
Reviews
From folks on WPFolks
No reviews from folks yet. Used it? Be the first to say how it went.
Latest on WordPress.org
My go to when getting Google Tag Manager set up on a clients site. Very simple and have had no problems setting it up on any of my wordpress sites. I prefer this plugin over similar plugins due to its simplicity and has been more secure than others. While it…
The plugin is helpful with installing Google Tag Manager. Works on WordPress multisite websites. The plugin is simple, straightforward, and more secure than a simple “insert headers or footers” plugin.
I could not verifie the search console via tag manager using this plugin. It places the code in the wrong place. Maybe i did something wrong, but it’s something you should look in to.
Simple, unobtrusive – great plugin. And whenver i see the name i always think “If young metro don’t trust you?”
I offer Google Analytics training and students always struggle with adding dataLayer variables. Your plugin really simplifies the process – Thank You!
