Google Analytics for WordPress by MonsterInsights - Version 2.5

Version Description

Download this release

Release Info

Developer joostdevalk
Plugin Icon 128x128 Google Analytics for WordPress by MonsterInsights
Version 2.5
Comparing to
See all releases

Code changes from version 2.4.1 to 2.5

Files changed (2) hide show
  1. gapp/googleanalytics.php +124 -58
  2. readme.txt +2 -2
gapp/googleanalytics.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Analytics for WordPress
4
  Plugin URI: http://www.joostdevalk.nl/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.4.1
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
@@ -111,15 +111,17 @@ if ( ! class_exists( 'GA_Admin' ) ) {
111
  }
112
  </script>
113
  <h2>Google Analytics for WordPress Configuration</h2>
114
- <fieldset>
115
- <form action="" method="post" id="analytics-conf" style="width: 35em; ">
116
- <?php
117
- if ( function_exists('wp_nonce_field') )
118
- wp_nonce_field('analyticspp-config');
119
- ?>
120
- <p>
121
- <strong><label for="uastring">Analytics User Account</label></strong>
122
- <small><a href="#" onclick="javascript:toggle_help(this, 'expl');">What's this?</a></small><br/>
 
 
123
  <input id="uastring" name="uastring" type="text" size="20" maxlength="40" value="<?php echo $options['uastring']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;" /><br/>
124
  <div id="expl" style="display:none;">
125
  <h3>Explanation</h3>
