Google Analytics for WordPress by MonsterInsights - Version 5.4.2

Version Description

Release Date: April 21th, 2015

  • Bugfixes:
    • Fixes a bug where our link tracking broke the content in case of multiline links.
    • Fixes a bug where it was no longer possible to dismiss the i18n module.
Download this release

Release Info

Developer omarreiss
Plugin Icon 128x128 Google Analytics for WordPress by MonsterInsights
Version 5.4.2
Comparing to
See all releases

Code changes from version 5.4.1 to 5.4.2

admin/class-admin.php CHANGED
@@ -292,10 +292,10 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
292
  'project_slug' => 'google-analytics-for-wordpress',
293
  'plugin_name' => 'Google Analytics by Yoast',
294
  'hook' => 'yoast_ga_admin_footer',
295
- 'glotpress_url' => 'http://translate.yoast.com',
296
  'glotpress_name' => 'Yoast Translate',
297
  'glotpress_logo' => 'https://cdn.yoast.com/wp-content/uploads/i18n-images/Yoast_Translate.svg',
298
- 'register_url ' => 'http://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=yoast-ga-i18n-promo',
299
  )
300
  );
301
 
292
  'project_slug' => 'google-analytics-for-wordpress',
293
  'plugin_name' => 'Google Analytics by Yoast',
294
  'hook' => 'yoast_ga_admin_footer',
295
+ 'glotpress_url' => 'https://translate.yoast.com',
296
  'glotpress_name' => 'Yoast Translate',
297
  'glotpress_logo' => 'https://cdn.yoast.com/wp-content/uploads/i18n-images/Yoast_Translate.svg',
298
+ 'register_url ' => 'https://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=yoast-ga-i18n-promo',
299
  )
300
  );
301
 
