Version Description
- 17/09/2014 =
- Tweak - Adding utmnooverride to return url for Google Adwords
Download this release
Release Info
Developer | BFTrick |
Plugin | WooCommerce Google Analytics Integration |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
includes/class-wc-google-analytics-integration.php
CHANGED
@@ -44,6 +44,9 @@ class WC_Google_Analytics extends WC_Integration {
|
|
44 |
// Event tracking code
|
45 |
add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_to_cart' ) );
|
46 |
add_action( 'wp_footer', array( $this, 'loop_add_to_cart' ) );
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
|
@@ -468,4 +471,24 @@ class WC_Google_Analytics extends WC_Integration {
|
|
468 |
|
469 |
}
|
470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
}
|
44 |
// Event tracking code
|
45 |
add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_to_cart' ) );
|
46 |
add_action( 'wp_footer', array( $this, 'loop_add_to_cart' ) );
|
47 |
+
|
48 |
+
// utm_nooverride parameter for Google AdWords
|
49 |
+
add_filter( 'woocommerce_get_return_url', array( $this, 'utm_nooverride' ) );
|
50 |
}
|
51 |
|
52 |
|
471 |
|
472 |
}
|
473 |
|
474 |
+
|
475 |
+
/**
|
476 |
+
* Add the utm_nooverride parameter to any return urls. This makes sure Google Adwords doesn't mistake the offsite gateway as the referrer.
|
477 |
+
*
|
478 |
+
* @access public
|
479 |
+
* @param string $type
|
480 |
+
* @since 1.2.1
|
481 |
+
* @return string
|
482 |
+
*/
|
483 |
+
public function utm_nooverride( $return_url ) {
|
484 |
+
|
485 |
+
// we don't know if the URL already has the parameter so we should remove it just in case
|
486 |
+
$return_url = remove_query_arg( 'utm_nooverride', $return_url );
|
487 |
+
|
488 |
+
// now add the utm_nooverride query arg to the URL
|
489 |
+
$return_url = add_query_arg( 'utm_nooverride', '1', $return_url );
|
490 |
+
|
491 |
+
return $return_url;
|
492 |
+
}
|
493 |
+
|
494 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: woothemes
|
3 |
Tags: woocommerce, google analytics
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 1.2.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -48,6 +48,9 @@ You can leave this plugin activated and it will seamlessly take over the integra
|
|
48 |
|
49 |
== Changelog ==
|
50 |
|
|
|
|
|
|
|
51 |
= 1.2.0 - 28/07/2014 =
|
52 |
* Feature - Adding display advertising parameter to Universal Analytics
|
53 |
* Fix - Using get_total_shipping() instead of get_shipping
|
2 |
Contributors: woothemes
|
3 |
Tags: woocommerce, google analytics
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 4.0
|
6 |
+
Stable tag: 1.2.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
48 |
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 1.2.1 - 17/09/2014 =
|
52 |
+
* Tweak - Adding utmnooverride to return url for Google Adwords
|
53 |
+
|
54 |
= 1.2.0 - 28/07/2014 =
|
55 |
* Feature - Adding display advertising parameter to Universal Analytics
|
56 |
* Fix - Using get_total_shipping() instead of get_shipping
|
woocommerce-google-analytics-integration.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/plugins/woocommerce-google-analytics-integratio
|
|
5 |
Description: Allows Google Analytics tracking code to be inserted into WooCommerce store pages.
|
6 |
Author: WooThemes
|
7 |
Author URI: http://www.woothemes.com
|
8 |
-
Version: 1.2.
|
9 |
*/
|
10 |
|
11 |
// Add the integration to WooCommerce
|
5 |
Description: Allows Google Analytics tracking code to be inserted into WooCommerce store pages.
|
6 |
Author: WooThemes
|
7 |
Author URI: http://www.woothemes.com
|
8 |
+
Version: 1.2.1
|
9 |
*/
|
10 |
|
11 |
// Add the integration to WooCommerce
|