@@ -138,63 +140,127 @@ if ( ! class_exists( 'GA_Admin' ) ) {
138
  just defined, that is your User Account string
139
  (it's shown in <strong>bold</strong> in the example below).</p>
140
  <tt>&lt;script type="text/javascript"&gt;<br/>
141
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
142
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
143
- &lt;/script&gt;<br/>
144
- &lt;script type="text/javascript"&gt;<br/>
145
- var pageTracker = _gat._getTracker("<strong><?php echo($mulch);?></strong>");<br/>
146
- pageTracker._initData();<br/>
147
- pageTracker._trackPageview();<br/>
148
- &lt;/script&gt;</tt>
149
  <p>Once you have entered your User Account String in
150
  the box above your pages will be trackable by
151
  Google Analytics.</p>
152
  </div>
153
- <?php if ($options['trackoutbound']) { ?>
154
- <strong><label for="dlextensions">Extensions of files to track as downloads</label></strong><br/>
155
- (If the extension is only two chars, prefix it with a dot, like '.js')
156
- <input type="text" name="dlextensions" size="40" value="<?php echo $options['dlextensions']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/><br/>
157
- <br/>
158
- <strong><label for="dlprefix">Prefix for tracked downloads</label></strong><br/>
159
- <input type="text" id="dlprefix" name="dlprefix" size="40" value="<?php echo $options['dlprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/><br/>
160
- <br/>
161
- <strong><label for="artprefix">Prefix for outbound clicks from articles</label></strong><br/>
162
- <input type="text" id="artprefix" name="artprefix" size="40" value="<?php echo $options['artprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/><br/>
163
- <br/>
164
- <strong><label for="comprefix">Prefix for outbound clicks from within comments</label></strong><br/>
165
- <input type="text" id="comprefix" name="comprefix" size="40" value="<?php echo $options['comprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/><br/>
166
- <br/>
167
- <strong><label for="comautprefix">Prefix for outbound clicks from comment author links</label></strong><br/>
168
- <input type="text" id="comautprefix" name="comautprefix" size="40" value="<?php echo $options['comautprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/><br/>
169
- <br/>
170
- <strong><label for="blogrollprefix">Prefix for outbound clicks from blogroll links</label></strong><br/>
171
- <input type="text" id="blogrollprefix" name="blogrollprefix" size="40" value="<?php echo $options['blogrollprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/><br/>
172
- <br/>
173
- <strong><label for="domainorurl">Track full URL of outbound clicks or just the domain?</label></strong><br/>
174
- <select name="domainorurl" id="domainorurl" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  <option value="domain"<?php if ($options['domainorurl'] == 'domain') { echo ' selected="selected"';} ?>>Just the domain</option>
176
  <option value="url"<?php if ($options['domainorurl'] == 'url') { echo ' selected="selected"';} ?>>Track the complete URL</option>
177
- </select><br/>
178
- <br/>
179
- <?php } ?>
 
 
 
 
 
 
 
180
  <input type="checkbox" id="trackoutbound" name="trackoutbound" <?php if ($options['trackoutbound']) echo ' checked="checked" '; ?>/>
181
- <label for="trackoutbound">Track outbound clicks &amp; downloads</label><br/>
182
- <br/>
 
 
 
 
 
183
  <input type="checkbox" id="trackadsense" name="trackadsense" <?php if ($options['trackadsense']) echo ' checked="checked" '; ?>/>
184
- <label for="trackadsense">Track AdSense clicks</label><br/>
185
- <br/>
186
- <input type="checkbox" id="extrase" name="extrase" <?php if ($options['extrase']) echo ' checked="checked" '; ?>/>
187
- <label for="extrase">Track extra Search Engines</label><br/>
188
- <br/>
 
 
 
 
 
 
 
 
 
 
 
189
  <input type="checkbox" id="admintracking" name="admintracking" <?php if ($options['admintracking']) echo ' checked="checked" '; ?>/>
190
- <label for="admintracking">Track the administrator too (default is not to)</label>
191
- <br/>
192
- <input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
193
- <label for="userv2">I use Urchin too, make it both work.</label>
194
- </p>
195
- <p class="submit"><input type="submit" name="submit" value="Update Settings &raquo;" /></p>
196
- </form>
197
- </fieldset>
 
 
 
 
 
198
  </div>
199
  <?php
200
  if (isset($options['uastring'])) {
4
  Plugin URI: http://www.joostdevalk.nl/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
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
111
  }
112
  </script>
113
  <h2>Google Analytics for WordPress Configuration</h2>
114
+ <form action="" method="post" id="analytics-conf">
115
+ <table class="form-table" style="width:100%;">
116
+ <?php
117
+ if ( function_exists('wp_nonce_field') )
118
+ wp_nonce_field('analyticspp-config');
119
+ ?>
120
+ <tr>
121
+ <th scope="row" style="width:400px;" valign="top">
122
+ <label for="uastring">Analytics User Account</label> <small><a href="#" onclick="javascript:toggle_help(this, 'expl');">What's this?</a></small>
123
+ </th>
124
+ <td>
125
  <input id="uastring" name="uastring" type="text" size="20" maxlength="40" value="<?php echo $options['uastring']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;" /><br/>
126
  <div id="expl" style="display:none;">
127
  <h3>Explanation</h3>
140
  just defined, that is your User Account string
141
  (it's shown in <strong>bold</strong> in the example below).</p>
142
  <tt>&lt;script type="text/javascript"&gt;<br/>
143
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
144
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
145
+ &lt;/script&gt;<br/>
146
+ &lt;script type="text/javascript"&gt;<br/>
147
+ var pageTracker = _gat._getTracker("<strong><?php echo($mulch);?></strong>");<br/>
148
+ pageTracker._initData();<br/>
149
+ pageTracker._trackPageview();<br/>
150
+ &lt;/script&gt;</tt>
151
  <p>Once you have entered your User Account String in
152
  the box above your pages will be trackable by
153
  Google Analytics.</p>
154
  </div>
155
+ </td>
156
+ </tr>
157
+ <?php if ($options['trackoutbound']) { ?>
158
+ <tr>
159
+ <th scope="row" valign="top">
160
+ <label for="dlextensions">Extensions of files to track as downloads</label><br/>
161
+ <small>(If the extension is only two chars, prefix it with a dot, like '.js')</small>
162
+ </th>
163
+ <td>
164
+ <input type="text" name="dlextensions" size="40" value="<?php echo $options['dlextensions']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
165
+ </td>
166
+ </tr>
167
+ <tr>
168
+ <th scope="row" valign="top">
169
+ <label for="dlprefix">Prefix for tracked downloads</label>
170
+ </th>
171
+ <td>
172
+ <input type="text" id="dlprefix" name="dlprefix" size="40" value="<?php echo $options['dlprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
173
+ </td>
174
+ </tr>
175
+ <tr>
176
+ <th scope="row" valign="top">
177
+ <label for="artprefix">Prefix for outbound clicks from articles</label>
178
+ </th>
179
+ <td>
180
+ <input type="text" id="artprefix" name="artprefix" size="40" value="<?php echo $options['artprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
181
+ </td>
182
+ </tr>
183
+ <tr>
184
+ <th scope="row" valign="top">
185
+ <label for="comprefix">Prefix for outbound clicks from within comments</label>
186
+ </th>
187
+ <td>
188
+ <input type="text" id="comprefix" name="comprefix" size="40" value="<?php echo $options['comprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <th scope="row" valign="top">
193
+ <label for="comautprefix">Prefix for outbound clicks from comment author links</label>
194
+ </th>
195
+ <td>
196
+ <input type="text" id="comautprefix" name="comautprefix" size="40" value="<?php echo $options['comautprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
197
+ </td>
198
+ </tr>
199
+ <tr>
200
+ <th scope="row" valign="top">
201
+ <label for="blogrollprefix">Prefix for outbound clicks from blogroll links</label>
202
+ </th>
203
+ <td>
204
+ <input type="text" id="blogrollprefix" name="blogrollprefix" size="40" value="<?php echo $options['blogrollprefix']; ?>" style="font-family: 'Courier New', Courier, mono; font-size: 1.5em;"/>
205
+ </td>
206
+ </tr>
207
+ <tr>
208
+ <th scope="row" valign="top">
209
+ <label for="domainorurl">Track full URL of outbound clicks or just the domain?</label>
210
+ </th>
211
+ <td>
212
+ <select name="domainorurl" id="domainorurl">
213
  <option value="domain"<?php if ($options['domainorurl'] == 'domain') { echo ' selected="selected"';} ?>>Just the domain</option>
214
  <option value="url"<?php if ($options['domainorurl'] == 'url') { echo ' selected="selected"';} ?>>Track the complete URL</option>
215
+ </select>
216
+ </td>
217
+ </tr>
218
+ <?php } ?>
219
+ <tr>
220
+ <th scope="row" valign="top">
221
+ <label for="trackoutbound">Track outbound clicks<br/>
222
+ &amp; downloads</label>
223
+ </th>
224
+ <td>
225
  <input type="checkbox" id="trackoutbound" name="trackoutbound" <?php if ($options['trackoutbound']) echo ' checked="checked" '; ?>/>
226
+ </td>
227
+ </tr>
228
+ <tr>
229
+ <th scope="row" valign="top">
230
+ <label for="trackadsense">Track AdSense clicks</label>
231
+ </th>
232
+ <td>
233
  <input type="checkbox" id="trackadsense" name="trackadsense" <?php if ($options['trackadsense']) echo ' checked="checked" '; ?>/>
234
+ </td>
235
+ </tr>
236
+ <tr>
237
+ <th scope="row" valign="top">
238
+ <label for="extrase">Track extra Search Engines</label>
239
+ </th>
240
+ <td>
241
+ <input type="checkbox" id="extrase" name="extrase" <?php if ($options['extrase']) echo ' checked="checked" '; ?>/>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <th scope="row" valign="top">
246
+ <label for="admintracking">Track the administrator too</label><br/>
247
+ <small>(default is not to)</small>
248
+ </th>
249
+ <td>
250
  <input type="checkbox" id="admintracking" name="admintracking" <?php if ($options['admintracking']) echo ' checked="checked" '; ?>/>
251
+ </td>
252
+ </tr>
253
+ <tr>
254
+ <th scope="row" valign="top">
255
+ <label for="userv2">I use Urchin too.</label>
256
+ </th>
257
+ <td>
258
+ <input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
259
+ </td>
260
+ </tr>
261
+ </table>
262
+ <p style="border:0;" class="submit"><input type="submit" name="submit" value="Update Settings &raquo;" /></p>
263
+ </form>
264
  </div>
265
  <?php
266
  if (isset($options['uastring'])) {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: joostdevalk
3
  Donate link: http://www.joostdevalk.nl/donate/
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.2
6
- Tested up to: 2.3.2
7
- Stable tag: 2.4.1
8
 
9
  The Google Analytics for WordPress plugina 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
 
3
  Donate link: http://www.joostdevalk.nl/donate/
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 plugina 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