I am happy to announce that v1.8 of this Google Tag Manager plugin is out, at least in beta stage. If you read the changelog, you will see that this version includes by far the most changes, additions in the history of this plugin. Let’s go through those changes.

GTM4WP v1.8 beta 1

Updated and new features will be explained later in separate blog posts. In this announcement I would like to list all change with a little description.


Using weather data in your GTM setups is a fancy and interesting opportunity but also rarely used nowadays. There can be circumstances where the actual weather at the location of your site visitor is important and you might want to either customize the experience or add this user to a remarketing list. Including the weather data is not easy as we need to first translate the IP address of your visitor to latitude and longitude coordinates and then query a weather service for details around those geo coordinates. Unfortunately this routine included a bug in v1.7.x that caused a white screen error.

WooCommerce is quite complex and Google Analytics’ Enhanced Ecommerce is even more complex. Bringing both worlds together is a challenge especially if it comes to theme compatibility. Ecommerce actions can happen all over your webshop. Adding a product to the cart is the action that can happen on various pages using various user interactions. On the cart page for example, if a user pressed the Enter key in a quantity field to save changes and update the cart did not result in firing proper ecommerce events for Google Tag Manager.

Contact Form 7

Contact Form 7 is by far the one of the most popular contact form plugins although there are now many alternatives on the WordPress plugin repository. Since CF7 is a regularly updated plugin too, sometimes we need to adapt. This was needed to be able to fully track form submissions with newer versions of Contact Form 7.

CF7 has now the ability to pass form values to event handlers. The gtm4wp.contactForm7Submitted event has now a gtm4wp.cf7inputs event parameter that will include filled in data so that you can trigger your tags based on what the user has entered or selected in the form. Please use this wisely as GTM’s term of service clearly restricts usage of personal data.

The gtm4wp.cf7formid data layer variable now includes the ID of the form in WordPress, you might need to update your GTM setup because of this change!


I’ve added WooCommerce compatibility headers so that WooCommerce can check and warn you if you try to use my plugin with an incompatible setup.

Bad news for WooCommerce 2.x users: v1.8 and v1.9 will be the last plugin versions that will keep compatibility with WooCommerce 2.6. Since supporting 2.6 and 3.x needs lots of additional code and since WooCommerce 3.0 is almost one year old, it is time for me to say goodbye to 2.6 and it is time for you to update as well.

One of the most requested features with WooCommerce integration was to add the ability to have a more sophisticated checkout funnel tracking. Since the default checkout page of WooCommerce is a simple one pager, it was not trivial to implement this. And I have the feeling that it will not work with every theme. I will explain this later but for most of you will be happy to add the new gtm4wp.checkoutStepEEC event to your Ecommerce Helper trigger so that you can track how users traverse through your checkout page and where they abandon it.

There was a typo in the list of ecommerce events: gtm4wp.checkoutOptionECC is now correctly set to gtm4wp.checkoutOptionEEC. Please update your GTM setup after upgrading to v1.8

Enhanced ecommerce in Google Analytics includes a better product category tracking solution as compared to the standard ecommerce tracking. This can break up your categories up to 5 separate dimensions with 5 category levels. For example if your product category is Main/Subcat1/Subcat2, that can be stored in 3 dimensions. Querying the full category path of a product can be a resource consuming operation in WooCommerce thus until now you only had the lowest level category name in your GA reports. You have now the option to include the full category path but beware of a possible performance issue on larger sites.

Quick view is an increasingly used functionality on webshops where users can view product details and add them to the cart using a lightbox where only the most important info can be read about products along with an add to cart button. Webshops using such quick view solutions had reduced ecommerce data in GA as my plugin was not able to catch quick view lightboxes. I’ve added support for the official WooCommerce Quick View plugin. If you are using this plugin to show product quick views, a gtm4wp.changeDetailViewEEC event will be fired on each lightbox popup and the gtm4wp.addProductToCartEEC event will be also called if users use the corresponding button in those popups. Adding this support is also the first step to reorganize plugin code around WooCommerce integration in a way that will make cache plugins work better with my plugin as well.

New data layer variables with the customer prefix will now include all billing and last known shipping data of the logged in user. This is one of the first additions that will move the plugin to not only help your Google Tag Manager setup but also your Google Optimize tests (more about this soon)

New Data Layer Variables

Your data layer can be filled with lots of data and now you have even more options to expand your opportunities:

  • The new postFormat data layer variable will help you create content groupings in Google Analytics or to simply restrict triggers to certain post types on your WordPress site
  • The new geo* variables will help you create better setups where you can use the physical location of your site visitor. This will also help your Google Optimize tests (more about this soon)
  • The new visitorUsername data layer variable was requested by many of you too, please keep in mind having a privacy compliant setup here as well

Google Tag Manager environments

I’ve added support for Google Tag Manager Environments, you might use this now to have a different GTM version running on your testing site and on your live site.

Other improvements

I am not a native English-speaking person, you might have already noticed that. With the help of great plugin users, lots of changes has been applied to the plugin description, to the readme and a better description of the placement option in the plugin to clarify what that does.


GTM4WP v1.8 beta 1 is available for download on the GitHub page of the project. Please keep in mind that this is still in beta meaning that we need to get some test results. Please let me know if you downloaded and tried this new version even if it works for you. More details about specific additions will be discussed in separate blog posts. If you want be informed about those new blog posts, subscribe with your feed reader and/or follow the Facebook Page of this project.