DuracellTomi's Google Tag Manager for WordPress - Version 0.7.1

Version Description

  • Fixed: WooCommerce 2.1.x compatibility.
Download this release

Release Info

Developer duracelltomi
Plugin Icon 128x128 DuracellTomi's Google Tag Manager for WordPress
Version 0.7.1
Comparing to
See all releases

Code changes from version 0.7 to 0.7.1

duracelltomi-google-tag-manager-for-wordpress.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /*
3
  Plugin Name: Google Tag Manager for Wordpress
4
- Version: 0.7
5
  Plugin URI: http://www.duracelltomi.com/google-tag-manager-for-wordpress/
6
  Description: The first Google Tag Manager plugin for WordPress with business goals in mind
7
  Author: Thomas Geiger
8
  Author URI: http://www.duracelltomi.com/
9
  */
10
 
11
- define( 'GTM4WP_VERSION', '0.7' );
12
  define( 'GTM4WP_PATH', plugin_dir_path( __FILE__ ) );
13
  define( 'GTM4WP_TEXTDOMAIN', 'gtm4wp-lang' );
14
 
1
  <?php
2
  /*
3
  Plugin Name: Google Tag Manager for Wordpress
4
+ Version: 0.7.1
5
  Plugin URI: http://www.duracelltomi.com/google-tag-manager-for-wordpress/
6
  Description: The first Google Tag Manager plugin for WordPress with business goals in mind
7
  Author: Thomas Geiger
8
  Author URI: http://www.duracelltomi.com/
9
  */
10
 
11
+ define( 'GTM4WP_VERSION', '0.7.1' );
12
  define( 'GTM4WP_PATH', plugin_dir_path( __FILE__ ) );
13
  define( 'GTM4WP_TEXTDOMAIN', 'gtm4wp-lang' );
14
 
integration/woocommerce.php CHANGED
@@ -37,7 +37,7 @@ function gtm4wp_woocommerce_datalayer_filter_items( $dataLayer ) {
37
  $dataLayer["ecomm_pagetype"] = "cart";
38
  $dataLayer["ecomm_totalvalue"] = $woocommerce->cart->cart_contents_total;
39
  } else if ( is_order_received_page() ) {
40
- $order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET['order'] ) ? 0 : absint( $_GET['order'] ) );
41
  $order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : woocommerce_clean( $_GET['key'] ) );
42
 
43
  if ( $order_id > 0 ) {
@@ -47,7 +47,7 @@ function gtm4wp_woocommerce_datalayer_filter_items( $dataLayer ) {
47
  }
48
 
49
  if ( 1 == get_post_meta( $order_id, '_ga_tracked', true ) ) {
50
- unset( $order );
51
  }
52
 
53
  if ( isset( $order ) ) {
@@ -110,7 +110,7 @@ function gtm4wp_woocommerce_datalayer_filter_items( $dataLayer ) {
110
  $dataLayer["ecomm_pagetype"] = "purchase";
111
  $dataLayer["ecomm_totalvalue"] = $_sumprice;
112
 
113
- update_post_meta( $order_id, '_ga_tracked', 1 );
114
  }
115
  } else {
116
  $dataLayer["ecomm_pagetype"] = "siteview";
37
  $dataLayer["ecomm_pagetype"] = "cart";
38
  $dataLayer["ecomm_totalvalue"] = $woocommerce->cart->cart_contents_total;
39
  } else if ( is_order_received_page() ) {
40
+ $order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET['order'] ) ? ($GLOBALS["wp"]->query_vars["order-received"] ? $GLOBALS["wp"]->query_vars["order-received"] : 0) : absint( $_GET['order'] ) );
41
  $order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : woocommerce_clean( $_GET['key'] ) );
42
 
43
  if ( $order_id > 0 ) {
47
  }
48
 
49
  if ( 1 == get_post_meta( $order_id, '_ga_tracked', true ) ) {
50
+ // unset( $order );
51
  }
52
 
