Version Description
Download this release
Release Info
| Developer | cavemonkey50 |
| Plugin | |
| Version | 4.2.1 |
| Comparing to | |
| See all releases | |
Code changes from version 4.2 to 4.2.1
- class.analytics.stats.php +7 -2
- google-analyticator.php +7 -5
- readme.txt +1 -1
class.analytics.stats.php
CHANGED
|
@@ -1,8 +1,13 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
# Include SimplePie if it doesn't exist
|
| 4 |
-
if ( !class_exists('SimplePie') )
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
/**
|
| 8 |
* Handles interactions with Google Analytics' Stat API
|
| 1 |
<?php
|
| 2 |
|
| 3 |
# Include SimplePie if it doesn't exist
|
| 4 |
+
if ( !class_exists('SimplePie') ) {
|
| 5 |
+
if ( function_exists('fetch_feed') ) {
|
| 6 |
+
require_once (ABSPATH . WPINC . '/class-feed.php');
|
| 7 |
+
} else {
|
| 8 |
+
require_once('simplepie.inc');
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
|
| 12 |
/**
|
| 13 |
* Handles interactions with Google Analytics' Stat API
|
google-analyticator.php
CHANGED
|
@@ -1,20 +1,22 @@
|
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
* Plugin Name: Google Analyticator
|
| 4 |
-
* Version: 4.2
|
| 5 |
* Plugin URI: http://plugins.spiralwebconsulting.com/analyticator.html
|
| 6 |
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the settings page</a> and enter your Google Analytics' UID and enable logging.
|
| 7 |
* Author: Spiral Web Consulting
|
| 8 |
* Author URI: http://spiralwebconsulting.com/
|
| 9 |
*/
|
| 10 |
|
|
|
|
|
|
|
| 11 |
# Include Google Analytics Stats widget
|
| 12 |
if ( function_exists('curl_init') ) {
|
| 13 |
|
| 14 |
# Check if we have a version of WordPress greater than 2.8
|
| 15 |
-
if (
|
| 16 |
require_once('google-analytics-stats-widget.php');
|
| 17 |
-
else {
|
| 18 |
require_once('google-analytics-stats.php');
|
| 19 |
$google_analytics_stats = new GoogleStatsWidget();
|
| 20 |
}
|
|
@@ -541,7 +543,7 @@ function add_ga_adsense() {
|
|
| 541 |
// Display page tracking if user is not an admin
|
| 542 |
if ( ( get_option(key_ga_admin) == ga_enabled || !current_user_can('level_' . get_option(key_ga_admin_level)) ) && get_option(key_ga_admin_disable) == 'remove' || get_option(key_ga_admin_disable) != 'remove' ) {
|
| 543 |
if ( get_option(key_ga_adsense) != '' ) {
|
| 544 |
-
echo "<!-- Google Analytics Tracking by Google Analyticator: http://plugins.spiralwebconsulting.com/analyticator.html -->\n";
|
| 545 |
echo ' <script type="text/javascript">window.google_analytics_uacct = "' . get_option(key_ga_adsense) . "\";</script>\n\n";
|
| 546 |
}
|
| 547 |
}
|
|
@@ -563,7 +565,7 @@ function add_google_analytics() {
|
|
| 563 |
// Display page tracking if user is not an admin
|
| 564 |
if ( ( get_option(key_ga_admin) == ga_enabled || !current_user_can('level_' . get_option(key_ga_admin_level)) ) && get_option(key_ga_admin_disable) == 'remove' || get_option(key_ga_admin_disable) != 'remove' ) {
|
| 565 |
|
| 566 |
-
echo "<!-- Google Analytics Tracking by Google Analyticator: http://plugins.spiralwebconsulting.com/analyticator.html -->\n";
|
| 567 |
# Google Adsense data if enabled
|
| 568 |
if ( get_option(key_ga_adsense) != '' && !$ga_in_footer )
|
| 569 |
echo ' <script type="text/javascript">window.google_analytics_uacct = "' . get_option(key_ga_adsense) . "\";</script>\n\n";
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
* Plugin Name: Google Analyticator
|
| 4 |
+
* Version: 4.2.1
|
| 5 |
* Plugin URI: http://plugins.spiralwebconsulting.com/analyticator.html
|
| 6 |
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the settings page</a> and enter your Google Analytics' UID and enable logging.
|
| 7 |
* Author: Spiral Web Consulting
|
| 8 |
* Author URI: http://spiralwebconsulting.com/
|
| 9 |
*/
|
| 10 |
|
| 11 |
+
define('GOOGLE_ANALYTICATOR_VERSION', '4.2.1');
|
| 12 |
+
|
| 13 |
# Include Google Analytics Stats widget
|
| 14 |
if ( function_exists('curl_init') ) {
|
| 15 |
|
| 16 |
# Check if we have a version of WordPress greater than 2.8
|
| 17 |
+
if ( function_exists('register_widget') ) {
|
| 18 |
require_once('google-analytics-stats-widget.php');
|
| 19 |
+
} else {
|
| 20 |
require_once('google-analytics-stats.php');
|
| 21 |
$google_analytics_stats = new GoogleStatsWidget();
|
| 22 |
}
|
| 543 |
// Display page tracking if user is not an admin
|
| 544 |
if ( ( get_option(key_ga_admin) == ga_enabled || !current_user_can('level_' . get_option(key_ga_admin_level)) ) && get_option(key_ga_admin_disable) == 'remove' || get_option(key_ga_admin_disable) != 'remove' ) {
|
| 545 |
if ( get_option(key_ga_adsense) != '' ) {
|
| 546 |
+
echo "<!-- Google Analytics Tracking by Google Analyticator " . GOOGLE_ANALYTICATOR_VERSION . ": http://plugins.spiralwebconsulting.com/analyticator.html -->\n";
|
| 547 |
echo ' <script type="text/javascript">window.google_analytics_uacct = "' . get_option(key_ga_adsense) . "\";</script>\n\n";
|
| 548 |
}
|
| 549 |
}
|
| 565 |
// Display page tracking if user is not an admin
|
| 566 |
if ( ( get_option(key_ga_admin) == ga_enabled || !current_user_can('level_' . get_option(key_ga_admin_level)) ) && get_option(key_ga_admin_disable) == 'remove' || get_option(key_ga_admin_disable) != 'remove' ) {
|
| 567 |
|
| 568 |
+
echo "<!-- Google Analytics Tracking by Google Analyticator " . GOOGLE_ANALYTICATOR_VERSION . ": http://plugins.spiralwebconsulting.com/analyticator.html -->\n";
|
| 569 |
# Google Adsense data if enabled
|
| 570 |
if ( get_option(key_ga_adsense) != '' && !$ga_in_footer )
|
| 571 |
echo ' <script type="text/javascript">window.google_analytics_uacct = "' . get_option(key_ga_adsense) . "\";</script>\n\n";
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: cavemonkey50, spiralwebconsulting
|
|
| 3 |
Tags: stats, google, analytics, tracking
|
| 4 |
Requires at least: 2.7
|
| 5 |
Tested up to: 2.8
|
| 6 |
-
Stable tag: 4.2
|
| 7 |
|
| 8 |
Adds the necessary JavaScript code to enable Google Analytics.
|
| 9 |
|
| 3 |
Tags: stats, google, analytics, tracking
|
| 4 |
Requires at least: 2.7
|
| 5 |
Tested up to: 2.8
|
| 6 |
+
Stable tag: 4.2.1
|
| 7 |
|
| 8 |
Adds the necessary JavaScript code to enable Google Analytics.
|
| 9 |
|