frontend/abstract-class-tracking.php CHANGED
@@ -12,7 +12,7 @@ abstract class Yoast_GA_Tracking {
12
  * Regular expression for Ga.js and universal tracking to detect links
13
  * @var string
14
  */
15
- protected $link_regex = '/<a([^>]*?)\shref=([\'\"])([a-zA-Z]+?):(\/\/)?([^\2]+?)\2\s?(.*?)>(.*?)<\/a>/i';
16
 
17
  /**
18
  * Storage for the currently set options
@@ -337,8 +337,8 @@ abstract class Yoast_GA_Tracking {
337
  */
338
  protected function get_target( $category, $matches ) {
339
  $protocol = $matches[3];
340
- $original_url = $matches[5];
341
- $domain = $this->yoast_ga_get_domain( $matches[5] );
342
  $origin = $this->yoast_ga_get_domain( $_SERVER['HTTP_HOST'] );
343
  $extension = substr( strrchr( $original_url, '.' ), 1 );
344
  $type = $this->get_target_type( $extension, $domain, $origin, $matches );
@@ -352,8 +352,8 @@ abstract class Yoast_GA_Tracking {
352
  'origin_domain' => $origin['domain'],
353
  'origin_host' => $origin['host'],
354
  'extension' => $extension,
355
- 'link_attributes' => rtrim( $matches[1] . ' ' . $matches[6] ),
356
- 'link_text' => $matches[7],
357
  'original_url' => $original_url,
358
  );
359
  }
@@ -372,7 +372,7 @@ abstract class Yoast_GA_Tracking {
372
  $download_extensions = explode( ',', str_replace( '.', '', $this->options['extensions_of_files'] ) );
373
  $download_extensions = array_map( 'trim', $download_extensions );
374
  $protocol = $matches[3];
375
- $original_url = $matches[5];
376
 
377
  // Break out immediately if the link is not an http or https link.
378
  $type = null;
12
  * Regular expression for Ga.js and universal tracking to detect links
13
  * @var string
14
  */
15
+ protected $link_regex = '/<a([^>]*)\shref=([\'\"])([a-zA-Z]+):(?:\/){2}?(.*)\2([^>]*)>(.*)<\/a>/isU';
16
 
17
  /**
18
  * Storage for the currently set options
337
  */
338
  protected function get_target( $category, $matches ) {
339
  $protocol = $matches[3];
340
+ $original_url = $matches[4];
341
+ $domain = $this->yoast_ga_get_domain( $matches[4] );
342
  $origin = $this->yoast_ga_get_domain( $_SERVER['HTTP_HOST'] );
343
  $extension = substr( strrchr( $original_url, '.' ), 1 );
344
  $type = $this->get_target_type( $extension, $domain, $origin, $matches );
352
  'origin_domain' => $origin['domain'],
353
  'origin_host' => $origin['host'],
354
  'extension' => $extension,
355
+ 'link_attributes' => trim( $matches[1] . ' ' . $matches[5] ),
356
+ 'link_text' => $matches[6],
357
  'original_url' => $original_url,
358
  );
359
  }
372
  $download_extensions = explode( ',', str_replace( '.', '', $this->options['extensions_of_files'] ) );
373
  $download_extensions = array_map( 'trim', $download_extensions );
374
  $protocol = $matches[3];
375
+ $original_url = $matches[4];
376
 
377
  // Break out immediately if the link is not an http or https link.
378
  $type = null;
googleanalytics.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin URI: https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
10
  * Description: This plugin makes it simple to add Google Analytics to your WordPress site, adding lots of features, e.g. error page, search result and automatic outgoing links and download tracking.
11
  * Author: Team Yoast
12
- * Version: 5.4.1
13
  * Requires at least: 3.8
14
  * Author URI: https://yoast.com/
15
  * License: GPL v3
@@ -35,7 +35,7 @@
35
 
36
  // This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
37
 
38
- define( 'GAWP_VERSION', '5.4.1' );
39
 
40
  define( 'GAWP_FILE', __FILE__ );
41
 
9
  * Plugin URI: https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
10
  * Description: This plugin makes it simple to add Google Analytics to your WordPress site, adding lots of features, e.g. error page, search result and automatic outgoing links and download tracking.
11
  * Author: Team Yoast
12
+ * Version: 5.4.2
13
  * Requires at least: 3.8
14
  * Author URI: https://yoast.com/
15
  * License: GPL v3
35
 
36
  // This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
37
 
38
+ define( 'GAWP_VERSION', '5.4.2' );
39
 
40
  define( 'GAWP_FILE', __FILE__ );
41
 
languages/google-analytics-for-wordpress-de_DE.mo ADDED
Binary file
languages/google-analytics-for-wordpress.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPL v3.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Google Analytics by Yoast 5.4.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/yoast/google-analytics-for-wordpress/issues\n"
8
- "POT-Creation-Date: 2015-04-21 14:26:35+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -84,31 +84,31 @@ msgid ""
84
  "provide support on the plugin 24/7."
85
  msgstr ""
86
 
87
- #: admin/class-admin.php:417
88
  msgid "Event"
89
  msgstr ""
90
 
91
- #: admin/class-admin.php:418
92
  msgid "Pageview"
93
  msgstr ""
94
 
95
- #: admin/class-admin.php:429
96
  msgid "Just the domain"
97
  msgstr ""
98
 
99
- #: admin/class-admin.php:430
100
  msgid "Full links"
101
  msgstr ""
102
 
103
- #: admin/class-admin.php:450
104
  msgid "Debug information"
105
  msgstr ""
106
 
107
- #: admin/class-admin.php:499
108
  msgid "Google Analytics by Yoast Premium"
109
  msgstr ""
110
 
111
- #: admin/class-admin.php:500
112
  msgid ""
113
  "The premium version of Google Analytics by Yoast with more features and "
114
  "support."
@@ -118,27 +118,27 @@ msgstr ""
118
  msgid "Google Analytics by Yoast"
119
  msgstr ""
120
 
121
- #: admin/class-admin.php:505
122
  msgid "eCommerce tracking"
123
  msgstr ""
124
 
125
- #: admin/class-admin.php:506
126
  msgid ""
127
  "Track your eCommerce data and transactions with this eCommerce extension "
128
  "for Google Analytics."
129
  msgstr ""
130
 
131
- #: admin/class-google-analytics.php:318
132
  msgid "Please configure your %sGoogle Analytics settings%s!"
133
  msgstr ""
134
 
135
- #: admin/class-google-analytics.php:331
136
  msgid ""
137
  "It seems the authentication for the plugin has expired, please "
138
  "%sre-authenticate%s with Google Analytics to allow the plugin to fetch data."
139
  msgstr ""
140
 
141
- #: admin/class-google-analytics.php:344
142
  msgid ""
143
  "Data is not up-to-date, there was an error in retrieving the data from "
144
  "Google Analytics. This error could be caused by several issues. If the "
2
  # This file is distributed under the GPL v3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Google Analytics by Yoast 5.4.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/yoast/google-analytics-for-wordpress/issues\n"
8
+ "POT-Creation-Date: 2015-04-22 13:25:30+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
84
  "provide support on the plugin 24/7."
85
  msgstr ""
86
 
87
+ #: admin/class-admin.php:416
88
  msgid "Event"
89
  msgstr ""
90
 
91
+ #: admin/class-admin.php:417
92
  msgid "Pageview"
93
  msgstr ""
94
 
95
+ #: admin/class-admin.php:428
96
  msgid "Just the domain"
97
  msgstr ""
98
 
99
+ #: admin/class-admin.php:429
100
  msgid "Full links"
101
  msgstr ""
102
 
103
+ #: admin/class-admin.php:449
104
  msgid "Debug information"
105
  msgstr ""
106
 
107
+ #: admin/class-admin.php:498
108
  msgid "Google Analytics by Yoast Premium"
109
  msgstr ""
110
 
111
+ #: admin/class-admin.php:499
112
  msgid ""
113
  "The premium version of Google Analytics by Yoast with more features and "
114
  "support."
118
  msgid "Google Analytics by Yoast"
119
  msgstr ""
120
 
121
+ #: admin/class-admin.php:504
122
  msgid "eCommerce tracking"
123
  msgstr ""
124
 
125
+ #: admin/class-admin.php:505
126
  msgid ""
127
  "Track your eCommerce data and transactions with this eCommerce extension "
128
  "for Google Analytics."
129
  msgstr ""
130
 
131
+ #: admin/class-google-analytics.php:320
132
  msgid "Please configure your %sGoogle Analytics settings%s!"
133
  msgstr ""
134
 
135
+ #: admin/class-google-analytics.php:333
136
  msgid ""
137
  "It seems the authentication for the plugin has expired, please "
138
  "%sre-authenticate%s with Google Analytics to allow the plugin to fetch data."
139
  msgstr ""
140
 
141
+ #: admin/class-google-analytics.php:346
142
  msgid ""
143
  "Data is not up-to-date, there was an error in retrieving the data from "
144
  "Google Analytics. This error could be caused by several issues. If the "
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://yoast.com/donate/
4
  Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
- Stable tag: 5.4.1
8
  License: GPL v3
9
 
10
  Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
@@ -51,6 +51,14 @@ This section describes how to install the plugin and get it working.
51
 
52
  == Changelog ==
53
 
 
 
 
 
 
 
 
 
54
  = 5.4.1 =
55
 
56
  Release Date: April 21th, 2015
4
  Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 5.4.2
8
  License: GPL v3
9
 
10
  Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
51
 
52
  == Changelog ==
53
 
54
+ = 5.4.2 =
55
+
56
+ Release Date: April 21th, 2015
57
+
58
+ * Bugfixes:
59
+ * Fixes a bug where our link tracking broke the content in case of multiline links.
60
+ * Fixes a bug where it was no longer possible to dismiss the i18n module.
61
+
62
  = 5.4.1 =
63
 
64
  Release Date: April 21th, 2015
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit0fe7c22694e734007efb95f4d7c175e6::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit3861ffcabcc3803294300fa066c879df::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -44,7 +44,7 @@ class ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563
44
  }
