Simple Google Analytics - Version 2.0.5

Version Description

Download this release

Release Info

Developer JeromeMeyer62
Plugin Icon 128x128 Simple Google Analytics
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4 to 2.0.5

class/Actions.class.php CHANGED
@@ -138,7 +138,11 @@
138
  // @TODO
139
  // Vérifie si on doit afficher le code ou pas, selon l'utilisateur connecté
140
  public static function showCode() {
141
- return true ;
 
 
 
 
142
  }
143
 
144
  }
138
  // @TODO
139
  // Vérifie si on doit afficher le code ou pas, selon l'utilisateur connecté
140
  public static function showCode() {
141
+ $result = true ;
142
+ if( is_user_logged_in() ) {
143
+ $result = Settings::getVal('sga_render_when_loggedin') ;
144
+ }
145
+ return $result ;
146
  }
147
 
148
  }
class/Output.class.php CHANGED
@@ -11,7 +11,7 @@
11
  }
12
 
13
  public static function _e($output) {
14
- return _e($output, self::_NAMESPACE) ;
15
  }
16
 
17
 
@@ -73,6 +73,15 @@
73
  <input type="text" id="multidomain" name="sga_multidomain_domain" value="<?php echo Settings::getVal('sga_multidomain_domain'); ?>" <?php disabled(Settings::getVal('sga_multidomain_setting'), 0) ;?>> <?php Output::_e('Example : domain.com') ; ?>
74
  </td>
75
  </tr>
 
 
 
 
 
 
 
 
 
76
  </table>
77
 
78
  <p class="submit">
11
  }
12
 
13
  public static function _e($output) {
14
+ _e($output, self::_NAMESPACE) ;
15
  }
16
 
17
 
73
  <input type="text" id="multidomain" name="sga_multidomain_domain" value="<?php echo Settings::getVal('sga_multidomain_domain'); ?>" <?php disabled(Settings::getVal('sga_multidomain_setting'), 0) ;?>> <?php Output::_e('Example : domain.com') ; ?>
74
  </td>
75
  </tr>
76
+ <tr valign="top">
77
+ <th scope="row" style="text-align:right;"><?php Output::_e('Render when logged in?') ; ?></th>
78
+ <td>
79
+ <select id="render_when_loggedin" name="sga_render_when_loggedin" style="width:60px;">
80
+ <option value="0" <?php selected(Settings::getVal('sga_render_when_loggedin'), 0) ; ?>><?php Output::_e('No') ; ?></option>
81
+ <option value="1" <?php selected(Settings::getVal('sga_render_when_loggedin'), 1) ; ?>><?php Output::_e('Yes') ; ?></option>
82
+ </select>
83
+ </td>
84
+ </tr>
85
  </table>
86
 
87
  <p class="submit">
class/Settings.class.php CHANGED
@@ -12,6 +12,7 @@
12
  'sga_multidomain_setting',
13
  'sga_multidomain_domain',
14
  'sga_code_location',
 
15
  ) ;
16
 
17
 
12
  'sga_multidomain_setting',
13
  'sga_multidomain_domain',
14
  'sga_code_location',
15
+ 'sga_render_when_loggedin',
16
  ) ;
17
 
18
 
readme.txt CHANGED
@@ -5,8 +5,8 @@ Tags: google analytics, wordpress statistics, tracking
5
  Plugin link: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
6
  Requires at least: 2.6
7
  Tested up to: 3.3
8
- Version: 2.0.4
9
- Stable tag: 2.0.4
10
 
11
  == Description ==
12
  Simple Google Analytics allows you to easilly add your Google Analytics code on all your pages.
@@ -49,6 +49,8 @@ It should work from 2.6 upwards.. Has been tested on all current versions and is
49
  1. Screenshot Simple Google Analytics Admin Page
50
 
51
  == Changelog ==
 
 
52
  = version 2.0.4 =
53
  * Corrected a bug where the JS file was loading before jQuery. Thanks to MrZebra for finding that.
54
  = version 2.0.3 =
5
  Plugin link: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
6
  Requires at least: 2.6
7
  Tested up to: 3.3
8
+ Version: 2.0.5
9
+ Stable tag: 2.0.5
10
 
11
  == Description ==
12
  Simple Google Analytics allows you to easilly add your Google Analytics code on all your pages.
49
  1. Screenshot Simple Google Analytics Admin Page
50
 
51
  == Changelog ==
52
+ = version 2.0.5 =
53
+ * Add parameter to choose if you want the code to be added for connected users. Thanks to Luke for providing the code.
54
  = version 2.0.4 =
55
  * Corrected a bug where the JS file was loading before jQuery. Thanks to MrZebra for finding that.
56
  = version 2.0.3 =
simple_google_analytics.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple Google Analytics
4
  Plugin URI: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
5
  Description: A simple Plugin to add Analytics code on your pages. You simply enter your ID, you choose if you are on a sub-domain and add your domain name.
6
- Version: 2.0.4
7
  Author: Jerome Meyer
8
  Author URI: http://www.arobase62.fr
9
  */
3
  Plugin Name: Simple Google Analytics
4
  Plugin URI: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
5
  Description: A simple Plugin to add Analytics code on your pages. You simply enter your ID, you choose if you are on a sub-domain and add your domain name.
6
+ Version: 2.0.5
7
  Author: Jerome Meyer
8
  Author URI: http://www.arobase62.fr
9
  */