WooCommerce Google Analytics Integration - Version 1.4.13

Version Description

  • 2019-09-03 =
  • Tweak - Make Google Analytics JS script URL filterable.
Download this release

Release Info

Developer cshultz88
Plugin Icon 128x128 WooCommerce Google Analytics Integration
Version 1.4.13
Comparing to
See all releases

Code changes from version 1.4.12 to 1.4.13

changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  *** Changelog ***
2
 
 
 
 
3
  = 1.4.12 - 2019-08-13 =
4
  * Tweak - WC 3.7 compatibility.
5
 
1
  *** Changelog ***
2
 
3
+ = 1.4.13 - 2019-09-03 =
4
+ * Tweak - Make Google Analytics JS script URL filterable.
5
+
6
  = 1.4.12 - 2019-08-13 =
7
  * Tweak - WC 3.7 compatibility.
8
 
includes/class-wc-google-analytics-js.php CHANGED
@@ -237,11 +237,13 @@ class WC_Google_Analytics_JS {
237
  // See https://developers.google.com/analytics/devguides/collection/analyticsjs/events for reference
238
  $track_404_enabled = "" . self::tracker_var() . "( 'send', 'event', 'Error', '404 Not Found', 'page: ' + document.location.pathname + document.location.search + ' referrer: ' + document.referrer );";
239
  }
 
 
240
 
241
  $ga_snippet_head = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
242
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
243
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
244
- })(window,document,'script','//www.google-analytics.com/analytics.js','" . self::tracker_var() . "');";
245
 
246
  $ga_id = self::get( 'ga_id' );
247
  $ga_snippet_create = self::tracker_var() . "( 'create', '" . esc_js( $ga_id ) . "', '" . $set_domain_name . "' );";
237
  // See https://developers.google.com/analytics/devguides/collection/analyticsjs/events for reference
238
  $track_404_enabled = "" . self::tracker_var() . "( 'send', 'event', 'Error', '404 Not Found', 'page: ' + document.location.pathname + document.location.search + ' referrer: ' + document.referrer );";
239
  }
240
+
241
+ $src = apply_filters('woocommerce_google_analytics_script_src', '//www.google-analytics.com/analytics.js');
242
 
243
  $ga_snippet_head = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
244
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
245
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
246
+ })(window,document,'script', $src" . self::tracker_var() . "');";
247
 
248
  $ga_id = self::get( 'ga_id' );
249
  $ga_snippet_create = self::tracker_var() . "( 'create', '" . esc_js( $ga_id ) . "', '" . $set_domain_name . "' );";
languages/woocommerce-google-analytics-integration.pot CHANGED
@@ -2,11 +2,11 @@
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Google Analytics Integration 1.4.12\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/woocommerce/woocommerce-google-analytics-integration/"
8
  "issues\n"
9
- "POT-Creation-Date: 2019-08-01 16:09:33+00:00\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=utf-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
@@ -255,4 +255,4 @@ msgstr ""
255
 
256
  #. Author URI of the plugin/theme
257
  msgid "https://woocommerce.com"
258
- msgstr ""
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Google Analytics Integration 1.4.13\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/woocommerce/woocommerce-google-analytics-integration/"
8
  "issues\n"
9
+ "POT-Creation-Date: 2019-09-03 23:19:26+00:00\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=utf-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
255
 
256
  #. Author URI of the plugin/theme
257
  msgid "https://woocommerce.com"
258
+ msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: woocommerce, claudiosanches, bor0, royho, laurendavissmith001, c-s
3
  Tags: woocommerce, google analytics
4
  Requires at least: 3.8
5
  Tested up to: 5.2
6
- Stable tag: 1.4.12
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -68,6 +68,9 @@ Exact wording depends on the national data privacy laws and should be adjusted.
68
 
69
  == Changelog ==
70
 
 
 
 
71
  = 1.4.12 - 2019-08-13 =
72
  * Tweak - WC 3.7 compatibility.
73
 
3
  Tags: woocommerce, google analytics
4
  Requires at least: 3.8
5
  Tested up to: 5.2
6
+ Stable tag: 1.4.13
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
68
 
69
  == Changelog ==
70
 
71
+ = 1.4.13 - 2019-09-03 =
72
+ * Tweak - Make Google Analytics JS script URL filterable.
73
+
74
  = 1.4.12 - 2019-08-13 =
75
  * Tweak - WC 3.7 compatibility.
76
 
woocommerce-google-analytics-integration.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Allows Google Analytics tracking code to be inserted into WooCommerce store pages.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com
8
- * Version: 1.4.12
9
  * WC requires at least: 2.1
10
  * WC tested up to: 3.7
11
  * License: GPLv2 or later
@@ -29,7 +29,7 @@ if ( ! class_exists( 'WC_Google_Analytics_Integration' ) ) {
29
  *
30
  * @var string
31
  */
32
- const VERSION = '1.4.12';
33
 
34
  /**
35
  * Instance of this class.
5
  * Description: Allows Google Analytics tracking code to be inserted into WooCommerce store pages.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com
8
+ * Version: 1.4.13
9
  * WC requires at least: 2.1
10
  * WC tested up to: 3.7
11
  * License: GPLv2 or later
29
  *
30
  * @var string
31
  */
32
+ const VERSION = '1.4.13';
33
 
34
  /**
35
  * Instance of this class.