Linux 软件免费装
Banner图

GTM4WP - A Google Tag Manager (GTM) plugin for WordPress

开发者 duracelltomi
更新时间 2024年4月4日 21:20
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 6.5
版权: GPLv3
版权网址: 版权信息

标签

google analytics google analytics google tag manager gtm facebook pixel google ads adwords remarketing tag manager facebook ads personalisation facebook remarketing google adwords adwords remarketing google optimize google ads remarketing

下载

1.15.2 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 1.10.1 1.11 1.11.1 1.11.2 1.11.3 1.11.4 1.11.5 1.11.6 1.2 1.3 1.3.2 1.6.1 1.7 1.7.1 1.7.2 1.8 1.9 1.9.1 1.9.2 1.16.2 1.5 1.14.2 1.15.1 1.20 1.20.1 1.20.2 1.4 1.6 1.8.1 1.14.1 0.8.1 1.16.1 1.3.1 1.13 1.13.1 0.5.1 1.12.2 1.14 1.5.1 0.1 0.2 0.3 0.4 1.10 1.15 0.5 1.18.1 0.6 1.12.3 0.7 0.7.1 0.8 1.12 1.12.1 1.16 1.18 1.19 1.19.1

详情介绍:

Google Tag Manager (GTM) is Google's free tool for everyone to manage and deploy analytics and marketing tags as well as other code snippets using an intuitive web UI. To learn more about this tool, visit the official website. This plugin places the GTM container code snippets onto your WordPress website so that you do not need to add it manually. Multiple containers are also supported! The plugin complements your GTM setup by pushing page meta data and user information into the so called data layer. Google's official help pages includes more details about the data layer. PHP 7.4 is required to use this plugin. GTM container code placement The original GTM container code is divided into two parts: The first part is a javascript code snippet that is added to the <head> section of every page of the website. This part is critical to enable all features of GTM, and this plugin helps to place this part correctly on your site. The second part is an iframe snippet that acts as a failsafe/fallback should users' JavaScript be disabled. Google recommends – for best performance – to place this code snippet directly after the opening <body> tag on each page. Albeit not ideal, it will work when placed lower in the code. This plugin provides a code placement option for the second code snippet. If your WordPress theme is compatible with the additions of WordPress 5.2 then this plugin will place this second code to the right place. Users of the Genisis theme, GeneratePress theme, Elementor, Oxygen Builder and Beaver Builder Theme will also have this placed correctly. To utilize this, set the compatibility mode in plugin options to off. All other users can place this second code snippet using a custom PHP code ("Manually coded" option) or select the so called "Footer" option to add the code lower in the code (it is not the recommended way but will work) Basic data included Browser / OS / Device data Data is provided using the WhichBrowser library: http://whichbrowser.net/ Weather data (beta) Push data about users' current weather conditions into the dataLayer. This can be used to generate weather-related audience/remarketing lists on ad platforms and allows for user segmentation in your web analytics solutions: Weather data is queried from Open Weather Map. Depending on your websites traffic, additional fees may apply: http://openweathermap.org/price An (free) API key from OpenWeatherMap is required for this feature to work. ipstack.com is used to determine the site visitor's location. A (free) API key from IPStack.com is required for this feature to work: https://ipstack.com/product Media player events (experimental) Track users' interaction with any embedded media: DataLayer events can be chosen to fire upon media player load, media is being played, paused/stopped and optionally when the user reaches 10, 20, 30, ..., 90, 100% of the media duration. Tracking is supported for embedded media using the built-in oEmbed feature of WordPress as well as most other media plugins and copy/pasted codes. Players injected into the website after page load are not currently supported. Scroll tracking Fire tags based on how the visitor scrolls from the top to the bottom of a page. An example would be to separate "readers" (who spend a specified amount of time on a page) from "scrollers" (who only scroll through within seconds). You can use these events to fire Analytics tags and/or remarketing/conversion tags (for micro conversions). Scroll tracking is based on the solution originally created by Original script: http://cutroni.com/blog/2012/02/21/advanced-content-tracking-with-google-analytics-part-1/ Blacklist & Whitelist Tag Manager tags, triggers and variables To increase website security, you have the option to white- and blacklist tags/triggers/variables. You can prevent specific tags from firing or the use of certain variable types regardless of your GTM setup. If the Google account associated with your GTM account is being hacked, an attacker could easily execute malware on your website without accessing its code on your hosting server. By blacklisting custom HTML tags and/or custom JavaScript variables you can secure the Tag Manager container. Integration Google Tag Manager for WordPress integrates with several popular plugins. More integration to come! Server side containers If you are using a server side container you can enter your custom domain name and custom path to load gtm.js from your there. Exclude specific user roles from being tracked You can set which user roles needs to be excluded from tracking when a user with that role visits the frontend. This will completely disable the container code for that user.

