Version Description
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 2.8 |
Comparing to | |
See all releases |
Code changes from version 2.7 to 2.8
- googleanalytics.php +27 -13
- 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.
|
8 |
Author URI: http://yoast.com/
|
9 |
License: GPL
|
10 |
|
@@ -88,7 +88,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
88 |
}
|
89 |
}
|
90 |
|
91 |
-
foreach (array('extrase', 'imagese', 'trackoutbound', 'admintracking', 'trackadsense', 'userv2') as $option_name) {
|
92 |
if (isset($_POST[$option_name])) {
|
93 |
$options[$option_name] = true;
|
94 |
} else {
|
@@ -106,6 +106,9 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
106 |
$options = get_option('GoogleAnalyticsPP');
|
107 |
?>
|
108 |
<div class="wrap">
|
|
|
|
|
|
|
109 |
<script type="text/javascript">
|
110 |
function toggle_help(ele, ele2) {
|
111 |
var expl = document.getElementById(ele2);
|
@@ -118,15 +121,14 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
118 |
}
|
119 |
}
|
120 |
</script>
|
121 |
-
<h2>Google Analytics for WordPress Configuration</h2>
|
122 |
<form action="" method="post" id="analytics-conf">
|
123 |
-
<table class="form-table" style="
|
124 |
<?php
|
125 |
if ( function_exists('wp_nonce_field') )
|
126 |
wp_nonce_field('analyticspp-config');
|
127 |
?>
|
128 |
<tr>
|
129 |
-
<th scope="row" style="width:
|
130 |
<label for="uastring">Analytics User Account</label> <small><a href="#" onclick="javascript:toggle_help(this, 'expl');">What's this?</a></small>
|
131 |
</th>
|
132 |
<td>
|
@@ -157,7 +159,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
157 |
<small>(If the extension is only two chars, prefix it with a dot, like '.js')</small>
|
158 |
</th>
|
159 |
<td>
|
160 |
-
<input type="text" name="dlextensions" size="
|
161 |
</td>
|
162 |
</tr>
|
163 |
<tr>
|
@@ -165,7 +167,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
165 |
<label for="dlprefix">Prefix for tracked downloads</label>
|
166 |
</th>
|
167 |
<td>
|
168 |
-
<input type="text" id="dlprefix" name="dlprefix" size="
|
169 |
</td>
|
170 |
</tr>
|
171 |
<tr>
|
@@ -173,7 +175,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
173 |
<label for="artprefix">Prefix for outbound clicks from articles</label>
|
174 |
</th>
|
175 |
<td>
|
176 |
-
<input type="text" id="artprefix" name="artprefix" size="
|
177 |
</td>
|
178 |
</tr>
|
179 |
<tr>
|
@@ -181,7 +183,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
181 |
<label for="comprefix">Prefix for outbound clicks from within comments</label>
|
182 |
</th>
|
183 |
<td>
|
184 |
-
<input type="text" id="comprefix" name="comprefix" size="
|
185 |
</td>
|
186 |
</tr>
|
187 |
<tr>
|
@@ -189,7 +191,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
189 |
<label for="comautprefix">Prefix for outbound clicks from comment author links</label>
|
190 |
</th>
|
191 |
<td>
|
192 |
-
<input type="text" id="comautprefix" name="comautprefix" size="
|
193 |
</td>
|
194 |
</tr>
|
195 |
<tr>
|
@@ -197,7 +199,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
197 |
<label for="blogrollprefix">Prefix for outbound clicks from blogroll links</label>
|
198 |
</th>
|
199 |
<td>
|
200 |
-
<input type="text" id="blogrollprefix" name="blogrollprefix" size="
|
201 |
</td>
|
202 |
</tr>
|
203 |
<tr>
|
@@ -214,7 +216,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
214 |
<?php } ?>
|
215 |
<tr>
|
216 |
<th scope="row" valign="top">
|
217 |
-
<label for="position">
|
218 |
</th>
|
219 |
<td>
|
220 |
<select name="position" id="position" style="width:200px;">
|
@@ -266,6 +268,15 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
266 |
<input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
|
267 |
</td>
|
268 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
</table>
|
270 |
<p style="border:0;" class="submit"><input type="submit" name="submit" value="Update Settings »" /></p>
|
271 |
|
@@ -355,7 +366,10 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
355 |
} ?>
|
356 |
<script type="text/javascript">
|
357 |
<?php if ( $options['userv2'] ) {
|
358 |
-
echo("\tpageTracker._setLocalRemoteServerMode()
|
|
|
|
|
|
|
359 |
} ?>
|
360 |
pageTracker._initData();
|
361 |
<?php if (strpos($_SERVER['HTTP_REFERER'],"images.google") && strpos($_SERVER['HTTP_REFERER'],"&prev") && $options["imagese"]) { ?>
|
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.8
|
8 |
Author URI: http://yoast.com/
|
9 |
License: GPL
|
10 |
|
88 |
}
|
89 |
}
|
90 |
|
91 |
+
foreach (array('extrase', 'imagese', 'trackoutbound', 'admintracking', 'trackadsense', 'userv2', 'allowanchor') as $option_name) {
|
92 |
if (isset($_POST[$option_name])) {
|
93 |
$options[$option_name] = true;
|
94 |
} else {
|
106 |
$options = get_option('GoogleAnalyticsPP');
|
107 |
?>
|
108 |
<div class="wrap">
|
109 |
+
<h2>Google Analytics for WordPress Configuration</h2>
|
110 |
+
<iframe style="float: right; width: 200px; height: 250px" src="http://yoast.com/wp/google-analytics.php"></iframe>
|
111 |
+
|
112 |
<script type="text/javascript">
|
113 |
function toggle_help(ele, ele2) {
|
114 |
var expl = document.getElementById(ele2);
|
121 |
}
|
122 |
}
|
123 |
</script>
|
|
|
124 |
<form action="" method="post" id="analytics-conf">
|
125 |
+
<table class="form-table" style="clear:none;">
|
126 |
<?php
|
127 |
if ( function_exists('wp_nonce_field') )
|
128 |
wp_nonce_field('analyticspp-config');
|
129 |
?>
|
130 |
<tr>
|
131 |
+
<th scope="row" style="width:250px;" valign="top">
|
132 |
<label for="uastring">Analytics User Account</label> <small><a href="#" onclick="javascript:toggle_help(this, 'expl');">What's this?</a></small>
|
133 |
</th>
|
134 |
<td>
|
159 |
<small>(If the extension is only two chars, prefix it with a dot, like '.js')</small>
|
160 |
</th>
|
161 |
<td>
|
162 |
+
<input type="text" name="dlextensions" size="30" value="<?php echo $options['dlextensions']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
|
163 |
</td>
|
164 |
</tr>
|
165 |
<tr>
|
167 |
<label for="dlprefix">Prefix for tracked downloads</label>
|
168 |
</th>
|
169 |
<td>
|
170 |
+
<input type="text" id="dlprefix" name="dlprefix" size="30" value="<?php echo $options['dlprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
|
171 |
</td>
|
172 |
</tr>
|
173 |
<tr>
|
175 |
<label for="artprefix">Prefix for outbound clicks from articles</label>
|
176 |
</th>
|
177 |
<td>
|
178 |
+
<input type="text" id="artprefix" name="artprefix" size="30" value="<?php echo $options['artprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
|
179 |
</td>
|
180 |
</tr>
|
181 |
<tr>
|
183 |
<label for="comprefix">Prefix for outbound clicks from within comments</label>
|
184 |
</th>
|
185 |
<td>
|
186 |
+
<input type="text" id="comprefix" name="comprefix" size="30" value="<?php echo $options['comprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
|
187 |
</td>
|
188 |
</tr>
|
189 |
<tr>
|
191 |
<label for="comautprefix">Prefix for outbound clicks from comment author links</label>
|
192 |
</th>
|
193 |
<td>
|
194 |
+
<input type="text" id="comautprefix" name="comautprefix" size="30" value="<?php echo $options['comautprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
|
195 |
</td>
|
196 |
</tr>
|
197 |
<tr>
|
199 |
<label for="blogrollprefix">Prefix for outbound clicks from blogroll links</label>
|
200 |
</th>
|
201 |
<td>
|
202 |
+
<input type="text" id="blogrollprefix" name="blogrollprefix" size="30" value="<?php echo $options['blogrollprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
|
203 |
</td>
|
204 |
</tr>
|
205 |
<tr>
|
216 |
<?php } ?>
|
217 |
<tr>
|
218 |
<th scope="row" valign="top">
|
219 |
+
<label for="position">Where should the tracking script be placed?</label>
|
220 |
</th>
|
221 |
<td>
|
222 |
<select name="position" id="position" style="width:200px;">
|
268 |
<input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
|
269 |
</td>
|
270 |
</tr>
|
271 |
+
<tr>
|
272 |
+
<th scope="row" valign="top">
|
273 |
+
<label for="allowanchor">Use # instead of ? for Campaign tracking?</label><br/>
|
274 |
+
<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>
|
275 |
+
</th>
|
276 |
+
<td>
|
277 |
+
<input type="checkbox" id="allowanchor" name="allowanchor" <?php if ($options['allowanchor']) echo ' checked="checked" '; ?>/>
|
278 |
+
</td>
|
279 |
+
</tr>
|
280 |
</table>
|
281 |
<p style="border:0;" class="submit"><input type="submit" name="submit" value="Update Settings »" /></p>
|
282 |
|
366 |
} ?>
|
367 |
<script type="text/javascript">
|
368 |
<?php if ( $options['userv2'] ) {
|
369 |
+
echo("\t\tpageTracker._setLocalRemoteServerMode();\n");
|
370 |
+
}
|
371 |
+
if ( $options['allowanchor'] ) {
|
372 |
+
echo("\t\tpageTracker._setAllowAnchor(true);\n");
|
373 |
} ?>
|
374 |
pageTracker._initData();
|
375 |
<?php if (strpos($_SERVER['HTTP_REFERER'],"images.google") && strpos($_SERVER['HTTP_REFERER'],"&prev") && $options["imagese"]) { ?>
|
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
|
7 |
-
Stable tag: 2.
|
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.7: Added option to select either header of footer position, added new AdSense integration options, remove now unneeded adsense tracking script.
|
33 |
1. 2.6.6: Fixed settings link
|
34 |
1. 2.6.5: added Ozh admin menu icon and settings link
|
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.1
|
7 |
+
Stable tag: 2.8
|
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.8: Added the option to add setAllowAnchor to the tracking code, allowing you to track campaigns with # instead of ?
|
33 |
1. 2.7: Added option to select either header of footer position, added new AdSense integration options, remove now unneeded adsense tracking script.
|
34 |
1. 2.6.6: Fixed settings link
|
35 |
1. 2.6.5: added Ozh admin menu icon and settings link
|