WP Google Tag Manager

Includes tags (code snippets) from Google Tag Manager into your site

Author:conlabzgmbh (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:3.4.2
Plugin version:1.1
Added to WordPress repository:08-10-2012
Last updated:10-01-2013
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:66
Rated by:4
Plugin URI:http://wordpress.org/extend/plugins/wp-google...
Total downloads:16 852
Active installs:1 000+
plugin download
Click to start download

Your wordpress website includes third party scripts and tools like website traffic analytics, ad banners counter by feedburner or some top lists. Google Tag Manager provides a comprehensive user interface to manage all these scripts (tags) and include them with a single plugin into your wordpress powered website.

This plugin includes both the javascript code to bring those tags into your site and the fall back iframe code to still provide functionality if javascript is disabled. Installation requires just two simple steps

  1. Install the plugin.
  2. Input the container ID in preferences

Instead of copy and pasting lots of script tags into you wordpress theme files or managing a couple of plugins for diverse services you can now serve this all from a single source - the Tag Manager. Tags are comfortably managed in the Google user interface, no need to further touch you wordpress installation.

Registration for Tag Manager (https://www.google.com/tagmanager/) is two simple steps before you receive the Container ID which is the only information the plugin requires to work properly. From now on, you have a couple of advantages:

  • a comprehensive overview of all tags you are using
  • tags can be deactivated in the Tag Manager
  • you can preview changes on your site before putting them live for your visitors
  • provide access to tags management for marketing staff - no code changes needed
  • use all the rules and macros to fine grained adjust tag usage

Besides management of tags you'll notice better loading times of your website due to asynchonous loading of scripts.

Technical stuff:

WordPress only allows placement of tag-manager-code in the footer through wp_footer action hook. So if you want to place the code directly behind the body tag you have to edit your theme like this:

...

<body>

<?php global $wp_google_tag_manager;

if(is_object($wp_google_tag_manager) && is_a($wp_google_tag_manager,"WpGoogleTagManager")){

$wp_google_tag_manager->output_manual();

} ?>

...