安装:

  1. Upload duracelltomi-google-tag-manager-for-wordpress to the /wp-content/plugins/ directory
  2. 通过 WordPress 的“插件”菜单激活插件
  3. Go to Settings / Google Tag Manager and enter your Google Tag Manager container ID and set additional options

屏幕截图:

  • Basic settings
  • Events
  • Integration panel
  • Advanced settings
  • Scroll tracking

升级注意事项:

1.20.2 Bugfix release 1.20.1 Bugfix release 1.20
  • Lots of deprecated features removed, please read announcement post before upgrading!
1.19.1 Bugfix release 1.19 Added features 1.18.1 Bugfix release 1.18 Bugfixes and new features 1.17 Added features 1.16.2 Bugfix release 1.16.1 Bugfix release 1.16 Maintenance release with lots of code updates without adding functionality. 1.15.2 Bugfix release 1.15.1 Bugfix release 1.15 Various updates, fixes and improvements 1.14.2 Bugfix release 1.14.1 Bugfix release 1.14 Initial support for WooCommerce Blocks, removed jQuery usage in JavaScript codes (except for WooCommerce related codes) 1.13.1 Bugfix release 1.13 Updated support for Google Ads dynamic remarketing with WooCommerce, added support for server side containers and Cookiebot + fixes 1.12.3 Updated compatible WooCommerce version and added an important message to the changelog for WooCommerce users 1.12.2 Bugfix release + read changelog for important v1.12.x changes 1.12.1 Bugfix release + read changelog for important v1.12.x changes 1.12 Removed several deprecated features, dropped support for WooCommerce versions before 3.2, introduced GA4 data layer variables, deprecated classic ecommerce and Google Ads remarketing varibale 1.11.6 Bugfix release 1.11.5 Fixed: new Google Optimize container ID format accepted now 1.11.4 Bugfix and updated tested version number for WooCommerce 1.11.3 Some bugfixes and adding support for the latest WordPress and WooCommerce version 1.11.2 Replaces v1.11.1 1.11.1 WooCommerce integration related fixes. 1.11 Please read the changelog very carefully as there are many important changes and removed features which could need your attention before updating! 1.10.1 Bugfix release 1.10 Better WordPress 5.2 integration, support for brands in WooCommerce, access cart content in data layer, more stable double transaction tracking prevention on mobiles and more! 1.9.2 Fixed possible PHP warning if geo data or weather data feature is turned on 1.9.1 Bugfix version 1.9 New AMP GTM support, full Google Optimize support, lots of WooCommerce tracking improvements. 1.8.1 Bugfix version fixing some issues around WooCommerce tracking and GTM environments. Also adds IP address into the data layer. 1.8 Lots of new features and some important changes, please read the changelog to ensure your measurement does not break 1.7.2 Bugfix release: many little fixes, event better WooCommerce 3.x compatibility 1.7.1 Bugfix release: better PHP 5.3 and WooCommerce 2.6.x compatibility 1.7 Better WooCommerce 3.x compatibility and new features 1.6.1 Bugfix release. 1.6 If you are using WooCommerce and enhanced ecommerce, please add gtm4wp.changeDetailViewEEC to the ecommerce helper trigger 1.5.1 Fixed: clicks on products in product list pages redirected to undefined URLs with some themes. 1.5 Lots of WooCommerce ecommerce codes has been changed and extended, please double check your measurement after upgrading to this version! 1.4 Several additions and fixes, breaking changes on media player tracking, please read changelog before upgrade 1.3.2 Quickfix release for 1.3.x: major changes and improvements in the enhanced ecommerce implementation for WooCommerce. If you are already using this beta feature, please read the changelog before upgrading! 1.3.1 Quickfix release for 1.3: major changes and improvements in the enhanced ecommerce implementation for WooCommerce. If you are already using this beta feature, please read the changelog before upgrading! 1.3 Major changes and improvements in the enhanced ecommerce implementation for WooCommerce. If you are already using this beta feature, please read the changelog before upgrading! 1.2 New release with lots of fixes from the past months and new features like multiple container support! 1.1.1 This is a bugfix release to address some issues with v1.1 1.1 New! Track popular media players embedded into your website! 1.0 First stable release, please read changelog for details! 0.9.1 Bugfix release for WooCommerce users with ecommerce tracking enabled 0.9 Many bug fixes, important fixes for WooCommerce users 0.8.2 Another bugfix release for WooCommerce users with Enhanced Ecommerce enabled 0.8.1 Bugfix release for WooCommerce users with Enhanced Ecommerce enabled 0.8 This version introduces Enhanced E-commerce implementation for WooCommerce. Please note that this feature of the plugin is still experimental and the feature of Google Analytics is still in beta. Read the plugin FAQ for details. 0.7.1 If you are using WooCommerce and updated to 2.1.x you SHOULD update immediately. This release includes a fix so that transaction data can be passed to GTM. 0.7 Improved code so that Webmaster Tools verification can work using your GTM container tag. Blacklist or whitelist tags and macros to increase security of your Tag Manager setup. Fixed: WhichBrowser library was missing from 0.6 0.6 Improved add-to-cart events for WooCommerce, added browser/OS/device infos and post count infos. 0.5.1 Bug fix release for WooCommerce users. 0.5 Besides of some fixes this version includes scroll tracking events for Google Tag Manager. 0.4 Important change: Tag Manager event name of a WooCommerce successful order has been changed. See changelog for details. 0.3 This is a minor release. If you are using WooCommerce you should update to include more accurate Google Ads dynamic remarketing feature. 0.2 BACKWARD INCOMPATIBLE CHANGE: Names of Tag Manager click events has been changed to comply with naming conventions. See changelog for details. Do not forget to update your Tag Manager container setup after upgrading this plugin! 0.1 This is the first public beta, no upgrade is needed.

