Version Description
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 2.9.3 |
Comparing to | |
See all releases |
Code changes from version 2.9.2 to 2.9.3
- googleanalytics.php +34 -9
- readme.txt +3 -2
googleanalytics.php
CHANGED
@@ -4,7 +4,7 @@ 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.9.
|
8 |
Author URI: http://yoast.com/
|
9 |
License: GPL
|
10 |
|
@@ -127,7 +127,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
127 |
}
|
128 |
}
|
129 |
|
130 |
-
foreach (array('extrase', 'imagese', 'trackoutbound', 'trackloggedin', 'admintracking', 'trackadsense', 'userv2', 'allowanchor') as $option_name) {
|
131 |
if (isset($_POST[$option_name])) {
|
132 |
$options[$option_name] = true;
|
133 |
} else {
|
@@ -325,10 +325,18 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
325 |
<input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
|
326 |
</td>
|
327 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
<tr class="advanced">
|
329 |
<th scope="row" valign="top">
|
330 |
<label for="allowanchor">Use # instead of ? for Campaign tracking?</label><br/>
|
331 |
-
<small>This adds a <a href="http://code.google.com/apis/analytics/docs/gaJSApiCampaignTracking.html#_gat.GA_Tracker_._setAllowAnchor">setAllowAnchor</a> call to your tracking script.</small>
|
332 |
</th>
|
333 |
<td>
|
334 |
<input type="checkbox" id="allowanchor" name="allowanchor" <?php if ($options['allowanchor']) echo ' checked="checked" '; ?>/>
|
@@ -586,27 +594,39 @@ if (strpos($_SERVER['HTTP_REFERER'],"images.google") && strpos($_SERVER['HTTP_RE
|
|
586 |
}
|
587 |
return $bookmarks;
|
588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
} // class GA_Filter
|
590 |
} // endif
|
591 |
|
592 |
-
$version = "0.61";
|
593 |
-
$uakey = "analytics";
|
594 |
-
|
595 |
-
$mulch = ($uastring=""?"##-#####-#":$uastring);
|
596 |
$gaf = new GA_Filter();
|
597 |
$origin = $gaf->ga_get_domain($_SERVER["HTTP_HOST"]);
|
598 |
|
599 |
$options = get_option('GoogleAnalyticsPP',"");
|
600 |
|
601 |
if ($options == "") {
|
602 |
-
$options['dlextensions'] = 'doc,exe
|
603 |
$options['dlprefix'] = '/downloads';
|
604 |
$options['artprefix'] = '/outbound/article';
|
605 |
$options['comprefix'] = '/outbound/comment';
|
606 |
$options['comautprefix'] = '/outbound/commentauthor';
|
607 |
$options['blogrollprefix'] = '/outbound/blogroll';
|
608 |
$options['domainorurl'] = 'domain';
|
609 |
-
$options['position'] = '
|
610 |
$options['userv2'] = false;
|
611 |
$options['extrase'] = false;
|
612 |
$options['imagese'] = false;
|
@@ -637,4 +657,9 @@ if ($options['position'] == 'footer' || $options['position'] == "") {
|
|
637 |
add_action('wp_head', array('GA_Filter','spool_analytics'),20);
|
638 |
}
|
639 |
|
|
|
|
|
|
|
|
|
|
|
640 |
?>
|
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.9.3
|
8 |
Author URI: http://yoast.com/
|
9 |
License: GPL
|
10 |
|
127 |
}
|
128 |
}
|
129 |
|
130 |
+
foreach (array('extrase', 'imagese', 'trackoutbound', 'trackloggedin', 'admintracking', 'trackadsense', 'userv2', 'allowanchor', 'rsslinktagging') as $option_name) {
|
131 |
if (isset($_POST[$option_name])) {
|
132 |
$options[$option_name] = true;
|
133 |
} else {
|
325 |
<input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
|
326 |
</td>
|
327 |
</tr>
|
328 |
+
<tr class="advanced">
|
329 |
+
<th scope="row" valign="top">
|
330 |
+
<label for="rsslinktagging">Tag the links in your RSS feed with campaign variables.</label>
|
331 |
+
</th>
|
332 |
+
<td>
|
333 |
+
<input type="checkbox" id="rsslinktagging" name="rsslinktagging" <?php if ($options['rsslinktagging']) echo ' checked="checked" '; ?>/>
|
334 |
+
</td>
|
335 |
+
</tr>
|
336 |
<tr class="advanced">
|
337 |
<th scope="row" valign="top">
|
338 |
<label for="allowanchor">Use # instead of ? for Campaign tracking?</label><br/>
|
339 |
+
<small>This adds a <a href="http://code.google.com/apis/analytics/docs/gaJSApiCampaignTracking.html#_gat.GA_Tracker_._setAllowAnchor">setAllowAnchor</a> call to your tracking script, and makes RSS link tagging use a # as well.</small>
|
340 |
</th>
|
341 |
<td>
|
342 |
<input type="checkbox" id="allowanchor" name="allowanchor" <?php if ($options['allowanchor']) echo ' checked="checked" '; ?>/>
|
594 |
}
|
595 |
return $bookmarks;
|
596 |
}
|
597 |
+
|
598 |
+
function rsslinktagger($guid) {
|
599 |
+
$options = get_option('GoogleAnalyticsPP');
|
600 |
+
global $wp;
|
601 |
+
if ($wp->request == 'feed') {
|
602 |
+
if ( $options['allowanchor'] ) {
|
603 |
+
$delimiter = '#';
|
604 |
+
} else {
|
605 |
+
$delimiter = '?';
|
606 |
+
}
|
607 |
+
if (strpos ( $guid, $delimiter ) > 0)
|
608 |
+
$delimiter = '&';
|
609 |
+
return $guid . $delimiter . 'utm_source=rss&utm_medium=rss&utm_campaign=rss';
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
} // class GA_Filter
|
614 |
} // endif
|
615 |
|
|
|
|
|
|
|
|
|
616 |
$gaf = new GA_Filter();
|
617 |
$origin = $gaf->ga_get_domain($_SERVER["HTTP_HOST"]);
|
618 |
|
619 |
$options = get_option('GoogleAnalyticsPP',"");
|
620 |
|
621 |
if ($options == "") {
|
622 |
+
$options['dlextensions'] = 'doc,exe,js,pdf,ppt,tgz,zip,xls';
|
623 |
$options['dlprefix'] = '/downloads';
|
624 |
$options['artprefix'] = '/outbound/article';
|
625 |
$options['comprefix'] = '/outbound/comment';
|
626 |
$options['comautprefix'] = '/outbound/commentauthor';
|
627 |
$options['blogrollprefix'] = '/outbound/blogroll';
|
628 |
$options['domainorurl'] = 'domain';
|
629 |
+
$options['position'] = 'footer';
|
630 |
$options['userv2'] = false;
|
631 |
$options['extrase'] = false;
|
632 |
$options['imagese'] = false;
|
657 |
add_action('wp_head', array('GA_Filter','spool_analytics'),20);
|
658 |
}
|
659 |
|
660 |
+
if ($options['rsslinktagging']) {
|
661 |
+
add_filter ( 'the_permalink_rss', array('GA_Filter','rsslinktagger'), 99 );
|
662 |
+
}
|
663 |
+
|
664 |
+
|
665 |
?>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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.
|
7 |
-
Stable tag: 2.9.
|
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 |
|
@@ -29,6 +29,7 @@ This section describes how to install the plugin and get it working.
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
32 |
1. 2.9.2:
|
33 |
* Added a check to see whether the wp_footer() call is in footer.php
|
34 |
* Added a message to the source when tracking code is left out because user is logged in as admin
|
3 |
Donate link: http://yoast.com/donate/
|
4 |
Tags: analytics, google analytics, statistics
|
5 |
Requires at least: 2.2
|
6 |
+
Tested up to: 2.8
|
7 |
+
Stable tag: 2.9.3
|
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 |
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
1. 2.9.3: Added a new option for RSS link tagging, which allows you to tag your RSS feed links with RSS campaign variables. When you've set campaign variables to use # instead of ?, this will adhere to that setting too. Thanks to [Timan Rebel](http://rebelic.nl/) for the idea and code.
|
33 |
1. 2.9.2:
|
34 |
* Added a check to see whether the wp_footer() call is in footer.php
|
35 |
* Added a message to the source when tracking code is left out because user is logged in as admin
|