Linux 软件免费装
Banner图

WP Google Tag Manager

开发者 conlabzgmbh
更新时间 2013年1月11日 01:42
PHP版本: 3.0 及以上
WordPress版本: 3.4
版权: GPLv2 or later
版权网址: 版权信息

标签

google tags tag manager code snippet tagmanager

下载

1.0 1.1

详情介绍:

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: Besides management of tags you'll notice better loading times of your website due to asynchonous loading of scripts. [youtube http://www.youtube.com/watch?v=KRvbFpeZ11Y] 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(); } ?> ...

安装:

  1. Upload folder wp_google_tag_manager into /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Enter your container id in 'Settings' --> 'WP Google Tag Manager' menu in wordpress

屏幕截图:

  • Wp Google Tag Manager settings
  • Container id location 1
  • Container id location 2

升级注意事项:

  • version 1.0
  • version 1.1

常见问题:

What is google tag manager

See google tag manager.

Where can I find my container id

Log in Google Tag Manager

  • Navigate to "Container" --> "Container Settings" --> "Container Snippet" --> iframe src="//www.googletagmanager.com/ns.html?id=GTM-1A23" GTM-1A23 would be your container id. See Screenshot 2.
  • Or Navigate to "Versions" --> highestNumber --> "Container Public ID" GTM-1A23 would be your container id. See Screenshot 3.

更新日志:

1.0 1.1