Google Analyticator - Version 6.5.4

Version Description

  • Fix depricated API field name calls.
  • Check for is_preview() in ga_external_tracking_js()
Download this release

Release Info

Developer grimmdude
Plugin Icon 128x128 Google Analyticator
Version 6.5.4
Comparing to
See all releases

Code changes from version 6.5.3 to 6.5.4

google-analyticator.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
* Plugin Name: Google Analyticator
4
- * Version: 6.5.3
5
* Plugin URI: http://www.videousermanuals.com/google-analyticator/?utm_campaign=analyticator&utm_medium=plugin&utm_source=readme-txt
6
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin you need to authenticate with Google, then select your domain and you're set.
7
* Author: SumoMe
@@ -12,7 +12,7 @@
12
//error_reporting(E_ALL);
13
//ini_set('display_errors', '1');
14
15
- define('GOOGLE_ANALYTICATOR_VERSION', '6.5.2');
16
17
define('GOOGLE_ANALYTICATOR_CLIENTID', '1007949979410.apps.googleusercontent.com');
18
define('GOOGLE_ANALYTICATOR_CLIENTSECRET', 'q06U41XDXtzaXD14E-KO1hti'); //don't worry - this don't need to be secret in our case
@@ -1274,6 +1274,11 @@ function ga_outgoing_links()
1274
**/
1275
function ga_external_tracking_js()
1276
{
1277
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
1278
wp_enqueue_script('ga-external-tracking', plugins_url("/google-analyticator/external-tracking{$suffix}.js"), array('jquery'), GOOGLE_ANALYTICATOR_VERSION);
1279
}
1
<?php
2
/*
3
* Plugin Name: Google Analyticator
4
+ * Version: 6.5.4
5
* Plugin URI: http://www.videousermanuals.com/google-analyticator/?utm_campaign=analyticator&utm_medium=plugin&utm_source=readme-txt
6
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin you need to authenticate with Google, then select your domain and you're set.
7
* Author: SumoMe
12
//error_reporting(E_ALL);
13
//ini_set('display_errors', '1');
14
15
+ define('GOOGLE_ANALYTICATOR_VERSION', '6.5.4');
16
17
define('GOOGLE_ANALYTICATOR_CLIENTID', '1007949979410.apps.googleusercontent.com');
18
define('GOOGLE_ANALYTICATOR_CLIENTSECRET', 'q06U41XDXtzaXD14E-KO1hti'); //don't worry - this don't need to be secret in our case
1274
**/
1275
function ga_external_tracking_js()
1276
{
1277
+ // Exit if this is a post preview
1278
+ if (is_preview()) {
1279
+ return;
1280
+ }
1281
+
1282
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
1283
wp_enqueue_script('ga-external-tracking', plugins_url("/google-analyticator/external-tracking{$suffix}.js"), array('jquery'), GOOGLE_ANALYTICATOR_VERSION);
1284
}
google-analytics-summary-widget.php CHANGED
@@ -451,7 +451,7 @@ class GoogleAnalyticsSummary
451
function getSiteUsage()
452
{
453
# Get the metrics needed to build the usage table
454
- $stats = $this->api->getMetrics('ga:visits,ga:bounces,ga:entrances,ga:pageviews,ga:timeOnSite,ga:newVisits', $this->date_before, $this->date_yesterday);
455
456
# Create the site usage table
457
if (isset($stats->totalsForAllResults)) { ?>
@@ -472,7 +472,7 @@ class GoogleAnalyticsSummary
472
<?php if ($stats->totalsForAllResults['ga:visits'] <= 0) { ?>
473
<td><strong>00:00:00</strong></td>
474
<?php } else { ?>
475
- <td><strong><?php echo $this->sec2Time($stats->totalsForAllResults['ga:timeOnSite'] / $stats->totalsForAllResults['ga:visits']); ?></strong></td>
476
<?php } ?>
477
<td><?php _e('Avg. Time on Site', 'google-analyticator'); ?></td>
478
</tr>
451
function getSiteUsage()
452
{
453
# Get the metrics needed to build the usage table
454
+ $stats = $this->api->getMetrics('ga:visits,ga:bounces,ga:entrances,ga:pageviews,ga:sessionDuration,ga:newVisits', $this->date_before, $this->date_yesterday);
455
456
# Create the site usage table
457
if (isset($stats->totalsForAllResults)) { ?>
472
<?php if ($stats->totalsForAllResults['ga:visits'] <= 0) { ?>
473
<td><strong>00:00:00</strong></td>
474
<?php } else { ?>
475
+ <td><strong><?php echo $this->sec2Time($stats->totalsForAllResults['ga:sessionDuration'] / $stats->totalsForAllResults['ga:visits']); ?></strong></td>
476
<?php } ?>
477
<td><?php _e('Avg. Time on Site', 'google-analyticator'); ?></td>
478
</tr>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
Contributors: noahkagan
3
Tags: google analytics plugin, stats, statistics, google, analytics, dashboard, google analytics, tracking, widget, marketing,pageviews,visits, web stats, javascript
4
Requires at least: 3.2
5
- Tested up to: 4.7
6
- Stable tag: 6.5.3
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -73,6 +73,10 @@ For any support issues, please use the official WordPress support forums.
73
74
75
== Changelog ==
76
= 6.5.3 =
77
* Use wp_get_current_user() instead of get_currentuserinfo()
78
@@ -472,10 +476,6 @@ For any support issues, please use the official WordPress support forums.
472
473
== Upgrade Notice ==
474
475
- = 6.1.1 =
476
-
477
- Bug fix release. If you're having trouble accessing the settings page or use Internet Explorer, this is a recommended update.
478
-
479
- = 6.1 =
480
-
481
- Recommended update. Highlights include WordPress 3.0 support, updated async tracking code, dashboard stats by Analytics profile, more control over who gets tracked, and more control over who can see the dashboard widget. Settings have changed, so revisit the settings to verify.
2
Contributors: noahkagan
3
Tags: google analytics plugin, stats, statistics, google, analytics, dashboard, google analytics, tracking, widget, marketing,pageviews,visits, web stats, javascript
4
Requires at least: 3.2
5
+ Tested up to: 4.8
6
+ Stable tag: 6.5.4
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
73
74
75
== Changelog ==
76
+ = 6.5.4 =
77
+ * Fix depricated API field name calls.
78
+ * Check for is_preview() in ga_external_tracking_js()
79
+
80
= 6.5.3 =
81
* Use wp_get_current_user() instead of get_currentuserinfo()
82
476
477
== Upgrade Notice ==
478
479
+ = 6.5.4 =
480
+ * Fix depricated API field name calls.
481
+ * Check for is_preview() in ga_external_tracking_js()