Linux 软件免费装
Banner图

Groundworx GTM – Simple Insert for Google Tag Manager

开发者 alexandrie
更新时间 2025年8月17日 03:23
捐献地址: 去捐款
PHP版本: 8.2 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

tracking analytics google tag manager gtm

下载

1.0.0

详情介绍:

Groundworx GTM is a lightweight plugin that cleanly adds Google Tag Manager (GTM) to your WordPress site. It uses core WordPress hooks like wp_head and wp_body_open, ensuring compatibility and avoiding messy theme edits. Features:

安装:

  1. Upload the plugin folder to /wp-content/plugins/ or install via Plugins > Add New.
  2. Activate the plugin.
  3. Go to Settings > Groundworx GTM and enter your GTM ID.
  4. Optionally choose user roles to exclude from GTM injection.
External services This plugin relies on the following third-party service: Google Tag Manager (GTM)\ • Purpose: Loads your GTM container so you can manage analytics/marketing tags from GTM.\ • When it runs: Only when a valid GTM Container ID (e.g., GTM-XXXXXXX) is saved in the plugin settings and output is enabled. If no ID is set or output is disabled, nothing is loaded.\ • What is sent and where: The plugin outputs the standard GTM bootstrap script and a <noscript> iframe. The visitor’s browser then requests:\ – https://www.googletagmanager.com/gtm.js\ – https://www.googletagmanager.com/ns.html\ These requests send standard browser metadata (IP, user agent, referrer, page URL) to Google to serve the files.\ • Scope: Front-end pages only. The plugin does not transmit admin data.\ • Policies:\ – Google Tag Manager Terms of Service\ – Google Privacy Policy\ • Data stored by this plugin: None. The plugin does not log, transmit, or store visitor data in WordPress.

常见问题:

Will this track logged-in users?

No, not if you exclude their role from the settings panel.

Where is the GTM code inserted?

  • The <script> is injected in the <head> using wp_head.
  • The <noscript> fallback is injected after <body> using wp_body_open.

What if my theme doesn’t use wp_body_open?

You'll see an admin notice prompting you to update your theme. If your theme doesn’t support wp_body_open, you can manually add it by inserting <?php wp_body_open(); ?> immediately after the opening <body> tag in your theme’s header.php file.

Do I need to edit my theme?

Usually no — most modern themes include wp_head and wp_body_open. But if your theme is older or custom, you might need to add wp_body_open() manually after <body>.

更新日志:

1.0.0