v1.10 of Google Tag Manager for WordPress (GTM4WP) is now available for download from your WordPress dashboard and from the official WordPress repository. Besides some bug fixes it delivers even better WooCommerce related features, let’s see what is under the hood.
Brands for enhanced ecommerce
The brand attribute is not part of the core WooCommerce product attribute set though many merchants offer lots of products from various manufactures. For adding the brand attribute there are several free and paid plugins available to install. A common approach in those plugins are that they create a new taxonomy so that you can set the brand for each of your products.
Enhanced Ecommerce of Google Analytics and Google Tag Manager includes the brand parameter for each product by design but since WooCommerce does not have such a product attribute by default, it was not possible for GTM4WP to easily add this into the data layer object.
Now you can select the taxonomy that is used to organize your products using brand names. GTM4WP will add the brand name for each product so that you can fill in the corresponding Google Analytics ecommerce report with meaningful data and to make this data available for audience building purposes.
Cart data on every page
The content and totals of your user’s cart is very important even if you do not see the importance of this data yet 🙂
If you are using Google Optimize on your site, it can read the content of the data layer provided by this plugin. Now imagine a personalization experience that shows a banner at the top or bottom of your page if the total amount in the cart is very near to the free shipping limit of your store. This banner could show a message that only $20 needs to be added to the cart to ship the goods for free. This could give you better average cart value and of course increasing revenue.
Or imagine that you have a good up-sell or cross-sell opportunity based on what products are in the cart. For example, if there is a digital camera in the cart, you might want to show a promotional banner to the user linking to the memory card category on your site to make sure these users also buy some accessory next to this camera.
As you can see, the possibilities are endless and not limited to Google Optimize usage as this could also give you more ways to create reports through Google Analytics in Google Data Studio.
More product attributes
Besides brands, you can now track 3 more product attribute on the product detail page:
- Product rating details (productRatingCounts)
- Average product rating (productAverageRating)
- Review count (productReviewCount)
You might want to track those attributes in your measurement tool to segment your results for example based on average product rating and analyze correlation between this metric and revenue.
Even better double transaction tracking protection
More and more people reported transactions being tracked multiple time even though there was already a protection in GTM4WP to prevent such unwanted behavior. After some in depth analysis by plugin users it turned out that this was coming mostly from mobile devices.
This gave us the right answer: when a user placed the order on a mobile device and the mobile browsers was closed while the order received page was open, the next this this user opened this mobile browsers, the order received page was reloaded without requesting a fresh and safe version of the page (without the transaction data). Instead, a local cache version was shown, and the corresponding transaction codes were fired again.
Better integration with WordPress 5.2+ supported themes
WordPress 5.2 introduced a new so-called hook that allows GTM4WP to add the second, so called noscript or iframe part of the Google Tag Manager container code just after the opening <body> tag where it belongs.
For sites which use a theme that has already added this capability can now set the code placement option in GTM4WP to codeless safely. With this setting, all Google Tag Manager related codes will be where they belong without the need to modify to theme files or to cross the fingers while the codeless option tries to do this with some “hacking”.
Some more additions and fixes
Besides the additions above, there are other additions and fixes coming with v1.10:
- add associated taxonomy values for any post type
- option to remove shipping costs from revenue data on order received page of WooCommerce
- if you are using Cloudflare, you can now add the country code HTTP header value into the data layer and read from it with the geoCloudflareCountryCode variable name
- better compatibility with Google’s mod_pagespeed
- fixed missing product quantity while adding a variable product into the cart
Enjoy this new release!