45
  }
46
 
47
- function composerRequiref2b63589148e3715a86a9937e1ae0563($file)
48
  {
49
  require $file;
50
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit0fe7c22694e734007efb95f4d7c175e6
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit0fe7c22694e734007efb95f4d7c175e6', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit0fe7c22694e734007efb95f4d7c175e6', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
44
  }
45
  }
46
 
47
+ function composerRequire0fe7c22694e734007efb95f4d7c175e6($file)
48
  {
49
  require $file;
50
  }
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit3861ffcabcc3803294300fa066c879df {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit3861ffcabcc3803294300fa066c879df', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3861ffcabcc3803294300fa066c879df', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -177,12 +177,12 @@
177
  "source": {
178
  "type": "git",
179
  "url": "https://github.com/Yoast/i18n-module.git",
180
- "reference": "6d366c5b19d2068e3bb1c9bb4b9d17c0dd9566a8"
181
  },
182
  "dist": {
183
  "type": "zip",
184
- "url": "https://api.github.com/repos/Yoast/i18n-module/zipball/6d366c5b19d2068e3bb1c9bb4b9d17c0dd9566a8",
185
- "reference": "6d366c5b19d2068e3bb1c9bb4b9d17c0dd9566a8",
186
  "shasum": ""
187
  },
188
  "time": "2015-04-15 06:48:03",
177
  "source": {
178
  "type": "git",
179
  "url": "https://github.com/Yoast/i18n-module.git",
180
+ "reference": "4648918ccf8bc6da12eadf57e4bece4829af29b3"
181
  },
182
  "dist": {
183
  "type": "zip",
184
+ "url": "https://api.github.com/repos/Yoast/i18n-module/zipball/4648918ccf8bc6da12eadf57e4bece4829af29b3",
185
+ "reference": "4648918ccf8bc6da12eadf57e4bece4829af29b3",
186
  "shasum": ""
187
  },
188
  "time": "2015-04-15 06:48:03",
vendor/yoast/i18n-module/i18n-module.php CHANGED
@@ -146,7 +146,7 @@ class yoast_i18n {
146
  private function hide_promo() {
147
  $hide_promo = get_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide' );
148
  if ( ! $hide_promo ) {
149
- if ( filter_input( INPUT_GET, 'remove_i18n_promo', FILTER_NULL_ON_FAILURE ) ) {
150
  // No expiration time, so this would normally not expire, but it wouldn't be copied to other sites etc.
151
  set_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide', true );
152
  $hide_promo = true;
@@ -209,11 +209,11 @@ class yoast_i18n {
209
  * @return object|null
210
  */
211
  private function find_or_initialize_translation_details() {
212
- $set = get_transient( 'yoast_i18n_' . $this->project_slug );
213
 
214
  if ( ! $set ) {
215
  $set = $this->retrieve_translation_details();
216
- set_transient( 'yoast_i18n_' . $this->project_slug, $set, DAY_IN_SECONDS );
217
  }
218
 
219
  return $set;
146
  private function hide_promo() {
147
  $hide_promo = get_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide' );
148
  if ( ! $hide_promo ) {
149
+ if ( filter_input( INPUT_GET, 'remove_i18n_promo', FILTER_VALIDATE_INT ) === 1 ) {
150
  // No expiration time, so this would normally not expire, but it wouldn't be copied to other sites etc.
151
  set_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide', true );
152
  $hide_promo = true;
209
  * @return object|null
210
  */
211
  private function find_or_initialize_translation_details() {
212
+ $set = get_transient( 'yoast_i18n_' . $this->project_slug . '_' . $this->locale );
213
 
214
  if ( ! $set ) {
215
  $set = $this->retrieve_translation_details();
216
+ set_transient( 'yoast_i18n_' . $this->project_slug . '_' . $this->locale, $set, DAY_IN_SECONDS );
217
  }
218
 
219
  return $set;