53
  if ( isset( $order ) ) {
110
  $dataLayer["ecomm_pagetype"] = "purchase";
111
  $dataLayer["ecomm_totalvalue"] = $_sumprice;
112
 
113
+ // update_post_meta( $order_id, '_ga_tracked', 1 );
114
  }
115
  } else {
116
  $dataLayer["ecomm_pagetype"] = "siteview";
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === DuracellTomi's Google Tag Manager for WordPress ===
2
  Contributors: duracelltomi
3
  Donate link: http://duracelltomi.com/
4
- Tags: google tag manager, tag manager, google, adwords, google adwords, adwords remarketing, remarketing, google analytics, analytics
5
  Requires at least: 3.0.1
6
- Tested up to: 3.8
7
- Stable tag: 0.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
@@ -12,14 +12,14 @@ The first Google Tag Manager plugin for WordPress with business goals in mind.
12
 
13
  == Description ==
14
 
15
- Google Tag Manager is Google's free tool to everyone to be able to manage your analyitcs, PPC and other code snipetts
16
  using an intuitive web UI.
17
 
18
  This plugin can place the necessary container code snippet into your website so that you do not need to edit your theme files.
19
 
20
  = Basic data included =
21
 
22
- Google Tag Manager for WordPress builds a so called dataLayer variable for you. Using this you can manage your tags
23
  very easily since you can fire them using rules that include
24
 
25
  * post/page titles
@@ -201,6 +201,10 @@ If you or your social plugin inserts the Facebook buttons using IFRAME-s (like S
201
 
202
  == Changelog ==
203
 
 
 
 
 
204
  = 0.7 =
205
 
206
  * Updated/Fixed: dataLayer variables are now populated at the end of the head section. Using this the container code can appear just after the opening body tag, thus Webmaster Tools verification using Tag Manager option will work
@@ -254,6 +258,11 @@ If you or your social plugin inserts the Facebook buttons using IFRAME-s (like S
254
 
255
  == Upgrade Notice ==
256
 
 
 
 
 
 
257
  = 0.7 =
258
 
259
  Improved code so that Webmaster Tools verification can work using your GTM container tag.
1
  === DuracellTomi's Google Tag Manager for WordPress ===
2
  Contributors: duracelltomi
3
  Donate link: http://duracelltomi.com/
4
+ Tags: google tag manager, tag manager, gtm, google, adwords, google adwords, adwords remarketing, remarketing, google analytics, analytics
5
  Requires at least: 3.0.1
6
+ Tested up to: 3.9
7
+ Stable tag: 0.7.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
12
 
13
  == Description ==
14
 
15
+ Google Tag Manager (GTM) is Google's free tool to everyone to be able to manage your analyitcs, PPC and other code snipetts
16
  using an intuitive web UI.
17
 
18
  This plugin can place the necessary container code snippet into your website so that you do not need to edit your theme files.
19
 
20
  = Basic data included =
21
 
22
+ Google Tag Manager for WordPress (aka GTM4WP or GTM 4 WP) builds a so called dataLayer variable for you. Using this you can manage your tags
23
  very easily since you can fire them using rules that include
24
 
25
  * post/page titles
201
 
202
  == Changelog ==
203
 
204
+ = 0.7.1 =
205
+
206
+ * Fixed: WooCommerce 2.1.x compatibility.
207
+
208
  = 0.7 =
209
 
210
  * Updated/Fixed: dataLayer variables are now populated at the end of the head section. Using this the container code can appear just after the opening body tag, thus Webmaster Tools verification using Tag Manager option will work
258
 
259
  == Upgrade Notice ==
260
 
261
+ = 0.7.1 =
262
+
263
+ If you are using WooCommerce and updated to 2.1.x you SHOULD update immediatelly.
264
+ This release includes a fix so that transaction data can be passed to GTM.
265
+
266
  = 0.7 =
267
 
268
  Improved code so that Webmaster Tools verification can work using your GTM container tag.