常见问题:

How can I ...

Tutorials for various Google Tag Manager settings and implementation are available on the plugin's website: https://gtm4wp.com/setup-gtm4wp-features

PayPal / 3rd party payment gateway transactions in WooCommerce are not being tracked in Google Analytics

PayPal and some other 3rd party payment gateways do not redirect users back to your website upon successful transaction by default. It offers the route back for your customer but it can happen that users close the browser before arriving at your thankyou page (aka. order received page). This means that neither Google Analytics tags or any other tags have the chance to fire. Enable auto-return in your payment gateway settings. This will instruct them to show a quick info page after payment and redirect the user back to your site. This will improve the accuracy and frequency of tracked transactions.

Purchase event is not tracked with WooCommerce

If you are using a 3rd party plugin that alters the default order received page in a way that does not utilize the integration hooks of WooCommerce then this can happen. Either stop using this 3rd party plugin or ask them to better mimic the behavior of the default order received page by supporting the woocommerce is_order_received_page and the woocommerce_thankyou actions and filters.

Why isn't there an option to blacklist tag/variable classes

Although Google recommends to blacklist tags and variables using classes, people struggle to know which tags/variables gets affected. Therefore I opted for individual tags and variables rather than classes on the blacklist tabs. Regarding variables; ensure they are not part of any critical tags as blacklisting such variables will render said tags useless.

How can I track scroll events in Google Tag Manager?

Google Tag Manager supports basic scroll depth tracking based on percentage or pixels natively. This plugin adds additional scroll tracking events, more focused on capturing the users' intent and/or engagement. There are five dataLayer events you can use in your rule definitions:

  • gtm4wp.reading.articleLoaded: the content has been loaded
  • gtm4wp.reading.startReading: the visitor started to scroll. The timeToScroll dataLayer variable stores duration since the article loaded (in seconds)
  • gtm4wp.reading.contentBottom: the visitor reached the end of the content (not the page!). timeToScroll dataLayer variable updated
  • gtm4wp.reading.pagebottom: the visitor reached the end of the page. timeToScroll dataLayer variable updated
  • gtm4wp.reading.readerType: based on time spent since article loaded we determine whether the user is a 'scanner' or 'reader' and store this in the readerType dataLayer variable
