The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Free

Metronet Tag Manager

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.

Top 5,000 on WordPress.org Plugin rankings
  • #14 by installs among 52 tracked plugins tagged "Google".
  • Passes 3 of 4 health checks below.
3/4

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
Active installs
20,000+ WordPress.org rounds this down
This week
482 downloads +0.6% vs the week before
Last 30 days
1,986 downloads −8.5% on a typical day
All time
291k downloads On WordPress.org since 2013
Downloads per week Every update counts as a download on WordPress.org, so release weeks spike.
Latest week
482
Typical week
431
Peak
4,722 Week of Apr 20
View as table
WeekDownloads
Week of Nov 23482
Week of Nov 16479
Week of Nov 9451
Week of Nov 2472
Week of Oct 26504
Week of Oct 19584
Week of Oct 12429
Week of Oct 5492
Week of Sep 28421
Week of Sep 21466
Week of Sep 14432
Week of Sep 7416
Week of Aug 31421
Week of Aug 24439
Week of Aug 17433
Week of Aug 10421
Week of Aug 3465
Week of Jul 27461
Week of Jul 20488
Week of Jul 13414
Week of Jul 6467
Week of Jun 29445
Week of Jun 22478
Week of Jun 15545
Week of Jun 8589
Week of Jun 1573
Week of May 25715
Week of May 181,455
Week of May 11853
Week of May 41,196
Week of Apr 271,776
Week of Apr 204,722
Week of Apr 13184
Week of Apr 6207
Week of Mar 30165
Week of Mar 23169
Week of Mar 16162
Week of Mar 9171
Week of Mar 2159
Week of Feb 23166
Week of Feb 16177
Week of Feb 9175
Week of Feb 2163
Week of Jan 26162
Week of Jan 19192
Week of Jan 12171
Week of Jan 5144
Week of Dec 29, 2025124
Week of Dec 22, 2025105
Week of Dec 15, 2025118
Week of Dec 8, 2025132
Week of Dec 1, 2025157
Active installs over time Recorded by WPFolks every day since Oct 14, 2026.

Reviews

4.8 8 ratings on WordPress.org
  • 5 7
  • 4 0
  • 3 1
  • 2 0
  • 1 0

From folks on WPFolks

No reviews from folks yet. Used it? Be the first to say how it went.

Log in to leave a review

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…

[Metronet Tag Manager] Easily Add GTM to any Website
Leon Hitchens · October 10, 2022

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.

[Metronet Tag Manager] Decent
paulbuikstra · July 19, 2018 · 1 reply

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.

Proudly supported by