Version Description
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 2.5.4 |
Comparing to | |
See all releases |
Code changes from version 2.5.3 to 2.5.4
- googleanalytics.php +9 -12
- readme.txt +19 -21
googleanalytics.php
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Analytics for WordPress
|
4 |
-
Plugin URI: http://
|
5 |
Description: This plugin makes it simple to add Google Analytics with extra search engines and automatic clickout and download tracking to your WordPress blog.
|
6 |
Author: Joost de Valk
|
7 |
-
Version: 2.5.
|
8 |
-
Author URI: http://
|
9 |
License: GPL
|
10 |
|
11 |
Based on Rich Boakes' Analytics plugin: http://boakes.org/analytics
|
12 |
|
13 |
*/
|
14 |
|
15 |
-
$
|
16 |
$uastring = "UA-00000-0";
|
17 |
|
18 |
/*
|
@@ -329,13 +329,13 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
329 |
* Insert the tracking code into the page
|
330 |
*/
|
331 |
function spool_analytics() {
|
332 |
-
global $
|
333 |
|
334 |
$opt = get_option('GoogleAnalyticsPP');
|
335 |
$options = unserialize($opt);
|
336 |
|
337 |
if ($options["uastring"] != "" && (!current_user_can('edit_users') || $options["admintracking"]) && !is_preview() ) { ?>
|
338 |
-
<!-- Google Analytics for WordPress | http://
|
339 |
<script type="text/javascript">
|
340 |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
341 |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
@@ -344,7 +344,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
344 |
var pageTracker = _gat._getTracker("<?php echo $options["uastring"]; ?>");
|
345 |
</script>
|
346 |
<?php if ( $options["extrase"] == true ) {
|
347 |
-
echo("\t<script src=\"".$
|
348 |
} ?>
|
349 |
<script type="text/javascript">
|
350 |
<?php if ( $options['userv2'] ) {
|
@@ -364,7 +364,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
364 |
}
|
365 |
|
366 |
function track_adsense() {
|
367 |
-
echo("\t<script src=\"".$
|
368 |
}
|
369 |
/* Create an array which contians:
|
370 |
* "domain" e.g. boakes.org
|
@@ -522,9 +522,6 @@ if ($options['trackadsense']) {
|
|
522 |
}
|
523 |
|
524 |
// adds the footer so the javascript is loaded
|
525 |
-
add_action('
|
526 |
|
527 |
-
if ($options['trackadsense']) {
|
528 |
-
add_action('wp_footer', array('GA_Filter','track_adsense'));
|
529 |
-
}
|
530 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Analytics for WordPress
|
4 |
+
Plugin URI: http://yoast.com/wordpress/analytics/
|
5 |
Description: This plugin makes it simple to add Google Analytics with extra search engines and automatic clickout and download tracking to your WordPress blog.
|
6 |
Author: Joost de Valk
|
7 |
+
Version: 2.5.4
|
8 |
+
Author URI: http://yoast.com/
|
9 |
License: GPL
|
10 |
|
11 |
Based on Rich Boakes' Analytics plugin: http://boakes.org/analytics
|
12 |
|
13 |
*/
|
14 |
|
15 |
+
$gapppluginpath = str_replace(str_replace('\\', '/', ABSPATH), get_settings('siteurl').'/', str_replace('\\', '/', dirname(__FILE__))).'/';
|
16 |
$uastring = "UA-00000-0";
|
17 |
|
18 |
/*
|
329 |
* Insert the tracking code into the page
|
330 |
*/
|
331 |
function spool_analytics() {
|
332 |
+
global $gapppluginpath;
|
333 |
|
334 |
$opt = get_option('GoogleAnalyticsPP');
|
335 |
$options = unserialize($opt);
|
336 |
|
337 |
if ($options["uastring"] != "" && (!current_user_can('edit_users') || $options["admintracking"]) && !is_preview() ) { ?>
|
338 |
+
<!-- Google Analytics for WordPress | http://yoast.com/wordpress/google-analytics/ -->
|
339 |
<script type="text/javascript">
|
340 |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
341 |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
344 |
var pageTracker = _gat._getTracker("<?php echo $options["uastring"]; ?>");
|
345 |
</script>
|
346 |
<?php if ( $options["extrase"] == true ) {
|
347 |
+
echo("\t<script src=\"".$gapppluginpath."custom_se.js\" type=\"text/javascript\"></script>\n");
|
348 |
} ?>
|
349 |
<script type="text/javascript">
|
350 |
<?php if ( $options['userv2'] ) {
|
364 |
}
|
365 |
|
366 |
function track_adsense() {
|
367 |
+
echo("\t<script src=\"".$gapppluginpath."adsense-track.js\" type=\"text/javascript\"></script>\n");
|
368 |
}
|
369 |
/* Create an array which contians:
|
370 |
* "domain" e.g. boakes.org
|
522 |
}
|
523 |
|
524 |
// adds the footer so the javascript is loaded
|
525 |
+
add_action('wp_footer', array('GA_Filter','spool_analytics'));
|
526 |
|
|
|
|
|
|
|
527 |
?>
|
readme.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
=== Google Analytics for WordPress ===
|
2 |
Contributors: joostdevalk
|
3 |
-
Donate link: http://
|
4 |
Tags: analytics, google analytics, statistics
|
5 |
Requires at least: 2.2
|
6 |
-
Tested up to: 2.5
|
7 |
-
Stable tag: 2.5.
|
8 |
|
9 |
-
The Google Analytics for WordPress
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
The Google Analytics for WordPress
|
14 |
|
15 |
In the options panel for the plugin, you can determine the prefixes to use for the different kinds of outbound links and downloads it tracks.
|
16 |
|
17 |
-
* [Google Analytics for WordPress](http://
|
18 |
-
* Other [Wordpress plugins](http://
|
19 |
* You can hire this author to write [WordPress themes](http://www.altha.co.uk/wordpress/themes/) and [plugins](http://www.altha.co.uk/wordpress/plugins/)!
|
20 |
|
21 |
== Installation ==
|
@@ -29,16 +29,18 @@ This section describes how to install the plugin and get it working.
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
-
2.
|
33 |
-
2.
|
34 |
-
2.
|
35 |
-
1.
|
|
|
36 |
|
37 |
== Frequently Asked Questions ==
|
38 |
|
39 |
= This inflates my clicks, can I filter those out? =
|
40 |
|
41 |
Yes you can, create a new profile based on your original profile and name it something like 'domain - clean'. For each different outbound clicks or download prefix you have, create an exclude filter. You do this by:
|
|
|
42 |
1. choosing a name for the filter, something like 'Exclude Downloads';
|
43 |
1. selecting 'Custom filter' from the dropdown;
|
44 |
1. selecting 'Exclude';
|
@@ -54,27 +56,23 @@ No. You can not. It will break tracking.
|
|
54 |
|
55 |
= How do I check the image search stats and keywords after installing this plugin? =
|
56 |
|
57 |
-
Check out this <a href="http://
|
58 |
|
59 |
= How do I check my outbound link and download stats? =
|
60 |
|
61 |
-
Check out this <a href="http://
|
62 |
|
63 |
= I want the image search keywords in one big overview... =
|
64 |
|
65 |
-
Create a <a href="http://
|
66 |
|
67 |
== Screenshots ==
|
68 |
|
69 |
1. Screenshot of the configuration panel for this plugin.
|
70 |
2. Example of the exclude filter in Google Analytics.
|
71 |
|
72 |
-
== Changelog ==
|
73 |
-
|
74 |
-
1.2.1: Fixed bug where plugin wouldn't work if WordPress URL was not blog URL.
|
75 |
-
|
76 |
== More info ==
|
77 |
|
78 |
-
* For more info, version history, etc. check out the page on my site about the [Google Analytics for WordPress plugin](http://
|
79 |
-
* To check out the other WordPress plugins I wrote, check out my [WordPress plugins](http://
|
80 |
-
* For updates about this plugin and other plugins I created read my [SEO blog](http://
|
1 |
=== Google Analytics for WordPress ===
|
2 |
Contributors: joostdevalk
|
3 |
+
Donate link: http://yoast.com/donate/
|
4 |
Tags: analytics, google analytics, statistics
|
5 |
Requires at least: 2.2
|
6 |
+
Tested up to: 2.5.1
|
7 |
+
Stable tag: 2.5.4
|
8 |
|
9 |
+
The Google Analytics for WordPress plugin automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It also allows you to track AdSense clicks, add extra search engines, track image search queries and it will even work together with Urchin.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
The Google Analytics for WordPress plugin automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It also allows you to track AdSense clicks, add extra search engines, track image search queries and it will even work together with Urchin.
|
14 |
|
15 |
In the options panel for the plugin, you can determine the prefixes to use for the different kinds of outbound links and downloads it tracks.
|
16 |
|
17 |
+
* [Google Analytics for WordPress](http://yoast.com/wordpress/google-analytics/).
|
18 |
+
* Other [Wordpress plugins](http://yoast.com/wordpress/) by the same author.
|
19 |
* You can hire this author to write [WordPress themes](http://www.altha.co.uk/wordpress/themes/) and [plugins](http://www.altha.co.uk/wordpress/plugins/)!
|
20 |
|
21 |
== Installation ==
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
1. 2.5.4: fixed an issue with pluginpath being used globally, and changed links to new domain.
|
33 |
+
1. 2.2: switched to the new tracking code
|
34 |
+
1. 2.1: made sure tracking was disabled on preview pages
|
35 |
+
1. 2.0: added AdSense tracking
|
36 |
+
1. 1.5: added option to enable admin tracking, off by default
|
37 |
|
38 |
== Frequently Asked Questions ==
|
39 |
|
40 |
= This inflates my clicks, can I filter those out? =
|
41 |
|
42 |
Yes you can, create a new profile based on your original profile and name it something like 'domain - clean'. For each different outbound clicks or download prefix you have, create an exclude filter. You do this by:
|
43 |
+
|
44 |
1. choosing a name for the filter, something like 'Exclude Downloads';
|
45 |
1. selecting 'Custom filter' from the dropdown;
|
46 |
1. selecting 'Exclude';
|
56 |
|
57 |
= How do I check the image search stats and keywords after installing this plugin? =
|
58 |
|
59 |
+
Check out this <a href="http://yoast.com/wordpress/google-analytics/how-to-check-your-image-search-stats-and-keywords/">tutorial on checking your image search stats and keywords</a>.
|
60 |
|
61 |
= How do I check my outbound link and download stats? =
|
62 |
|
63 |
+
Check out this <a href="http://yoast.com/wordpress/google-analytics/checking-your-outbound-click-stats/">tutorial on checking your outbound click stats</a>.
|
64 |
|
65 |
= I want the image search keywords in one big overview... =
|
66 |
|
67 |
+
Create a <a href="http://yoast.com/wordpress/google-analytics/creating-a-google-analytics-filter-for-image-search/">Google Analytics filter for image search</a>.
|
68 |
|
69 |
== Screenshots ==
|
70 |
|
71 |
1. Screenshot of the configuration panel for this plugin.
|
72 |
2. Example of the exclude filter in Google Analytics.
|
73 |
|
|
|
|
|
|
|
|
|
74 |
== More info ==
|
75 |
|
76 |
+
* For more info, version history, etc. check out the page on my site about the [Google Analytics for WordPress plugin](http://yoast.com/wordpress/google-analytics/).
|
77 |
+
* To check out the other WordPress plugins I wrote, check out my [WordPress plugins](http://yoast.com/wordpress/) page.
|
78 |
+
* For updates about this plugin and other plugins I created read my [SEO blog](http://yoast.com/)
|