Version Description
- Added [analytics] shortcode so you can add show off your analytics publicly
Download this release
Release Info
Developer | noahkagan |
Plugin | Google Analyticator |
Version | 6.4.9 |
Comparing to | |
See all releases |
Code changes from version 6.4.8 to 6.4.9
- google-analyticator.php +52 -28
- google-analytics-summary-widget.php +21 -6
- readme.txt +18 -4
google-analyticator.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Google Analyticator
|
4 |
-
* Version: 6.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:
|
8 |
-
* Author URI: http://www.
|
9 |
* Text Domain: google-analyticator
|
10 |
*/
|
11 |
|
12 |
-
define('GOOGLE_ANALYTICATOR_VERSION', '6.4.
|
13 |
|
14 |
define('GOOGLE_ANALYTICATOR_CLIENTID', '1007949979410.apps.googleusercontent.com');
|
15 |
define('GOOGLE_ANALYTICATOR_CLIENTSECRET', 'q06U41XDXtzaXD14E-KO1hti'); //don't worry - this don't need to be secret in our case
|
@@ -489,6 +489,9 @@ if(!$addons){?>
|
|
489 |
<p>1- Check out our <a target="_blank" href="https://wordpress.org/plugins/sumome">SumoMe plugin</a></p>
|
490 |
<p>2- <a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/google-analyticator">Leave a :) Review</a></p>
|
491 |
<p>3- Have a great day!</p>
|
|
|
|
|
|
|
492 |
</div>
|
493 |
<?php }?>
|
494 |
<div style="margin-right: 320px;">
|
@@ -591,11 +594,37 @@ if(!$addons){?>
|
|
591 |
<?php _e('If you are using Universal Analytics make sure you have changed your account to a Universal Analytics property in Google Analytics. Read more about Universal Analytics <a href="https://support.google.com/analytics/answer/2817075?hl=en" target="_blank">here</a>.', 'google-analyticator'); ?>
|
592 |
</p>
|
593 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
</tr>
|
595 |
<tr>
|
596 |
-
<td>View your Dashboard</td>
|
597 |
<td><a href="../wp-admin/index.php">Click here</a></td>
|
598 |
</tr>
|
|
|
|
|
|
|
599 |
<tr>
|
600 |
<td colspan="2" style="padding-left:0"><h3>
|
601 |
<?php _e('Tracking Settings', 'google-analyticator'); ?>
|
@@ -942,29 +971,6 @@ if(!$addons){?>
|
|
942 |
<?php _e('Disabling this option will completely remove the Dashboard Summary widget and the theme Stats widget. Use this option if you would prefer to not see the widgets.', 'google-analyticator'); ?>
|
943 |
</p></td>
|
944 |
</tr>
|
945 |
-
<tr>
|
946 |
-
<th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_widgets; ?>">
|
947 |
-
<?php _e('Display Ad', 'google-analyticator'); ?>:</label>
|
948 |
-
</th>
|
949 |
-
<td><?php
|
950 |
-
echo "<select name='".key_ga_show_ad."' id='".key_ga_show_ad."'>\n";
|
951 |
-
|
952 |
-
echo "<option value='1'";
|
953 |
-
if(get_option(key_ga_show_ad) == '1')
|
954 |
-
echo " selected='selected'";
|
955 |
-
echo ">" . __('Yes', 'google-analyticator') . "</option>\n";
|
956 |
-
|
957 |
-
echo "<option value='0' ";
|
958 |
-
if(get_option(key_ga_show_ad) == '0')
|
959 |
-
echo" selected='selected'";
|
960 |
-
echo ">" . __('No', 'google-analyticator') . "</option>\n";
|
961 |
-
|
962 |
-
echo "</select>\n";
|
963 |
-
?>
|
964 |
-
<p class="setting-description">
|
965 |
-
<?php _e('You can disable the ad on the admin dashboard.', 'google-analyticator'); ?>
|
966 |
-
</p></td>
|
967 |
-
</tr>
|
968 |
<tr<?php if(!$useAuth){echo ' style="display:none"';}?>>
|
969 |
<th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_dashboard_role ?>">
|
970 |
<?php _e('User roles that can see the dashboard widget', 'google-analyticator'); ?>:</label>
|
@@ -1312,3 +1318,21 @@ function add_ga_admin_footer(){
|
|
1312 |
})';
|
1313 |
echo '</script>';
|
1314 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Google Analyticator
|
4 |
+
* Version: 6.4.9
|
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
|
8 |
+
* Author URI: http://www.sumome.com/?src=wp_readme
|
9 |
* Text Domain: google-analyticator
|
10 |
*/
|
11 |
|
12 |
+
define('GOOGLE_ANALYTICATOR_VERSION', '6.4.9');
|
13 |
|
14 |
define('GOOGLE_ANALYTICATOR_CLIENTID', '1007949979410.apps.googleusercontent.com');
|
15 |
define('GOOGLE_ANALYTICATOR_CLIENTSECRET', 'q06U41XDXtzaXD14E-KO1hti'); //don't worry - this don't need to be secret in our case
|
489 |
<p>1- Check out our <a target="_blank" href="https://wordpress.org/plugins/sumome">SumoMe plugin</a></p>
|
490 |
<p>2- <a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/google-analyticator">Leave a :) Review</a></p>
|
491 |
<p>3- Have a great day!</p>
|
492 |
+
<h3 style="text-align:center">Show off your analytics</h3>
|
493 |
+
<p>Use short code <b>[analytics]</b> anywhere on your site to show your analytics publicly.</p>
|
494 |
+
|
495 |
</div>
|
496 |
<?php }?>
|
497 |
<div style="margin-right: 320px;">
|
594 |
<?php _e('If you are using Universal Analytics make sure you have changed your account to a Universal Analytics property in Google Analytics. Read more about Universal Analytics <a href="https://support.google.com/analytics/answer/2817075?hl=en" target="_blank">here</a>.', 'google-analyticator'); ?>
|
595 |
</p>
|
596 |
</td>
|
597 |
+
</tr>
|
598 |
+
<tr>
|
599 |
+
<th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_widgets; ?>">
|
600 |
+
<?php _e('Support us', 'google-analyticator'); ?>:</label>
|
601 |
+
</th>
|
602 |
+
<td><?php
|
603 |
+
echo "<select name='".key_ga_show_ad."' id='".key_ga_show_ad."'>\n";
|
604 |
+
|
605 |
+
echo "<option value='1'";
|
606 |
+
if(get_option(key_ga_show_ad) == '1')
|
607 |
+
echo " selected='selected'";
|
608 |
+
echo ">" . __('Yes', 'google-analyticator') . "</option>\n";
|
609 |
+
|
610 |
+
echo "<option value='0' ";
|
611 |
+
if(get_option(key_ga_show_ad) == '0')
|
612 |
+
echo" selected='selected'";
|
613 |
+
echo ">" . __('No', 'google-analyticator') . "</option>\n";
|
614 |
+
|
615 |
+
echo "</select>\n";
|
616 |
+
?>
|
617 |
+
<p class="setting-description">
|
618 |
+
<?php _e('Show our link on the admin dashboard. Pretty please.', 'google-analyticator'); ?>
|
619 |
+
</p></td>
|
620 |
</tr>
|
621 |
<tr>
|
622 |
+
<td><b>View your Dashboard</b></td>
|
623 |
<td><a href="../wp-admin/index.php">Click here</a></td>
|
624 |
</tr>
|
625 |
+
<tr>
|
626 |
+
<td><input type="submit" class="button button-primary" name="info_update" value="<?php _e('Save Changes', 'google-analyticator'); ?>" /></td>
|
627 |
+
</tr>
|
628 |
<tr>
|
629 |
<td colspan="2" style="padding-left:0"><h3>
|
630 |
<?php _e('Tracking Settings', 'google-analyticator'); ?>
|
971 |
<?php _e('Disabling this option will completely remove the Dashboard Summary widget and the theme Stats widget. Use this option if you would prefer to not see the widgets.', 'google-analyticator'); ?>
|
972 |
</p></td>
|
973 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
974 |
<tr<?php if(!$useAuth){echo ' style="display:none"';}?>>
|
975 |
<th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_dashboard_role ?>">
|
976 |
<?php _e('User roles that can see the dashboard widget', 'google-analyticator'); ?>:</label>
|
1318 |
})';
|
1319 |
echo '</script>';
|
1320 |
}
|
1321 |
+
|
1322 |
+
/**
|
1323 |
+
* Shortcode
|
1324 |
+
*/
|
1325 |
+
|
1326 |
+
//[analytics]
|
1327 |
+
function ga_analyticator_shortcode( $atts ){
|
1328 |
+
# Include the Google Analytics Summary widget
|
1329 |
+
require_once('google-analytics-summary-widget.php');
|
1330 |
+
$google_analytics_summary = new GoogleAnalyticsSummary(TRUE);
|
1331 |
+
// Wrap it with these divs to mimic the admin dashboard widget structure.
|
1332 |
+
echo '<div id="google-analytics-summary"><div class="inside">';
|
1333 |
+
$google_analytics_summary->widget();
|
1334 |
+
echo '</div></div>';
|
1335 |
+
return '';
|
1336 |
+
}
|
1337 |
+
|
1338 |
+
add_shortcode( 'analytics', 'ga_analyticator_shortcode' );
|
google-analytics-summary-widget.php
CHANGED
@@ -13,7 +13,7 @@ class GoogleAnalyticsSummary
|
|
13 |
/**
|
14 |
* Start the process of including the widget
|
15 |
**/
|
16 |
-
function GoogleAnalyticsSummary()
|
17 |
{
|
18 |
add_action('wp_dashboard_setup', array(
|
19 |
$this,
|
@@ -27,12 +27,26 @@ class GoogleAnalyticsSummary
|
|
27 |
$this,
|
28 |
'addTopJs'
|
29 |
));
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$this->qa_selecteddate = isset( $_REQUEST['qa_selecteddate'] ) ? wp_filter_kses( $_REQUEST['qa_selecteddate'] ) : '31';
|
32 |
$this->date_before = date('Y-m-d', strtotime( '-'.$this->qa_selecteddate.' days', strtotime( current_time( 'mysql' ) ) ) );
|
33 |
$this->date_yesterday = date('Y-m-d', strtotime( '-1 days', strtotime( current_time( 'mysql' ) ) ) );
|
34 |
|
35 |
add_action( 'wp_ajax_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -66,6 +80,9 @@ class GoogleAnalyticsSummary
|
|
66 |
function addTopJs()
|
67 |
{
|
68 |
?>
|
|
|
|
|
|
|
69 |
<script type="text/javascript">
|
70 |
|
71 |
//Tooltip
|
@@ -121,11 +138,11 @@ class GoogleAnalyticsSummary
|
|
121 |
|
122 |
function getAnalytics(){
|
123 |
|
124 |
-
//
|
125 |
// Grab the widget data
|
126 |
jQuery.ajax({
|
127 |
type: 'post',
|
128 |
-
url: 'admin-ajax.php',
|
129 |
data: {
|
130 |
action: 'ga_stats_widget',
|
131 |
qa_selecteddate: jQuery("#qa_selecteddate :selected").val(),
|
@@ -135,7 +152,6 @@ class GoogleAnalyticsSummary
|
|
135 |
jQuery("#analyticsloading").html('<img src="<?php echo admin_url("images/wpspin_light.gif")?>" border="0" /> ').show();
|
136 |
},
|
137 |
success: function(html) {
|
138 |
-
|
139 |
jQuery("#analyticsloading").hide();
|
140 |
// Hide the loading message
|
141 |
jQuery('#google-analytics-summary .inside small').remove();
|
@@ -368,7 +384,6 @@ class GoogleAnalyticsSummary
|
|
368 |
function getVisitsGraph()
|
369 |
{
|
370 |
# Get the metrics needed to build the visits graph;
|
371 |
-
|
372 |
try {
|
373 |
$stats = $this->api->getMetrics('ga:visits', $this->date_before, $this->date_yesterday, 'ga:date', 'ga:date');
|
374 |
}
|
13 |
/**
|
14 |
* Start the process of including the widget
|
15 |
**/
|
16 |
+
function GoogleAnalyticsSummary($shortcode = FALSE)
|
17 |
{
|
18 |
add_action('wp_dashboard_setup', array(
|
19 |
$this,
|
27 |
$this,
|
28 |
'addTopJs'
|
29 |
));
|
30 |
+
|
31 |
+
// For shortcode
|
32 |
+
add_action('wp_footer', array(
|
33 |
+
$this,
|
34 |
+
'addJavascript'
|
35 |
+
));
|
36 |
+
add_action('wp_head', array(
|
37 |
+
$this,
|
38 |
+
'addTopJs'
|
39 |
+
));
|
40 |
+
|
41 |
$this->qa_selecteddate = isset( $_REQUEST['qa_selecteddate'] ) ? wp_filter_kses( $_REQUEST['qa_selecteddate'] ) : '31';
|
42 |
$this->date_before = date('Y-m-d', strtotime( '-'.$this->qa_selecteddate.' days', strtotime( current_time( 'mysql' ) ) ) );
|
43 |
$this->date_yesterday = date('Y-m-d', strtotime( '-1 days', strtotime( current_time( 'mysql' ) ) ) );
|
44 |
|
45 |
add_action( 'wp_ajax_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
46 |
+
|
47 |
+
if ($shortcode) {
|
48 |
+
add_action( 'wp_ajax_nopriv_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
49 |
+
}
|
50 |
}
|
51 |
|
52 |
/**
|
80 |
function addTopJs()
|
81 |
{
|
82 |
?>
|
83 |
+
<style type="text/css">
|
84 |
+
#google-analytics-summary .legend table {width:auto;border:0;margin:0;}
|
85 |
+
</style>
|
86 |
<script type="text/javascript">
|
87 |
|
88 |
//Tooltip
|
138 |
|
139 |
function getAnalytics(){
|
140 |
|
141 |
+
// console.log( 'Start getAnalytics();' );
|
142 |
// Grab the widget data
|
143 |
jQuery.ajax({
|
144 |
type: 'post',
|
145 |
+
url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
|
146 |
data: {
|
147 |
action: 'ga_stats_widget',
|
148 |
qa_selecteddate: jQuery("#qa_selecteddate :selected").val(),
|
152 |
jQuery("#analyticsloading").html('<img src="<?php echo admin_url("images/wpspin_light.gif")?>" border="0" /> ').show();
|
153 |
},
|
154 |
success: function(html) {
|
|
|
155 |
jQuery("#analyticsloading").hide();
|
156 |
// Hide the loading message
|
157 |
jQuery('#google-analytics-summary .inside small').remove();
|
384 |
function getVisitsGraph()
|
385 |
{
|
386 |
# Get the metrics needed to build the visits graph;
|
|
|
387 |
try {
|
388 |
$stats = $this->api->getMetrics('ga:visits', $this->date_before, $this->date_yesterday, 'ga:date', 'ga:date');
|
389 |
}
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Google Analyticator ===
|
2 |
Contributors: VideoUserManuals
|
3 |
-
Tags: stats, statistics, google, analytics, dashboard, google analytics, tracking, widget, marketing,pageviews,visits
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 4.2
|
6 |
-
Stable tag: 6.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -13,6 +13,11 @@ Easily view your Google Analytics and real-time statistics inside WordPress! Mak
|
|
13 |
|
14 |
Google Analyticator makes it super easy to view Google Analytics within your WordPress dashboard. This eliminates the need to edit your template code to begin logging. Google Analyticator also includes several widgets for displaying Analytics data in the admin and on your blog.
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
= Features =
|
17 |
|
18 |
Google Analyticator Has the Following Features:
|
@@ -22,6 +27,7 @@ Google Analyticator Has the Following Features:
|
|
22 |
- Includes a widget that can be used to display visitor stat information on the front-end
|
23 |
- Supports outbound link tracking of all links on the page, including links not managed by WordPress
|
24 |
- Supports download link tracking
|
|
|
25 |
- Supports event tracking with outbound links / downloads instead of the old pageview tracking method
|
26 |
- Support site speed tracking
|
27 |
- Allows hiding of Administrator visits without affecting Google Analytics' site overlay feature
|
@@ -32,7 +38,6 @@ Google Analyticator Has the Following Features:
|
|
32 |
- Ability to hide Google UID dropdown
|
33 |
- Translations - Polish, Turkish, Dutch and Spanish
|
34 |
|
35 |
-
Check out our other plugin for getting more traffic [here](http://bit.ly/1PhVdpI).
|
36 |
|
37 |
A big thank you from the whole community to [Ronald](http://ronaldheft.com/) for all the hard work he put into this plugin.
|
38 |
|
@@ -43,7 +48,13 @@ Turkish - Cansın Çağan Acarer from http://www.35pixel.com/
|
|
43 |
|
44 |
== Installation ==
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
== Frequently Asked Questions ==
|
49 |
|
@@ -63,6 +74,9 @@ For any support issues, please use the official WordPress support forums.
|
|
63 |
|
64 |
== Changelog ==
|
65 |
|
|
|
|
|
|
|
66 |
= 6.4.8 =
|
67 |
* Bug fix: anonymizeIP
|
68 |
* Reduced Memory Usage for dashboard
|
1 |
=== Google Analyticator ===
|
2 |
Contributors: VideoUserManuals
|
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.2
|
6 |
+
Stable tag: 6.4.9
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
13 |
|
14 |
Google Analyticator makes it super easy to view Google Analytics within your WordPress dashboard. This eliminates the need to edit your template code to begin logging. Google Analyticator also includes several widgets for displaying Analytics data in the admin and on your blog.
|
15 |
|
16 |
+
One of the most popular WordPress plugins for Google Analytics! Over 3.5+ million downloads.
|
17 |
+
|
18 |
+
Check out our other plugin for getting more traffic [here](http://bit.ly/1PhVdpI).
|
19 |
+
|
20 |
+
|
21 |
= Features =
|
22 |
|
23 |
Google Analyticator Has the Following Features:
|
27 |
- Includes a widget that can be used to display visitor stat information on the front-end
|
28 |
- Supports outbound link tracking of all links on the page, including links not managed by WordPress
|
29 |
- Supports download link tracking
|
30 |
+
- Shortcodes to show off your Google Analytics stats publicly
|
31 |
- Supports event tracking with outbound links / downloads instead of the old pageview tracking method
|
32 |
- Support site speed tracking
|
33 |
- Allows hiding of Administrator visits without affecting Google Analytics' site overlay feature
|
38 |
- Ability to hide Google UID dropdown
|
39 |
- Translations - Polish, Turkish, Dutch and Spanish
|
40 |
|
|
|
41 |
|
42 |
A big thank you from the whole community to [Ronald](http://ronaldheft.com/) for all the hard work he put into this plugin.
|
43 |
|
48 |
|
49 |
== Installation ==
|
50 |
|
51 |
+
1. Install the plugin and activate it.
|
52 |
+
2. Click to connect to Google Analytics and login.
|
53 |
+
3. Copy and paste your Google Authentication code and hit Save and Continue.
|
54 |
+
4. Choose the Analytics Account you want in the drop down.
|
55 |
+
5. Enable Google Analytics logging.
|
56 |
+
6. Scroll to the bottom and save.
|
57 |
+
7. Then go to your Dashboard to see your stats.
|
58 |
|
59 |
== Frequently Asked Questions ==
|
60 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 6.4.9 =
|
78 |
+
* Added [analytics] shortcode so you can add show off your analytics publicly
|
79 |
+
|
80 |
= 6.4.8 =
|
81 |
* Bug fix: anonymizeIP
|
82 |
* Reduced Memory Usage for dashboard
|