Example use cases: using these events as triggers, you can fire Google Universal Analytics and/or Google Ads remarketing/conversion tags to report micro conversions and/or to serve ads only to visitors who spend more time reading your content.

更新日志:

1.20.2 1.20.1 1.20 THE BIG CLEANUP RELEASE! Lots of deprecated features removed. The code of WooCommerce integration was cleaned and restructured, if you have any custom code that relies on GTM4WP internal data structure, please update the plugin on a test version of your website before updating your live site! 1.19.1 1.19 WARNING! Universal Analytics / GA3 ecommerce events deprecated! Please update your GTM setup so that it does not rely on any of the following GTM4WP events and the old ecommerce data layer: 1.18.1 1.18 1.17 1.16.2 1.16.1 1.16 This plugin version does not add or update any functionality. After recent events, the code of the plugin has been checked line by line to see where additional security checks can be added. The code has been formatted to better support readability for other programmers. Deprecated: 1.15.2 Full scan of the plugin is also in works to fix any other possible XSS issue. 1.15.1 Note to plugin users: I sincerely appologize for the vulnerabilities. To make sure, such cases do not happen again, the next version will be fully dedicacted to go through every peace of code and make sure proper data processing is happening in GTM4WP. 1.15 1.14.2 1.14.1 1.14 1.13.1 1.13 WARNING! If you are using the geo or weather options of this plugin, make sure your hosting is using PHP 7.0 or newer! If you are using the WooCommerce integration with enhanced ecommerce, once again you will need to update your GTM container. Please check the setup article to see what needs to be changed. The goal is to keep this setup in the upcoming versions. 1.12.3 No new or updated functionality, but updated WooCommerce compatibility. IMPORTANT! If you are using the WooCommerce integration and enhanced ecommerce, please update your ecommerce event trigger to include gtm4wp.orderCompletedEEC as well. https://gtm4wp.com/how-to-articles/how-to-setup-enhanced-ecommerce-tracking 1.12.2 If you are upgrading from 1.11.x, please read the previous changelog entry for v1.12 1.12.1 If you are upgrading from 1.11.x, please read the previous changelog entry for v1.12 1.12 WARNING! If you are using the blacklist/whitelist feature of the plugin, review these options after upgrade as they could break because of a fundamental rework of this feature. 1.11.6 1.11.5 1.11.4 1.11.3 1.11.2 WARNING! If you are upgrading directly from v1.10.x, please read the changelog of v1.11 since it includes many important notices! No change in plugin code, WP.org deployment of v1.11.1 included wrong directories 1.11.1 WARNING! If you are upgrading directly from v1.10.x, please read the changelog of v1.11 since it includes many important notices! 1.11 WARNING! Please read the changelog very carefully as there are many important changes and removed features which could need your attention before updating! ! Planned deprecation of support for WooCommerce 2.x-3.1.x with next plugin version ! ! Planned deprecation of support for WordPress 4.x with next plugin version ! 1.10.1 1.10 1.9.2 1.9.1 1.9 1.8.1 1.8 1.7.2 1.7.1 1.7 1.6.1 1.6 1.5.1 1.5 Lots of WooCommerce ecommerce codes has been changed and extended, please double check your measurement after upgrading to this version! 1.4 1.3.2 1.3.1 1.3 Major changes to the Enhanced Ecommerce implementation of the WooCommerce integration! 1.2 1.1.1 1.1 1.0 The plugin itself is now declared as stable. This means that it should work with most WordPress instances. From now on each version will include features labeled as: If you see any issue with beta or experimental functions just disable the checkbox. Using this error messages should disappear. Please report all bugs found in my plugin using the contact form on my website. 0.9.1 0.9 0.8.2 0.8.1 0.8 0.7.1 0.7 0.6 0.5.1 0.5 0.4 0.3 0.2 0.1