Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more - Version 1.2.2

Version Description

  • New: Filter for the conversion value
Download this release

Release Info

Developer alekv
Plugin Icon 128x128 Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2.2

Files changed (2) hide show
  1. readme.txt +8 -2
  2. wgact.php +5 -4
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.wolfundbaer.ch/donations/
4
  Tags: WooCommerce, Google AdWords, AdWords, conversion, conversion value, conversion tag, conversion value tracking, conversion tracking
5
  Requires at least: 3.1
6
  Tested up to: 4.4.2
7
- Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -47,7 +47,13 @@ You can send the link to the front page of your shop too if you think it would b
47
 
48
  == Changelog ==
49
 
50
- = 1.0.7 =
 
 
 
 
 
 
51
  * Tweak: Code cleanup
52
  * Tweak: To avoid over reporting only insert the retargeting code for visitors, not shop managers and admins
53
  = 1.0.6 =
4
  Tags: WooCommerce, Google AdWords, AdWords, conversion, conversion value, conversion tag, conversion value tracking, conversion tracking
5
  Requires at least: 3.1
6
  Tested up to: 4.4.2
7
+ Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.2.2 =
51
+ * New: Filter for the conversion value
52
+ = 1.2.1 =
53
+ * Fix: wrong conversion value fix
54
+ = 1.2 =
55
+ * New: Filter for the conversion value
56
+ = 1.1 =
57
  * Tweak: Code cleanup
58
  * Tweak: To avoid over reporting only insert the retargeting code for visitors, not shop managers and admins
59
  = 1.0.6 =
wgact.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Google AdWords dynamic conversion value tracking for WooCommerce.
6
  * Author: Wolf+Bär GmbH
7
  * Author URI: https://wolfundbaer.ch
8
- * Version: 1.1
9
  * License: GPLv2 or later
10
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
11
  **/
@@ -212,6 +212,8 @@ class WGACT {
212
  $order = new WC_Order( $order_id );
213
  $order_total = $order->get_total();
214
 
 
 
215
  // Only run conversion script if the payment has not failed. (has_status('completed') is too restrictive)
216
  // And use the order meta to check if the conversion code has already run for this order ID. If yes, don't run it again.
217
  if ( ! $order->has_status( 'failed' ) && ( ( get_post_meta( $order_id, '_WGACT_conversion_pixel_fired', true ) != "true" ) ) ) {
@@ -220,9 +222,8 @@ class WGACT {
220
  <!-- START Google Code for Sales (AdWords) Conversion Page -->
221
 
222
  <div style="display:inline;">
223
- <img height="1" width="1" style="border-style:none;" alt="" src="http<?php if ( is_ssl() ) {
224
- echo "s";
225
- } ?>://www.googleadservices.com/pagead/conversion/<?php echo $conversion_id; ?>/?value=<?php echo $order_total; ?>&amp;currency_code=<?php echo $order->get_order_currency(); ?>&amp;label=<?php echo $conversion_label; ?>&amp;guid=ON&amp;script=0"/>
226
  </div>
227
 
228
  <!-- END Google Code for Sales (AdWords) Conversion Page -->
5
  * Description: Google AdWords dynamic conversion value tracking for WooCommerce.
6
  * Author: Wolf+Bär GmbH
7
  * Author URI: https://wolfundbaer.ch
8
+ * Version: 1.2.2
9
  * License: GPLv2 or later
10
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
11
  **/
212
  $order = new WC_Order( $order_id );
213
  $order_total = $order->get_total();
214
 
215
+ $order_total = apply_filters( 'wgact_conversion_value_filter', $order_total, $order );
216
+
217
  // Only run conversion script if the payment has not failed. (has_status('completed') is too restrictive)
218
  // And use the order meta to check if the conversion code has already run for this order ID. If yes, don't run it again.
219
  if ( ! $order->has_status( 'failed' ) && ( ( get_post_meta( $order_id, '_WGACT_conversion_pixel_fired', true ) != "true" ) ) ) {
222
  <!-- START Google Code for Sales (AdWords) Conversion Page -->
223
 
224
  <div style="display:inline;">
225
+ <img height="1" width="1" style="border-style:none;" alt=""
226
+ src="//www.googleadservices.com/pagead/conversion/<?php echo $conversion_id; ?>/?value=<?php echo $order_total; ?>&amp;currency_code=<?php echo $order->get_order_currency(); ?>&amp;label=<?php echo $conversion_label; ?>&amp;guid=ON&amp;script=0"/>
 
227
  </div>
228
 
229
  <!-- END Google Code for Sales (AdWords) Conversion Page -->